Repository navigation
fix(docs): match source anchor checks to published sections - #137157
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 7:19 AM ET / 11:19 UTC. ClawSweeper reviewWhat this changesReplaces the documentation anchor audit’s Mintlify subprocess with the shared publishing parser and redirect resolver, adds per-link diagnostics, and updates related timing tests. Merge readiness⛔ Blocked before merge - 2 items remain Keep open. The patch is a coherent root-cause repair and resolves the prior diagnostic findings, but the shared parser is explicitly synchronized to the separate documentation publisher and that consumer contract was not independently inspectable in this review; retain the PR for that maintainer verification. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw source documentation is copied into a separate publishing repository that renders docs.openclaw.ai. This PR changes the source-side audit so links and fragments are checked against the same parser and redirect contract intended for that publisher. flowchart LR
A[Documentation source] --> B[Shared publishing parser]
B --> C[Published page IDs and links]
A --> D[Source anchor audit]
B --> D
E[Redirect configuration] --> D
D --> F[Link diagnostics]
C --> G[Documentation publisher]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +55, Docs +2, Other -124. Total -67 across 9 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land one canonical parser-and-redirect contract only after an independent check confirms the publisher consumes this exact default string-link interface unchanged. Do we have a high-confidence way to reproduce the issue? Yes. The new CLI fixtures provide a high-confidence source reproduction for false fragment acceptance, malformed URL reporting, and per-occurrence locations, although this read-only review did not execute them. Is this the best way to solve the issue? Unclear. Reusing the source-owned parser and redirect resolver is the best architectural direction, but the separate publisher consumer must still be independently confirmed against this exact interface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a6dc9a744284. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
c8e16ad to
47daf23
Compare
|
Reviewed the permalink finding and rank-up moves. Not accepting the proposed alias mapping: the premise is contradicted by the actual publisher, which the review environment could not inspect. In deployed collectPages, I executed the actual publisher builder → R2 manifest → Worker fixture with a physical page containing Both suggested rank-up changes are therefore skipped as written: accepting that invented alias would recreate the false greens this work removes. Instead, the regression now uses a real existing fragment on an unpublished route, asserts the missing-route diagnosis, and documents the owner boundary. The stronger audit suite passes 17/17. The production proof covers the DNS/evidence-access limitation. CI follow-through: the local node-host lint repair was verified, then dropped after main landed a broader test split. Later runs exposed two stale strict expectations, in the gateway tool and |
47daf23 to
c9a0339
Compare
|
Land-ready on a17a286dc219d7037d84084219395fba7c976c8d. Exact-head CI 33748267881, attempt 1, succeeded. The required openclaw/ci-gate passed; the rollup has 112 passing checks, 43 skips, no failures and no pending checks. This supersedes the earlier paused/prepared heads; their CI/preparation is not reused. The command-construction CI defect is repaired at the test's owning boundary, not hidden with retries or longer deadlines. Its old SDK fixture bypassed the supervisor, and its PID wait raced cold preparation/execution. The real process-backend route now proves actual admission, a live child and blocked secret delivery before advancing the unchanged deadline. It requires The latest exact-head ClawSweeper review reports no actionable code/security findings. Its remaining publisher-verification request and rank-up move are fulfilled by direct consumer inspection and exact parser/full-build evidence, not by accepting an uninspected risk. The parser/audit bytes are unchanged from that full-build head. The default publisher string-link API, rendered HTML, IDs, hrefs and collisions are identical across 760 inputs; seven publisher boundary tests pass. The real source-sync build produced 14,934 pages and 85,003 R2 objects with full smoke success. The ten production browser flows remain recorded. Fresh complete-candidate Codex autoreview is scoped-clean at its configured P0-only threshold. The earlier diagnostic/wording findings were independently reproduced and repaired. Exact commands and all before/after evidence are in the PR body. Native review artifacts are refreshed for this head before prepare/merge. Production/tooling net −124; tests/support net +55; docs net +2. Fourteen genuine source-content findings remain visible, not suppressed or represented as a green full anchor audit. The separate authored-page repair and generated mirror output remain untouched. Normal sync after merge will publish the diagnostic helper and testing-guide wording; this comment does not claim that final sync has already happened. |
Use the shared publishing parser and redirect contract for source link validation while preserving literal published IDs and emitted compatibility aliases. Remove the Mint subprocess and duplicate anchor projection. Activation is staged after renderer deployment and production verification. Context: #137032
Document that only actual pages and configured redirects prove fragment targets. Strengthen the unpublished-permalink fixture with an existing fragment, matching the real publisher/R2/Worker route contract rather than the legacy permissive audit inventory.
Carry per-occurrence source provenance through shared preprocessing without changing the publisher string-link contract or rendered output. Normalize internal URLs once with Result, report malformed paths without aborting, and leave external redirect fragments to their owner. Correct Docs sanity guidance. Regression proof covers protected literals, references, components, CRLF, encoded paths and external redirects; 760 publisher inputs remain byte-identical.
|
Maintainer verification for the remaining renderer-compatibility question is complete; this is not acceptance of an uninspected compatibility risk. I directly inspected the deployed publisher path: mdx-ish imports the source-owned module, constructs it with The exact repaired parser was delivered into a full isolated publisher tree by the real source-sync script. Source and generated fixture copies both hash to SHA-256 The prior normal deployment and ten production browser flows remain recorded. The new diagnostic module will be normally synced after source landing; it is not mislabeled already deployed. The remaining landing blocker is CI's independent command-construction timing test, which is being repaired without changing production timeout semantics. |
Exercise the registered process backend through agent exec rather than the plugin-owned SDK path. Observe real supervisor admission and child readiness before advancing the original execution deadlines; retain blocked secret delivery and PID cleanup proof. Repair the same ordering in service lifecycle timeout tests without runtime changes or larger budgets.
df8afb4 to
a17a286
Compare
|
Merged via squash.
|
* commit '13b1f71c7010baaf2394555198e2fc04bef03586': (283 commits) fix(ui): retire stale MCP feedback across context changes (#128490) fix(agents): clarify set-identity workspace output (#126320) fix(auth): preserve OAuth metadata during session SDK refresh (#127988) fix(agents): recover catalog worker after generation mismatch (#127712) fix(memory-wiki): reject out-of-range claim confidence (#125656) ci: remove redundant contract runs and costly test work (#137220) fix(release): assert the Codex CLI pin the candidate declares (#137136) test(voice-call): reuse shared guards and deferred gates (#137262) fix(cron): isolate scheduler-disabled shared-store writes (#131733) fix(telegram): surface allowed custom reactions in react guidance (#129817) test(infra): reuse the shared npm call presence guard (#137254) fix: generated images disappear after failed tool calls (#131226) fix(docs): match source anchor checks to published sections (#137157) fix(backup): preserve audit capture across slow snapshots (#130962) fix(release): preserve legacy gh log reads (#137016) fix(memory-core): make forget rewrites atomic (#131383) fix(agents): write settings atomically (#131431) fix(plugins): keep the memory indexing runtime with the selected slot owner (#131779) fix(ci): pin iOS screenshot evidence to workflow revision (#136334) test(logging): remove redundant stderr spy casts (#137238) ... # Conflicts: # scripts/e2e/lib/codex-release-package-assertions.mjs
…#137157) * fix(docs): audit emitted section targets instead of Mint guesses Use the shared publishing parser and redirect contract for source link validation while preserving literal published IDs and emitted compatibility aliases. Remove the Mint subprocess and duplicate anchor projection. Activation is staged after renderer deployment and production verification. Context: openclaw#137032 * test(docs): pin published route ownership Document that only actual pages and configured redirects prove fragment targets. Strengthen the unpublished-permalink fixture with an existing fragment, matching the real publisher/R2/Worker route contract rather than the legacy permissive audit inventory. * fix(docs): preserve link locations and report malformed targets Carry per-occurrence source provenance through shared preprocessing without changing the publisher string-link contract or rendered output. Normalize internal URLs once with Result, report malformed paths without aborting, and leave external redirect fragments to their owner. Correct Docs sanity guidance. Regression proof covers protected literals, references, components, CRLF, encoded paths and external redirects; 760 publisher inputs remain byte-identical. * test(process): synchronize construction timeout readiness Exercise the registered process backend through agent exec rather than the plugin-owned SDK path. Observe real supervisor admission and child readiness before advancing the original execution deadlines; retain blocked secret delivery and PID cleanup proof. Repair the same ordering in service lifecycle timeout tests without runtime changes or larger budgets.
Related: #137032
Support: #137038
Renderer: openclaw/docs#157
Production proof: openclaw/docs#157 (comment)
What Problem This Solves
Source anchor checks could accept nonexistent published sections or reject links that work on the live docs site. The independent Mintlify checker does not implement the publisher's heading, component, duplicate-ID, and HTML-alias redirect behavior. The replacement also needs reliable diagnostics: repeated links must identify their own source occurrences, and malformed URLs must not abort reporting for the rest of the document.
Why This Change Was Made
Use the same source-owned document/ID and redirect contracts consumed by the deployed renderer. This follows the approved support → renderer → audit rollout: support was normally synced, the renderer merged, and real production navigation passed before audit activation was published.
Delete the Mint subprocess, Node-version workaround, temporary anchor projection and obsolete tests rather than adding another guessed slugger. Keep external-link projection and canonical ClawHub mirroring intact. Literal IDs take precedence over one fragment decode; only real emitted aliases/components count as targets. Relative links use final published page URLs, and redirects follow the publisher's actual HTML-alias behavior.
Source-line provenance travels through shared preprocessing and existing MarkdownIt/htmlparser2 positions, before href normalization loses occurrence identity. An opt-in
mapLinkprojection preserves the publisher's default string-link API and avoids diagnostic tracking during ordinary publishing. URL construction/decoding has oneResultboundary: malformed internal paths become normal diagnostics, later links are still checked, and external redirect fragments are not checked against local pages.User Impact
Maintainers can trust
pnpm docs:check-links:anchorsto check actual published targets while preserving old heading URLs. Repeated/reference/component links report their own locations; unmapped snippet/embedded expansions reportunknown, not a guessed line. Author/testing guides describe the shared parser accurately. No product configuration, schema, protocol, dependency pin, runtime gateway behavior, or page-specific anchor rewrite changes are included.Evidence
831a0b636e82fef6c95b6bc34c854176d86f3ab6contains renderer merged309865b27755f63268824fbbb364cca71800da9. The earlier stale/skipped run was not counted as publication.URIErroror hide following findings. An executed regression also caught an external redirect whose pathname matched a local page; it no longer receives a false local-fragment diagnostic.node scripts/run-vitest.mjs src/scripts/docs-link-audit.test.ts test/scripts/docs-sync-publish.test.ts: 25/25 pass. Selected formatting, lint, types and repository guards pass.git diff --checkpasses.make docs-checkpassed: 14,934 pages built; 14,933 pages indexed in 21 languages; 85,003 R2 objects prepared; full smoke passed. Source indexing processed 17,923 of 34,123 files, with 97 large-file and 16,103 budget skips under existing limits. Source/generated parser SHA-256:162d4b5e8f383311517e5f8f07381afbfa890a145c07789a66f436946ae55118. This is candidate proof, not a claim that the latest diagnostic module is already deployed. Exact publisher-consumer inspection records the unchanged default string-link contract. No generated mirror file was hand-edited.fae070615057acd3d104c7c6dc2e8813ded9888c. Ordinary route audit: 8,044 links, zero failures. Full anchor audit: 8,327 links, 14 real source-content findings, intentionally exit 1. These are ten stale callers in the separate page-specific repair, one computer-use caller, and duplicate groupspodman-and-tailscale,surface-explorer, andproduct-areas. The latter four are a named source-owner follow-up. One conflictinggithub-actions-2alias is omitted to preserve its existing target owner.CI follow-through
Earlier CI exposed a node-host line-limit failure and two stale exact update-dispatch actor expectations. Their repairs are now on main; the redundant branch patches were dropped on rebase. The dispatch investigation verified all 24 production caller modules and 953 tests across 45 files without weakening assertions.
The next exact-head run failed the independent command-construction timing regression. It began a three-second PID wait before cold command preparation completed; its one-second execution deadline could fire before PID readiness. Its chosen Anthropic SDK backend also bypassed the supervisor/service relay that the regression purported to exercise.
The test-only repair uses the existing registered process-backend resolver and queue-admission hook, with the real command, supervisor, relay, anonymous pipe and child. An unread 8 MiB synthetic secret blocks construction. The test observes actual admission, a live child and
startingstate before advancing the original deadline: still starting at 999 ms,overall-timeoutat 1,000 ms, timeout envelope/exit 2 and PID death before fallback cleanup. Three sibling timeout cases use the same readiness ordering. No execution/readiness/cleanup budget increased; no production seam or behavior changed. The original case was moved, not duplicated.Before/after proof: original command file 1 failed/53 passed; repaired 54 passed. A controlled 600 ms child startup delay fails the original 500 ms sibling case and passes the repaired case with that same deadline. Against the exact pre-fix supervisor, both repaired construction tests fail at the intended
startingversusexited/overall-timeoutassertion; current production source was restored byte-for-byte. Combined adjacent proof: 161 tests across eight files passed. Final organized command proof: 54 tests across two files passed. Final changed gates pass. Timing repair alone: production 0; tests/support +204/-93 (net +111).Exact commands:
Separate test follow-up: replace fixed descendant lifetimes with explicit release gates in
preserves root-result timing while retaining descendant cleanup ownershipandflushes incomplete UTF-8 before exposing a root result with retained authority. Both passed; they test a different lifetime boundary and were not rewritten here.Review disposition
The initial permalink finding and its rank-up moves are not applied as proposed: they infer publication from the old auditor/i18n inventory rather than the real publisher.
collectPagesderives physical slugs,pageRouteuses locale plus slug, andwriteRedirectsconsumes declared redirects. Frontmatter-only permalinks do not emit aliases. The cited formal-verification value differs from its physical route only by a trailing slash and works live. Actual builder → R2 manifest → Worker proof: physical route/fragment = 200, distinct frontmatter-only route = 404, explicit redirect = 200. The source regression rejects/unpublished#connectiondespite that fragment existing on the physical page.The repeated-location, malformed-percent and Docs sanity findings are accepted and repaired. Positions are captured at the producer, malformed URLs do not abort, URI host ownership is preserved, and wording is corrected. Direct publisher inspection, byte-equivalence checks and full candidate/production proof address the review environment's DNS limitation and latest rank-up move; no uninspected compatibility risk is being accepted.
The full content anchor audit is not represented as green. Remaining findings are authored/generator defects, not phantom targets or parser/renderer disagreement. This rollout does not duplicate or overwrite the separate authored-page patch.