Skip to content

ci: enforce example-docs sync and mirror 4-phase workflow - #46

Merged
yeongseon merged 2 commits into
mainfrom
ci/docs-sync-gate
Aug 13, 2026
Merged

ci: enforce example-docs sync and mirror 4-phase workflow#46
yeongseon merged 2 commits into
mainfrom
ci/docs-sync-gate

Conversation

@yeongseon

Copy link
Copy Markdown
Contributor

Summary

Adds enforcement so implementation, tests, and docs stay in sync — the governance gap identified in #44. Prevents recurrence of the drift fixed in #42.

Changes

  • scripts/check_docs_sync.py (new) — wired as the Docs sync gate CI job:
    • BLOCKING: every example directory (immediate subdir of quickstart/, migration/, templates/, performance/, fundamentals/) must be referenced in README.md.
    • WARNING (non-blocking): examples with no expected/ golden file or tests/ suite are flagged so the coverage backlog can be paid down incrementally.
    • Core logic is covered by doctests, run as a CI step.
  • scripts/docs-sync-allowlist.txt (new) — coverage-warning exceptions with recorded reasons (the three non-deterministic performance/ benchmarks).
  • CONTRIBUTING.md — mirrors the 4-phase workflow (previously only in AGENTS.md, invisible to human contributors) and documents the gate.
  • .github/pull_request_template.md — adds explicit tests updated and docs updated checkboxes.

Verification

  • python3 scripts/check_docs_sync.py → exit 0 (all 26 examples documented; 11 coverage warnings, non-blocking).
  • python3 -m doctest scripts/check_docs_sync.py → passes.
  • ruff check / ruff format --check on the script → clean.
  • ci.yml parses as valid YAML.

Closes #44

Add scripts/check_docs_sync.py, wired as the 'Docs sync gate' CI job, to
prevent recurrence of the drift fixed in #42:
- BLOCKING: every example directory must be referenced in README.md.
- WARNING: examples without an expected/ golden file or tests/ suite are
  flagged (non-blocking) so the coverage backlog can be paid down; intentional
  exceptions live in scripts/docs-sync-allowlist.txt.

Mirror the 4-phase workflow (previously only in AGENTS.md) into CONTRIBUTING.md
and add explicit 'tests updated' and 'docs updated' checkboxes to the PR
template, so human contributors see the same code+tests+docs-together rule.

Closes #44
Harden find_untested() so a file named expected or tests cannot be mistaken
for a coverage directory (Oracle review follow-up).
@yeongseon
yeongseon merged commit f8dc2bb into main Aug 13, 2026
7 checks passed
@yeongseon
yeongseon deleted the ci/docs-sync-gate branch August 13, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: enforce impl+tests+docs-together rule (currently declared but not enforced)

1 participant