Skip to content

refactor(docs): require caller-owned route indexes - #143164

Merged
steipete merged 1 commit into
mainfrom
codex/refactor-docs-route-index-480
Sep 9, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/refactor-docs-route-index-480

Conversation

@steipete

@steipete steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The docs-link auditor retained a process-global index fallback after every caller moved to indexes owned by an individual audit. That unused path could build a different filesystem index from the one the caller was checking.

Why This Change Was Made

Require both redirect and route indexes at resolveRoute and remove the global cache and fallback loader. All existing callers already supply both indexes. This removes nine tooling lines and keeps one owner for each audit's route inventory.

The docs guide also now matches the existing auditor: declared ClawHub routes resolve without a local checkout, while anchor checks report their fragments as unverified until the ClawHub sources are available.

User Impact

CLI defaults, redirect handling and link-validation behavior are preserved. Contributor instructions accurately distinguish route checks from anchor verification.

Evidence

  • The same 33 existing owner tests passed before and after; no tests changed.
  • All 16 selected changed-file checks passed, including full scripts typechecking. The first attempt exposed missing dependencies in a partial worktree installation; one complete private frozen install resolved all diagnostics before the successful run.
  • Formatting and diff checks passed. Independent review found no actionable issues through P2.

@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Sep 9, 2026
@steipete
steipete marked this pull request as ready for review September 9, 2026 14:16
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 10:22 AM ET / 14:22 UTC.

ClawSweeper review

What this changes

The docs link checker now requires caller-supplied route and redirect indexes, and contributor guidance accurately explains ClawHub route and anchor checks.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, bounded cleanup, and no actionable correctness defect was found. Current main retains the fallback, and the maintainer-protected PR is not a cleanup-close candidate.

Priority: P3
Reviewed head: 1c9ae06bf0762cc4da42ff42efedc64545986a10

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable cleanup with compatible callers, accurate guidance, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies maintainer authorship, so the external-contributor proof gate does not apply; reported owner tests supplement source verification of this behavior-preserving refactor.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies maintainer authorship, so the external-contributor proof gate does not apply; reported owner tests supplement source verification of this behavior-preserving refactor.
Evidence reviewed 7 items Verified introduced change: The merge-base-to-head diff only removes the resolver's global fallback and updates docs guidance; unrelated base-branch changes are excluded.
All existing callers supply indexes: Both production calls, at lines 599 and 655, pass the audit's redirects and routes. The direct resolver test at src/scripts/docs-link-audit.test.ts:779 also supplies both. Route normalization, redirect traversal, and cycle detection remain unchanged.
Guidance matches existing behavior: Declared mirrored routes are accepted without local sources; anchor mode records their fragments as unverified, while plain mode ignores fragments. Existing tests cover these cases and reject undeclared ClawHub routes.
Findings None None.
Security None None.

How this fits together

The docs link checker reads documentation and navigation entries, resolves redirects against an audit-specific route inventory, and reports broken links or unverifiable fragments.

flowchart TD
  A[Documentation links] --> C[Docs link audit]
  B[Navigation and redirects] --> D[Audit route inventory]
  D --> C
  C --> E[Resolve route and redirects]
  E --> F[Optional anchor check]
  F --> G[Validation diagnostics]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs 0, Other -9. Total -9 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 2 2 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 13 -9
Total 2 6 15 -9

Review metrics

None.

Technical review

Best possible solution:

Keep each audit's route inventory explicitly owned by its caller and preserve the existing distinction between route validation and anchor verification.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this removes an unused internal fallback rather than repairing an observed runtime failure; all existing callers already provide both indexes.

Is this the best way to solve the issue?

Yes: requiring the existing caller-owned indexes removes a competing inventory path without changing supported CLI behavior or adding another abstraction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ff612431704a.

Labels

Label justifications:

  • P3: This is a small internal tooling cleanup and guidance correction with unchanged user-facing validation behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies maintainer authorship, so the external-contributor proof gate does not apply; reported owner tests supplement source verification of this behavior-preserving refactor.

Evidence

What I checked:

  • Verified introduced change: The merge-base-to-head diff only removes the resolver's global fallback and updates docs guidance; unrelated base-branch changes are excluded. (scripts/docs-link-audit.mts:376, 1c9ae06bf076)
  • All existing callers supply indexes: Both production calls, at lines 599 and 655, pass the audit's redirects and routes. The direct resolver test at src/scripts/docs-link-audit.test.ts:779 also supplies both. Route normalization, redirect traversal, and cycle detection remain unchanged. (scripts/docs-link-audit.mts:599, 1c9ae06bf076)
  • Guidance matches existing behavior: Declared mirrored routes are accepted without local sources; anchor mode records their fragments as unverified, while plain mode ignores fragments. Existing tests cover these cases and reject undeclared ClawHub routes. (scripts/docs-link-audit.mts:600, 1c9ae06bf076)
  • Current main still needs the cleanup: Fetched main still defines defaultAuditIndex and getDefaultAuditIndex and permits omitted indexes. The proposed removal is not already implemented there. (scripts/docs-link-audit.mts:376, ff612431704a)
  • Latest release comparison: The v2026.9.3 source also retains the global fallback. GitHub's contents endpoint supplied the release source after the local historical blob was unavailable. (scripts/docs-link-audit.mts:358, 1391f7cd2d40)
  • Related merged work and routing history: GitHub verifies fix(docs): keep mirrored ClawHub routes resolvable in anchor audits #143002 as merged. It established the mirrored-route behavior documented here but retained the global fallback. Recent file history also includes earlier ClawHub route work by steipete; exact introduction attribution is not claimed. (scripts/docs-link-audit.mts, 48e4ae9980a0)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 8afdceb into main Sep 9, 2026
186 checks passed
@steipete
steipete deleted the codex/refactor-docs-route-index-480 branch September 9, 2026 14:39
@steipete

steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 9, 2026
…er-ownership-20260909

* origin/main: (147 commits)
  fix(cli): reject blank account selectors before command startup (#143088)
  fix(update): repair young runs after recorded drivers exit (#143136)
  test(telegram): close model callback fixture connections (#143197)
  improve(test): reduce Telegram policy fixture startup overhead (#143192)
  test(ci): stabilize systemd manager shim timing (#143134)
  fix(test): retire chat preview Escape listeners during teardown (#143191)
  test(memory-wiki): share visibility test callbacks (#143181)
  fix(ci): accept native iOS keychain filenames (#142968)
  fix(ci): show publication observations in FRV status (#143171)
  fix(github): point the stuck-FAQ auto-response at a live anchor (#143194)
  docs: correct verified accuracy defects in CLI, tools, and automation pages (#143179)
  refactor(tests): remove duplicate Mistral cache-cost test (#143172)
  fix(doctor): complete canonical model-reference migration (#142284)
  fix(ci): reject stale and empty timing sample cohorts (#143182)
  fix(ui): remove first-reply confetti from chat (#143167)
  docs: split help/faq into 13 topic pages (#143150)
  refactor(docs): require caller-owned route indexes (#143164)
  fix(android): distinguish connection status from chat readiness (#143128)
  refactor: share agent-turn execution test defaults (#143166)
  fix(cli): print immutable-config refusals without crash framing (#143140)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant