ci(make): run the docs-integrity gate inside make ci - #403
Conversation
GitHub CI's `docs-gate` job runs `make test-docs-check` and `node scripts/check-docs.mjs`, but the local `make ci` gate ran neither, so an unindexed doc, a dead relative link, or a broken conformance alias passed the local gate and only failed after a pull request was already open. Run both from the `ci` recipe, right after `verify-static` so the cheap checks still fail first, and guard the wiring with a focused contract test that reads the `ci` recipe out of the Makefile and fails if either invocation is dropped, moved after the "CI gate passed" line, or has its exit status swallowed. Update AGENTS.md's two `make ci` descriptions so they still enumerate what the target actually runs. Node >= 20 was already listed as a prerequisite for the docs-integrity gate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UigLsmd17TVDuaaSN4yfdU
There was a problem hiding this comment.
Pull request overview
Adds the docs-integrity checks to the canonical local CI gate.
Changes:
- Runs docs checker self-tests and integrity validation in
make ci. - Adds a contract test guarding both invocations and failure propagation.
- Updates contributor guidance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Makefile |
Adds docs checks to ci. |
updex/makefile_ci_docs_gate_contract_test.go |
Guards the CI recipe contract. |
AGENTS.md |
Documents the strengthened gate. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| formatting, lint, docs integrity (the same `make test-docs-check` and | ||
| `node scripts/check-docs.mjs` the `docs-gate` CI job runs, so it needs Node.js | ||
| too), non-E2E unit and race tests, the separate black-box E2E |
There was a problem hiding this comment.
Confirmed, and the finding is correct on both counts at head 5ac9b99:
docs/design/overview.md"CI and Releases" (lines 583-592) enumerates themake cistages as verify-static -> coverage -> E2E -> race -> cross-build.grep -n 'docs-integrity\|check-docs' docs/design/overview.mdreturns nothing, so the file never mentions the two steps this PR inserts.docs/specs/pr-review-rubric.md:24("Build gate green") likewise enumeratesmake cias tidy, vet, gofmt, golangci-lint, non-E2E unit tests, coverage gate, race, cross-build. The separate "Docs-integrity gate green" row namesnode scripts/check-docs.mjsbut not as part ofmake ci, so the enumeration is now incomplete.
This is a patch change, not a mechanical cure, so it cannot be pushed under the pr-cure item that surfaced this thread (Snowcat refuses a cure whose patch identity moved). I have queued a bounded pr-cure-change proposal against this same branch to update both passages to match the ci: recipe in the Makefile — nothing else in either file. Leaving this thread unresolved until that lands.
Summary
GitHub CI's
docs-gatejob (.github/workflows/test.yml) runsmake test-docs-checkandnode scripts/check-docs.mjs, but the localmake cigate ran neither. An unindexed doc, a dead relative link, or abroken conformance alias therefore passed the local gate and only surfaced
after a pull request was already open — the local signal was strictly weaker
than the one CI enforces.
This wires both invocations into the
cirecipe, immediately afterverify-staticso the cheap static checks still fail first and the docs gateruns long before the coverage/E2E/race/cross-build steps. A focused contract
test (
updex/makefile_ci_docs_gate_contract_test.go) reads thecirecipe outof the Makefile and fails if either invocation is dropped, moved after the
CI gate passedline, or has its exit status swallowed (-prefix or a||fallback). It reuses the
extractRecipehelper already inupdex/makefile_lint_guard_contract_test.go.make cibehavior is otherwise unchanged; no CI workflow, permission, orrelease path is touched. AGENTS.md's two
make cidescriptions are updated sothey still enumerate what the target actually runs. Node >= 20 was already
listed under Prerequisites for the docs-integrity gate, so no new tool
requirement is introduced beyond making
make cidepend on it.Checks
make fmt— code is formatted (gofmt -lon the new file is empty;make ci'sverify: gofmtstep passed)make ci— tidy, vet, gofmt, lint (.golangci.yml2.13.1), the newdocs-integrity steps, unit tests, the coverage floor
(
make test-coverage-checkthenmake coverage-check), E2E, race tests,linux amd64/arm64 builds. Full run exit status 0:
E2E suite still ran green as part of
make ciabove.guard was mutation-tested against three regressions of the recipe:
Risk classification
Rationale:
make cigate's composition changes (it now hard-requires Node andfails on a docs-integrity finding), so this is not a behavior-free
documentation or test-only change; no product runtime behavior, security
control, trust boundary, or release path is affected, and no
protected_boundariespath inpolicies/agent-governance.json(
.github/workflows/**,.goreleaser.yaml,.svu.yaml,sysext/**,systemd/**,download/**) is touched. The change only strengthens a gate —nothing in
never_relaxis weakened. Per the higher-plausible uncertaintyrule in
docs/risk-tiers.md, Tier 2 rather than Tier 1.Docs housekeeping
AGENTS.mdupdated for the workflow change (the twomake cidescriptions and the pull-request checklist step). No
README.md,docs/design/overview.md, ordocs/specs/*change is needed — noproduct behavior changed.
TEMPLATE.mdand indexed indocs/README.md— not applicable, no new docs.this closes a gap against the existing
docs-gatejob rather thandeciding anything new.
Verification
node scripts/check-docs.mjsgreen:and
make test-docs-checkgreen:PR review rubric