Repository navigation
docs: repair section links whose fragments no longer resolve - #161907
Conversation
Twenty cross-page links opened the right page but not the section: the fragments were left over from page splits and heading changes, and two still carried a leaked `openclawverbatim` placeholder from the secrets page split. Point each link at the ID the docs parser and the published site both produce. Compatibility anchors are left unchanged.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 8:24 AM ET / 12:24 UTC (Revision 2). ClawSweeper reviewWhat this changesCorrects the plugin hooks guide’s session-lifecycle link so it opens the hook catalog instead of an unresolved fragment. Merge readiness✅ Ready for maintainer review Keep open: the remaining link repair is still needed on current main, and the replacement points to the existing section containing the session contract. No actionable patch defects were found. Priority: P3 Review scores
Verification
How this fits togetherThe plugin hooks documentation explains lifecycle callbacks and transcript-access rules to plugin authors. Cross-page section links connect the introductory guide to the detailed hook reference. flowchart LR
A[Plugin author] --> B[Plugin hooks guide]
B --> C[Session lifecycle link]
C --> D[Hook catalog heading]
D --> E[Session and transcript contract]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceDocs 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the existing hook-catalog anchor while preserving the reference structure and all compatibility anchors. Do we have a high-confidence way to reproduce the issue? Yes, from source: follow the session-lifecycle link on current main; its fragment has no corresponding heading or authored ID. Browser navigation was not executed. Is this the best way to solve the issue? Yes. Retargeting the link to the existing containing section is a narrow repair that preserves published anchors and page structure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4dbd5fb85258. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…w#161907) Point the hooks page session lifecycle link at the existing Hook catalog section; the sessions-and-compaction anchor no longer exists. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #143520, #150376, #161451
What Problem This Solves
Fixes: a cross-page docs link opens the right page but lands at the top instead of the named section, because its fragment matches no heading ID on the target page.
The twenty links this PR originally repaired have since been fixed on
mainby #157441, #158229, #159062, #159796, and #160599, so after merging currentmainthis branch no longer touches them.One new unresolved fragment arrived with #161451:
plugins/hooks.md: the "session lifecycle contract" link points at/plugins/hooks/reference#sessions-and-compaction. On the reference page, "Sessions and compaction" is a bold table label, not a heading, so no element carries that ID.User Impact
Readers following the
session_endtranscript-access note in the plugin hooks guide land on the hook catalog that contains the session and compaction hooks, instead of the top of the reference page.Why This Change Was Made
The link now targets
#hook-catalog, the nearest heading that contains the "Sessions and compaction" table. Promoting the bold label to a heading would change the reference page's structure for one inbound link, so the link moves instead.Evidence
node scripts/docs-link-audit.mjs --anchorson the merged head:broken_links=1before this change (plugins/hooks.md:134 :: /plugins/hooks/reference#sessions-and-compaction :: fragment not found),broken_links=0after.id="hook-catalog"and has nosessions-and-compactionID.gateway/doctor/config-migrations.md,plugins/apple-fm.md) were resolved tomain's#agents.defaults.model; the published page exposes bothagents.defaults.modelandagents-defaults-model, and the anchor audit accepts either.git diff --checkpasses.Documentation only; no runtime behavior changes.