Skip to content

Validator: recognize .md doc ids, suppress ignored amendment rows by default, and add canonical-code metadata to many charters#63

Merged
CAM-Initiative merged 5 commits into
mainfrom
codex/add-canonical-code-declarations-for-families-yerfmc
May 17, 2026
Merged

Validator: recognize .md doc ids, suppress ignored amendment rows by default, and add canonical-code metadata to many charters#63
CAM-Initiative merged 5 commits into
mainfrom
codex/add-canonical-code-declarations-for-families-yerfmc

Conversation

@CAM-Initiative
Copy link
Copy Markdown
Owner

Motivation

  • Improve cross-document § reference parsing to accept doc ids with optional .md extensions and common punctuation/spacing variants to reduce false negatives.
  • Treat annex placeholder forms (e.g. Annex [x]) as manual-review cases rather than blocking or silently matching.
  • Reduce noise in validator output by hiding amendment-register ignored rows by default while preserving the ability to show them with a flag.
  • Publish source-authoritative "Canonical Code Status" and related metadata/ledger entries across multiple charter and schedule Markdown files and update the registry index versions.

Description

  • Update validate_markdown_section_refs.py to use a DOC_ID_WITH_EXT_RE that accepts optional .md, broaden DOC_BEFORE_SECTION_RE/CROSS_DOC_AFTER_RE/PHRASE_DOC_SECTION_RE to handle punctuation/spacing, and ensure returned doc ids use the named capture doc_id.
  • Add logic to classify annex-placeholder patterns as manual_review with a label Annex [x] when an explicit doc id plus an Annex placeholder is present.
  • Change filter_display_findings and main to suppress IGNORED_STATUSES by default, add a --show-ignored CLI flag to restore display, and print a SUPPRESSED_IGNORED_ROWS summary when rows are hidden.
  • Update tests in .github/scripts/tests/test_validate_markdown_section_refs.py to reflect the suppressed-ignored behaviour, and add tests covering CAM doc id variants and annex/placeholder cases.
  • Add "Canonical Code Status" sections, renumbering and metadata updates, amendment-ledger entries, and minor provenance/metadata edits across many Governance/* Markdown files, and increment versions/pinned_sha/updated timestamps in constitution.index.json to reflect the content changes.

Testing

  • Updated and ran the validator unit tests in .github/scripts/tests/test_validate_markdown_section_refs.py with pytest and confirmed the test suite for the validator changes passes.
  • Exercised new cases for cross-document variants and annex-placeholder handling via added unit tests, which assert the validator returns pass_cross_document, manual_review variants, and that ignored amendment-register rows are suppressed by default; all assertions passed.
  • Verified CLI behaviour: --show-ignored restores suppressed rows and the summary line SUPPRESSED_IGNORED_ROWS is emitted when suppression occurs during test runs.

Codex Task

@CAM-Initiative CAM-Initiative merged commit e3b1887 into main May 17, 2026
@CAM-Initiative CAM-Initiative deleted the codex/add-canonical-code-declarations-for-families-yerfmc branch May 17, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant