Fix doc inconsistencies + implement US3 migration-safety comparison#1
Merged
Conversation
- tasks.md: correct the summary count (20 done / 14 remaining, was 8/26) - quickstart.md: repoint the plan reference to specs/ and add the real docs/onboarding.md entry point (was dangling); 3.11 -> 3.9.x - plan.md / research.md: devcontainer pins the Python feature to 3.9.4 (was described as a "3.11 image"); rejected-alternative mentions left intact - add docs/onboarding.md (satisfies SC-007) and wire it into the MkDocs nav
Catch schema-valid-but-different output against a known-good reference (FR-015, SC-005). - compare.py: canonicalising comparison. Equality key uses C14N with rewrite_prefixes (prefix/attribute/whitespace/comment-insensitive); the diff renderer strips namespaces for a readable, prefix-independent unified diff. Pure functions shared by CLI and tests. - cli.py: implement `compare <generated> <reference>` (exit 0 = clean match, 1 = difference or IO/parse error) with required typed positionals. - Makefile: wire `make compare` with overridable COMPARE_GENERATED / COMPARE_REFERENCE. - examples/reference/trial_known_good.xml: shipped placeholder known-good reference, serialised with a ds: prefix to demonstrate cosmetic-difference tolerance. - tests/integration/test_compare.py + reference_path fixture: cosmetic-ignored (attr order, whitespace, prefix, comments), schema-valid-but-different surfaced, and CLI exit codes. - docs: mark compare done (tasks.md, commands.md, onboarding.md); add how-to guide + nav.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related pieces of work on the Codespace XML-pipeline scaffold:
compare(tasks T021–T023) — diff freshly generated XML against a known-good reference and catch the schema-valid-but-different case (FR-015, SC-005).This advances the task list from 20/34 → 23/34 complete. Remaining: US5 (generated schema docs/ERD) and US4 (bundle + CI drift gate).
1. Doc fixes
tasks.md: the summary count was stale (8 done / 26 remaining) — corrected to match the body.quickstart.md: pointed contributors atdocs/onboarding.mdanddocs/delivery-plan.md, neither of which existed. Repointed the plan reference tospecs/, and added a realdocs/onboarding.md(satisfies SC-007) wired into the MkDocs nav.3.11references where the project pins 3.9.4 (the devcontainer feature, quickstart prerequisites, plan/research). Rejected-alternative mentions of 3.11/3.12 left intact.2. US3 —
comparesrc/acoustic_dataset/compare.py— canonicalising comparison. The equality key uses C14N withrewrite_prefixesso attribute order, whitespace, namespace prefix, and comments are cosmetic; the diff renderer strips namespaces for a readable, prefix-independent unified diff. Pure functions shared by the CLI and tests.cli.py—compare <generated> <reference>: exit0= clean match,1= meaningful difference (prints the diff) or IO/parse error.Makefile—make comparewith overridableCOMPARE_GENERATED/COMPARE_REFERENCE, defaulting to the pipeline output vs the shipped reference.examples/reference/trial_known_good.xml— a labelled placeholder known-good reference, serialised with ads:prefix to prove cosmetic-difference tolerance.tests/integration/test_compare.py— cosmetic-ignored (attribute order, whitespace, prefix, comments), schema-valid-but-different surfaced (an in-bandLevelchange), and the CLI exit-code contract.comparedone intasks.md/commands.md/onboarding.md; added a how-to guide and nav entry.Demonstration
Verification
pytest— 27 passed (was 16; +11 for compare)ruff check src tests— cleanmypyon the new modules — cleanmkdocs build --strict— clean (no broken links)https://claude.ai/code/session_01CFHWZFcZ3ecni6bzZ2AXdq
Generated by Claude Code