Repository navigation
docs: add deterministic drift checks - #1096
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 8:35 AM ET / 12:35 UTC. ClawSweeper reviewWhat this changesThis PR adds a Markdown-aware documentation drift checker, selected configuration-to-prose contracts, fixtures, and a new static-check command. Merge readinessKeep open for a maintainer decision on whether selected production values should become a permanent static CI contract; no discrete implementation defect was found in the current-head patch. Priority: P3 Review scores
Verification
How this fits togetherRepository documentation and selected operational configuration feed a read-only static checker. Its result joins the existing static CI lane and can block changes whose declared documentation contracts drift. flowchart LR
Docs[Repository documentation] --> Parser[Markdown-aware checker]
Config[Selected operational configuration] --> Manifest[Declared prose contracts]
Manifest --> Parser
Parser --> Static[Static check command]
Static --> CI[CI pass or drift report]
Decision needed
Why: This choice permanently changes what CI is allowed to reject. VISION.md directs agents to avoid pinned-text tests where review can provide the needed judgment, while the PR proposes selected value locks. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the parser and source-to-prose checks, but land fixed configuration expectations only if the responsible maintainer explicitly wants those values governed as static CI policy. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a new validation capability rather than repairing a reported runtime bug; its current-head terminal trace does show the checker and fixtures running successfully. Is this the best way to solve the issue? Unclear: the parser and proof are coherent, but a maintainer must decide whether literal configuration expectations are appropriate CI policy rather than source-to-prose validation alone. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2f547841c459. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
e3614fe to
8842fb8
Compare
9161431 to
9ee3ce4
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
1 similar comment
|
@clawsweeper re-review |
Summary
Problem
CSW-114 found that documentation drift was being caught only by manual audits. The repository had no deterministic gate for case-sensitive paths, stale commands, missing anchors, renamed workflows, or selected production configuration claims. That allowed confirmed stale statements to persist across scheduler, publication, repair, and contributor documentation.
Implementation
scripts/check-docs.mjsinventories tracked/staged repository paths and checks evergreen Markdown without treating unrelated untracked files as valid targetsmarkdown-itsupplies CommonMark-aware tokens for links, images, reference definitions, headings, inline code, fenced code, and indented codeconfig/documentation-sync.jsondeclares selected source-to-prose contracts for production publication settings and target close policytest/check-docs.test.tsproves passing and failing fixtures for path case, anchors, directory READMEs, multiline locations, code spans/blocks, pnpm commands, workflows, untracked files, config claims, escaped heading text, and full URI-scheme syntaxcheck:docsis included in the existingcheck:staticCI pathCurrent-main reconciliation
After #1095 merged, the two original drift-check commits were replayed onto current main
2f547841c459886f78c5e3d3d28ebf781f2d78be. Conflicts were limited to publication prose changed by #1092/#1094. Resolution preserved source fallback values 4/24/48 and production values 8/32/40, and updated the new sync manifest from obsolete fixed-50 expectations to current minimum/base/maximum 8/32/40 claims. No workflow file, gate, queue, deployment, or production-state change is included.Validation
At exact head
9ee3ce44a1aa43e6165ca886b729e3ac5873fe1b:corepack pnpm install --frozen-lockfile— pass, pnpm 11.10.0corepack pnpm run check:docs— pass;Documentation checks passed.node --test test/check-docs.test.ts— pass, 12/12oxfmt --check— passoxlint— passcorepack pnpm run check:active-surface— passcorepack pnpm run check:dashboard-queue-boundary— passcorepack pnpm run check:limits— passcorepack pnpm run build— passgit diff --check origin/main...HEAD— passThe aggregate local
check:staticreaches the existing Windows checkout CRLF formatter baseline across hundreds of untouched files; all changed files format cleanly. Hosted Linux CI is the authoritative aggregate static/check run for this exact head.Real Behavior Proof
pnpm run check:docs, tracked/staged inventory, parsed Markdown validation, command/path validation, current 8/32/40 config manifest, and all focused fixtures.provider=aws, runrun_ea6fde619f0a, leasecbx_20eb68741e5a(swift-hermit-f818),c7a.8xlarge, Ubuntu 26.04 target; exact public-PR checkout via--fresh-pr 1096; no secrets.Documentation checks passed.; focused tests passed 12/12; Crabbox exited 0 and stopped the lease.test/check-docs.test.ts; exact trace:Review closeout
Rebase review found one actionable P2: external URI schemes containing RFC-valid
+,., or-characters could be misclassified as repository-relative links. The scheme matcher now accepts[a-z][a-z0-9+.-]*:and a dedicated fixture covers all three characters. Focused proof was rerun at 12/12.Dirty-patch review confirmed the URI fix and coverage. Final committed review against
origin/mainreported the checker, configuration manifest, tests, and documentation updates internally consistent with no actionable correctness regressions.OpenClaw Bay impact
No Bay behavior or contract changes. This PR adds a read-only repository checker and binds existing publication/dashboard prose to current configuration; it does not change the Bay route, six-lane projection, stage mapping, public fields, navigation, or observer-only control boundary. No Bay code, documentation, screenshot, or runtime proof update is required.
Risks and rollout
check:staticintentionally blocks future CI when covered docs driftmarkdown-itis a new development-only dependency used by the static checkerRelated work