Enforce POLICY-RELEASE-001: align git tag with SKILL.md and SKILL_VERSION
All checks were successful
技能自动化发布 / release (push) Successful in 6s
All checks were successful
技能自动化发布 / release (push) Successful in 6s
This commit is contained in:
@@ -40,6 +40,7 @@ POLICY_IDS = (
|
||||
"POLICY-RPA-006",
|
||||
"POLICY-PACKAGING-001",
|
||||
"POLICY-PACKAGING-002",
|
||||
"POLICY-RELEASE-001",
|
||||
"POLICY-DOCS-001",
|
||||
"POLICY-LOGGING-001",
|
||||
"POLICY-LOGGING-002",
|
||||
@@ -1530,6 +1531,44 @@ class TestPolicyDataSync001(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
class TestPolicyRelease001(unittest.TestCase):
|
||||
def test_release_ps1_enforces_version_alignment(self) -> None:
|
||||
skill_root = get_skill_root()
|
||||
path = os.path.join(skill_root, "release.ps1")
|
||||
self.assertTrue(
|
||||
os.path.isfile(path),
|
||||
msg=_policy_msg("POLICY-RELEASE-001", "release.ps1", "file missing"),
|
||||
)
|
||||
text = _read_text(path)
|
||||
self.assertIn(
|
||||
"Assert-SkillReleaseVersionAlignment",
|
||||
text,
|
||||
msg=_policy_msg(
|
||||
"POLICY-RELEASE-001",
|
||||
"release.ps1",
|
||||
"must define Assert-SkillReleaseVersionAlignment",
|
||||
),
|
||||
)
|
||||
self.assertIn(
|
||||
"POLICY-RELEASE-001",
|
||||
text,
|
||||
msg=_policy_msg(
|
||||
"POLICY-RELEASE-001",
|
||||
"release.ps1",
|
||||
"must reference POLICY-RELEASE-001",
|
||||
),
|
||||
)
|
||||
self.assertRegex(
|
||||
text,
|
||||
r"Assert-SkillReleaseVersionAlignment\s+-SkillRoot",
|
||||
msg=_policy_msg(
|
||||
"POLICY-RELEASE-001",
|
||||
"release.ps1",
|
||||
"must invoke Assert-SkillReleaseVersionAlignment before tagging",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class TestPolicyDocs001(unittest.TestCase):
|
||||
def test_policy_matrix_exists_and_lists_policy_ids(self) -> None:
|
||||
skill_root = get_skill_root()
|
||||
|
||||
Reference in New Issue
Block a user