Skip to content

fix(ci): restore CI on docs-only changes to protect documentation contracts - #142

Merged
seonghobae merged 1 commit into
mainfrom
fix/paths-ignore-doc-contract-safety
Sep 3, 2026
Merged

fix(ci): restore CI on docs-only changes to protect documentation contracts#142
seonghobae merged 1 commit into
mainfrom
fix/paths-ignore-doc-contract-safety

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Safety issue

.github/workflows/ci.yml's paths-ignore: ["docs/**", "*.md"] (added in
#141 to reduce org-wide Actions queue congestion) makes the
account-unification-tests job — which runs
tests/test_documentation_contract.py — skip entirely on docs-only PRs.

That suite reads the content of docs/PRD.md, docs/TRD.md,
docs/ERD.md, docs/TRACEABILITY.md, docs/adr/*.md, README.md,
CHANGELOG.md, and other canonical documents and asserts specific
required text is present (RFC citations, ADR cross-links, PR-integration
notes, etc.) — this repo's own instance of the "contract tests pin
workflows AND prose" pattern that ContextualWisdomLab/.github documents
for itself. With the paths-ignore in place, a docs-only PR that silently
broke one of these assertions would never be caught by CI.

Why revert instead of narrow

The checked/unchecked paths crisscross within the same directories:

  • docs/adr/all 10 files are contract-checked (8 governing ADRs +
    0013-mcp-oauth-client-authorization.md + the README.md index).
  • docs/doctoring/ — only 2 of 11 files are checked
    (product-technical-gap-baseline.md, mcp-oauth-authorization.md).
  • top-level docs/*.md — 9 of 16 are checked (PRD, TRD, ERD,
    TEST_STRATEGY, THREAT_MODEL, TRACEABILITY, UML, OPERABILITY,
    product-technical-gap-baseline.md); 7 aren't.
  • root *.md — 6 of 7 files are checked (README, CHANGELOG,
    DOCUMENTATION, ARCHITECTURE, AGENTS, CLAUDE); only SECURITY.md
    isn't.

REQUIRED_DOCUMENTS/GOVERNING_ADRS in the test file are easy to extend
without anyone remembering to also update a separate workflow
paths-ignore list — a narrowed allowlist would just reintroduce the
same silent gap the next time a document joins the contract. Reverting
the trigger paths-ignore in ci.yml is the safe default here.

codeql.yml's paths-ignore is left untouched: CodeQL scans code, not
docs, and doesn't execute this test suite, so it isn't a doc-currency
mechanism and the original congestion-reduction rationale still holds
for it.

Other doc-currency mechanisms checked

Searched the full repo for any other test/workflow reading doc content
(rg across all file types, plus explicit checks of test_links.py,
test_deployment_contracts.py, test_implementation_completeness.py,
and every .github/workflows/*.yml for a docs-build/lint/link-checker
step). None found — tests/test_documentation_contract.py is the only
mechanism, and it's now fully addressed.

Test plan

  • uv run --locked --project services/account_unification --extra dev pytest tests/test_documentation_contract.py -q — 7 passed (same
    command ci.yml runs)
  • uv run ruff check app tests tools — all checks passed
  • uv run interrogate . — 100% docstring coverage
  • python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))" — valid YAML
  • Diff confirms ci.yml's trigger block is now byte-identical to its
    pre-fix(ci): skip docs-only changes for ci and CodeQL workflows #141 state (commit 655ff06)

🤖 Generated with Claude Code


Devin Review

Summary by CodeRabbit

  • CI
    • 문서 및 Markdown 파일만 변경된 pull request에서도 CI가 실행됩니다.

…tracts

tests/test_documentation_contract.py reads the CONTENT of docs/PRD.md,
docs/TRD.md, docs/ERD.md, docs/TRACEABILITY.md, docs/adr/*.md, README.md,
CHANGELOG.md, and other canonical documents, asserting specific required
text (e.g. RFC citations, ADR links, PR-integration notes) — the same
"contract tests pin ... prose" pattern this org's own central .github repo
documents. PR #141's paths-ignore on ci.yml's push/pull_request triggers
made the account-unification-tests job (which runs this contract suite)
skip entirely on docs-only changes, so a docs-only PR that silently broke
one of these assertions would never be caught by CI.

The checked and unchecked paths crisscross within the same directories
(all of docs/adr/ is contract-checked, but only 2 of 11 files under
docs/doctoring/ are; 9 of 16 top-level docs/*.md files are checked and 7
aren't), and REQUIRED_DOCUMENTS/GOVERNING_ADRS are easy to extend without
anyone remembering to also update a separate workflow paths-ignore list.
A narrowed allowlist would reintroduce the same silent gap the next time
a new document join the contract. Reverting the trigger paths-ignore is
the safe default; codeql.yml's paths-ignore is untouched since CodeQL
doesn't execute this suite and isn't a doc-currency mechanism.

Verified: `uv run --locked --project services/account_unification --extra
dev pytest tests/test_documentation_contract.py -q` (7 passed), plus
ruff and interrogate, all green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@seonghobae
seonghobae merged commit 771224f into main Sep 3, 2026
15 of 19 checks passed
@seonghobae
seonghobae deleted the fix/paths-ignore-doc-contract-safety branch September 3, 2026 05:26

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: ae8b2d7a-f265-4b68-9b24-a25b22dab49c

📥 Commits

Reviewing files that changed from the base of the PR and between 55614b0 and 088c46a.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

Pull request 이벤트에서 docs/***.md 변경을 제외하던 조건을 제거했습니다. 이제 모든 pull request 변경이 CI 실행 대상입니다.

Changes

CI 트리거 업데이트

Layer / File(s) Summary
Pull request 경로 필터 제거
.github/workflows/ci.yml
paths-ignore 조건을 제거했습니다. 문서 및 Markdown 파일 변경에서도 CI가 실행됩니다.

Estimated code review effort: 1 (매우 낮음) | ~2분

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/paths-ignore-doc-contract-safety

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant