tools: dist export no longer cuts the dist export record out of the shipped tools/CONTRACT.md (#121)
Files changed: - CHANGES.md - VERSION - tools/CONTRACT.md - tools/chemenu/commands/dist_cmd.py - tools/chemenu/tests/test_docs_verify.py
This commit is contained in:
1 parent
5ffab3accf
commit
2a60f3a265
5 files changed
+28
-4
No files matched your search
@@ -585,7 +585,7 @@ def _write_plan(target: Path, plan: dict[str, PlannedFile]) -> None:
|
||||
),
|
||||
notes="Write a contentless, distributable copy of this repo's machinery into an empty "
|
||||
"`<target>` directory: `AGENTS.md`/`README.md`/`EVALS.md` with any "
|
||||
"`<!-- dist:strip-start -->...<!-- dist:strip-end -->` region removed, `instructions/` "
|
||||
"`dist:strip-start`...`dist:strip-end` marker region removed, `instructions/` "
|
||||
"(minus `instructions/dev/`), `types/` (the `root: kb` page type-specs and their schemas "
|
||||
"re-keyed as `.template`, the stack's own verbatim), `docs/` verbatim, `tools/` (no "
|
||||
"venv/caches), the `.github/hooks/`+`.vibe/` session-tracing config plus "
|
||||
|
||||
@@ -107,6 +107,18 @@ def test_the_real_commands_region_is_current():
|
||||
assert docs_verify.check_commands_region() == []
|
||||
|
||||
|
||||
def test_the_commands_region_survives_dist_export_unchanged():
|
||||
"""`dist export` removes `dist:strip` marker spans from shipped files, so a
|
||||
record whose prose quotes the literal marker pair gets cut in the
|
||||
exported `tools/CONTRACT.md` - and the fresh instance's own `docs verify`
|
||||
then reports its generated region stale. That is what failed CI's
|
||||
fresh-instance step the first time this region shipped; this pins it
|
||||
without needing the full replay."""
|
||||
plan = dist_cmd.build_plan()
|
||||
shipped = plan["tools/CONTRACT.md"].content
|
||||
assert shipped == (config.ROOT / "tools" / "CONTRACT.md").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_every_registered_commands_flags_are_documented():
|
||||
"""Forward direction against the real tree and the real Click app: every
|
||||
non-hidden flag of every command must appear in its cli_contract
|
||||
|
||||
Reference in new issue
Block a user