integrate: sync appendix sources to v0.5 appendix table (00-10)

Integration arbitration, not a PR commit: v0.3/v0.4/v0.5 synced body
changes into appendix chapters 00/02/04/06/07 while templates/roles/
sources stayed at v0.2, so check_appendix failed 6 chapters; and
09-ops/10-iteration chapters (v0.5) were invisible to the strict
chapter regex because of the ', v0.5 new' title suffix, breaking
the #214 matrix-vs-appendix test. Direction is sources follow the
appendix (appendix is the tenant-visible authoritative version;
never overwrite v0.5 text with v0.2). 09/10 headers normalized to
strict form (suffix only); 09/10 sources split mechanically from
the appendix; EXPECTED_IDS extended to 11 chapters in the checker
and both appendix tests.
This commit is contained in:
host committed 2026-11-03 02:49:25 +00:00
1 parent be41ad2c0a
commit 2720acef46
12 files changed
+302 -57

No files matched your search

+10 -8
View File
@@ -8,14 +8,15 @@ script. The appendix was therefore unverifiable -- a drifted chapter
would pass CI silently.
This file pins the repair, and nothing else:
- tools/check_appendix.py passes on the real pack (all nine chapters
match their templates/roles/ sources, CHANGELOG present and
mentioning templates/roles/);
- tools/check_appendix.py passes on the real pack (all eleven
chapters match their templates/roles/ sources, CHANGELOG present
and mentioning templates/roles/);
- the same script FAILS (nonzero exit) on a temp copy with a source
deleted, a source tampered, or an extra source added -- so a future
"source missing" or "appendix drifted" state cannot slip through;
- --emit output is exactly the nine headings plus the nine source
bodies, so the spliced form is itself derived from the sources.
- --emit output is exactly the eleven headings plus the eleven
source bodies, so the spliced form is itself derived from the
sources.
Scope guard: these tests never edit SKILL.md or the sources. A
failure here is an editorial decision for the skill's own track
@@ -38,7 +39,8 @@ SCRIPT = SKILL_DIR / "tools" / "check_appendix.py"
EXPECTED_IDS = ["00-coordinator", "01-product-manager", "02-architect",
"03-designer", "04-client-developer", "05-backend",
"06-qa", "07-acceptance", "08-shared-core"]
"06-qa", "07-acceptance", "08-shared-core",
"09-ops", "10-iteration"]
def _run(skill_dir=None):
@@ -66,7 +68,7 @@ class AppendixProvenanceTestCase(unittest.TestCase):
self.assertEqual(
result.returncode, 0,
"校验脚本应在真实包上通过,stderr:%s" % result.stderr)
self.assertIn("9 chapters match", result.stdout)
self.assertIn("11 chapters match", result.stdout)
def test_missing_source_fails(self):
skill = _temp_skill_copy(self)
@@ -110,7 +112,7 @@ class AppendixProvenanceTestCase(unittest.TestCase):
/ (cid + ".md")).read_text(encoding="utf-8")
expected_parts.append(heading + "\n\n" + source.rstrip("\n"))
self.assertEqual(result.stdout, "\n\n".join(expected_parts) + "\n",
"--emit 输出须恰为 9 章标题 + 9 份源正文")
"--emit 输出须恰为 11 章标题 + 11 份源正文")
if __name__ == "__main__":
+6 -4
View File
@@ -11,7 +11,8 @@ asserting two chapters (00-coordinator, 08-shared-core) exist in the
seeded file -- a dropped middle chapter (01..07) would pass CI silently.
The bidirectional assertion previously discussed on the #209 track is
unmerged, so main does not have it; this file supplies it on the main
base (skill text v0.2, 9 appendix chapters 00..08).
base (skill text v0.2, 9 appendix chapters 00..08;
integrated text is v0.5, 11 appendix chapters 00..10).
What "bidirectional" means here, concretely (all derived from SKILL.md
itself, no new semantics invented):
@@ -25,8 +26,8 @@ itself, no new semantics invented):
merge-gate / PR-number rules but no literal "GitHub" word, so the
test must not demand that word there);
- body role-matrix role names == appendix role-title names as sets
(order differs: matrix order vs numeric 00..08 order, so set, not
list, comparison), and appendix ids are exactly 00..08 in order.
(order differs: matrix order vs numeric 00..10 order, so set, not
list, comparison), and appendix ids are exactly 00..10 in order.
CI: .github/workflows/host-verify.yml and release.yml both run
`python3 -m unittest discover -s cloud/tests -v`, so this test_*.py
@@ -55,7 +56,8 @@ SKILL_PATH = (REPO_ROOT / "cloud" / "skills" / "software-engineering"
EXPECTED_IDS = ["00-coordinator", "01-product-manager", "02-architect",
"03-designer", "04-client-developer", "05-backend",
"06-qa", "07-acceptance", "08-shared-core"]
"06-qa", "07-acceptance", "08-shared-core",
"09-ops", "10-iteration"]
# Chapter -> keywords that chapter must carry for the GitHub guarantee
# the body claims is "同样写进了附录的协调员、客户端、验收章节".