feat: CI-enforced doc drift merge gate (#117/#141)#142
Merged
Conversation
Implements approved v3 spec from issue #117: - tools/validate_doc_drift_gate.py: validates PRs against authority registry - Check A: canonical doc changes require reconciliation packet or exemption - Check B: authority transitions require approval evidence URL - Check C: derived surfaces must be fresh when canonical docs change - Check D: emergency manual repairs need follow-up issue URL - .github/workflows/doc_drift_gate.yml: CI workflow running on PRs touching docs/ - tests/test_doc_drift_gate.py: 12 test cases covering all gate checks Parent Hermes fixes: - classify_file: paths listed as derived_surfaces classified as derived, not canonical - check_derived_freshness: exclude reconciliation packet paths from canonical_changed - check_emergency_repair: derived files updated with canonical sources are normal, not emergency All 12 tests passing.
- Critical: workflow base-ref handles push events (github.base_ref empty on push) - Warning: remove dead has_valid_packet variable - Warning: emergency repair check uses per-file source check instead of global Tests: 12/12 passing.
8 tasks
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.
Objective
Implements the approved v3 spec from #117 — CI-enforced documentation drift control.
What changed
New files
tools/validate_doc_drift_gate.py(719 lines) — Validator that checks PRs againstconfig/docs/authority_registry.yaml:reason: otherrejected)pending).github/workflows/doc_drift_gate.yml— GitHub Actions workflow running the validator on PRs/pushes touchingdocs/**orconfig/docs/**. Handles both PR and push events.tests/test_doc_drift_gate.py(361 lines) — 12 test cases covering all gate checks + edge cases. All passing.Parent Hermes fixes (post-EA implementation)
classify_file: paths listed asderived_surfacesby any group are classified as derived, not canonicalcheck_derived_freshness: excludes reconciliation packet paths from canonical checkcheck_emergency_repair: derived files updated alongside canonical sources are normal regeneration, not emergencyEA review fixes (AMEND → fixed)
base-refhandles push events wheregithub.base_refis emptyhas_valid_packetvariableVerification
EA dispatch evidence
Control plane
Non-goals