Repository navigation
feat(docs): add unified documentation synchronization sentinel and automated CI checks - #101
Merged
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
fedem95
approved these changes
Oct 10, 2026
fedem95
left a comment
Contributor
There was a problem hiding this comment.
Approving. Tooling and docs only (no change under OWNd/). Merged locally into current master: sync_documentation.py --check exits 0 and the suite passes (1300). CI green.
Two notes:
--checkdoesn't callverify_who_catalog_coverage(), and the table is built from the fixedWHO_DEFINITIONS, so a registered WHO without a definition is silently left out of the README. Onlytest_who_catalog_dispatch_coveragecatches it. Merging #100 on top as a test:--checkstill exits 0 with no WHO 6/8 rows, and that test fails with "WHO 6 / WHO 8 registered in _COMMAND_DISPATCH but not mapped in WHO_DEFINITIONS". So #100 will need two definitions, and it may be worth running the coverage check from--checktoo.- Only
_COMMAND_DISPATCHis checked. Event-only WHOs (0 and 9:OWNScenarioEvent,OWNAuxEvent) have no row of their own;OWNScenarioEvent(WHO 0) is listed under WHO 15.
Contributor
Author
|
Addressed in #105:
|
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.
Problem
The README has three tables that describe the code: gateway profiles, the WHO subsystem catalog and the per-module coverage table. They were kept up to date by hand, or by two separate helper scripts that nobody had to run. CI checked none of them, so they drifted:
OWNSceneEvent, althoughOWNSceneCommandexists and is exported.canonical_profiles()defines 14.Solution
New script:
scripts/sync_documentation.py. It regenerates each table from the code and writes it between its README markers:START/END_GATEWAY_PROFILES_TABLEOWNd.profiles.canonical_profiles()START/END_WHO_CATALOG_TABLE(new markers)_COMMAND_DISPATCH/_EVENT_DISPATCH, plus explicit classes for WHO 3, 15, 16 and 25. Every class must exist inOWNd.message.__all__, otherwise the script fails.START/END_COVERAGE_TABLE+coverage.svgcoverage.xmlIt has two modes:
python scripts/sync_documentation.pyrewritesREADME.mdandcoverage.svgin place.python scripts/sync_documentation.py --checkchanges nothing. It exits 0 when everything is in sync. It exits 1 with a unified diff on drift, on a stalecoverage.svg, or on CRLF line endings in the README. Ifcoverage.xmlis missing, it skips the coverage check.Other changes
qualityjob runssync_documentation.py --check. That job does not buildcoverage.xml, so CI enforces the profiles and WHO tables only. The coverage table and badge are still refreshed locally.OWNSceneCommandto WHO 17, lists all 14 profiles and removes the release-specific wording.update_readme_profiles.pynow imports the table builder and markers from the new script instead of keeping its own copy.update_readme_coverage.pygets the same profiles note.Testing
tests/test_sync_documentation.pyadds 13 tests:__all__raises an errorverify_who_catalog_coverage(): every WHO key in_COMMAND_DISPATCHhas a row in the catalog--check, CRLF detection, missingcoverage.xmlLocal results:
ruff check OWNd tests setup.py scriptsmypy OWNd tests/typingpython scripts/verify_library_standards.pypython scripts/sync_documentation.py --checkpytest tests/All CI checks pass, including the MyHOME test suite and the golden corpus gates.
Traces
No traces are needed. The PR changes documentation and tooling only. It changes no frame parsing, no command building and no gateway behaviour.