Skip to content

docs: repair section links whose fragments no longer resolve - #161907

Merged
obviyus merged 3 commits into
openclaw:mainfrom
Yigtwxx:docs/fix-unresolved-section-fragments
Oct 7, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
Yigtwxx:docs/fix-unresolved-section-fragments

Conversation

@Yigtwxx

@Yigtwxx Yigtwxx commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

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 main by #157441, #158229, #159062, #159796, and #160599, so after merging current main this 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_end transcript-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 --anchors on the merged head: broken_links=1 before this change (plugins/hooks.md:134 :: /plugins/hooks/reference#sessions-and-compaction :: fragment not found), broken_links=0 after.
  • Published site check: https://docs.openclaw.ai/plugins/hooks/reference exposes id="hook-catalog" and has no sessions-and-compaction ID.
  • The two merge conflicts (gateway/doctor/config-migrations.md, plugins/apple-fm.md) were resolved to main's #agents.defaults.model; the published page exposes both agents.defaults.model and agents-defaults-model, and the anchor audit accepts either.
  • git diff --check passes.

Documentation only; no runtime behavior changes.

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.
@clawsweeper

clawsweeper Bot commented Sep 30, 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 gateway Gateway runtime extensions: apple-fm size: XS labels Sep 30, 2026
@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 30, 2026
@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 8:24 AM ET / 12:24 UTC (Revision 2).

ClawSweeper review

What this changes

Corrects 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
Reviewed head: 42fc1b695dea6a1dec3cbfbba1bdda388a738e6c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported documentation repair with no actionable correctness or security findings.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 7 items Verified introduced change: The pinned merge-base-to-head diff changes only the session-lifecycle link from sessions-and-compaction to hook-catalog; surrounding permission guidance and frontmatter remain unchanged.
Current main still needs the repair: Fetched main retains the unresolved sessions-and-compaction fragment at line 134. The same guide already uses hook-catalog for other reference links.
Existing destination: The reference has a Hook catalog heading at line 118. Sessions and compaction is bold text at line 174, with the ended-transcript contract below it, and no authored sessions-and-compaction anchor.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a focused documentation navigation repair with no runtime behavior change.
  • 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: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head diff changes only the session-lifecycle link from sessions-and-compaction to hook-catalog; surrounding permission guidance and frontmatter remain unchanged. Public docs: docs/plugins/hooks.md. (docs/plugins/hooks.md:134, 42fc1b695dea)
  • Current main still needs the repair: Fetched main retains the unresolved sessions-and-compaction fragment at line 134. The same guide already uses hook-catalog for other reference links. Public docs: docs/plugins/hooks.md. (docs/plugins/hooks.md:134, 4dbd5fb85258)
  • Existing destination: The reference has a Hook catalog heading at line 118. Sessions and compaction is bold text at line 174, with the ended-transcript contract below it, and no authored sessions-and-compaction anchor. Public docs: docs/plugins/hooks/reference.md. (docs/plugins/hooks/reference.md:118, 4dbd5fb85258)
  • Publishing contract: The publishing parser records heading and authored HTML IDs; fragment resolution requires a matching raw or decoded ID. This supports using the existing heading rather than a bold table label. (scripts/lib/docs-markdown.mjs:532, 42fc1b695dea)
  • Discussion and review continuity: The captured PR body acknowledges that merged related PRs handled the original twenty links and narrows this branch to the remaining session link. It reports an anchor audit improving from one broken link to zero. The previous completed review retained no findings or published rank-up moves. (42fc1b695dea)
  • Feature-history routing: Current-main file history includes Erick Kinnee’s merged session-end reader work and Vincent Koc’s hook-reference split. These support routing candidates; exact source-line introduction was not established because deeper blame and historical blob retrieval encountered HTTP 403 failures. Public docs: docs/plugins/hooks/reference.md. (docs/plugins/hooks/reference.md, 4dbd5fb85258)

Likely related people:

  • ekinnee: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-30T13:58:10.575Z sha ff955c0 :: needs maintainer review before merge. :: none

@obviyus
obviyus merged commit feab6b0 into openclaw:main Oct 7, 2026
69 of 72 checks passed
@obviyus

obviyus commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Landed in feab6b0. Thanks @Yigtwxx! The old #sessions-and-compaction fragment no longer exists in the hooks reference, and #hook-catalog does; the docs link audit is clean with this change.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 7, 2026
…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]>
@Yigtwxx
Yigtwxx deleted the docs/fix-unresolved-section-fragments branch October 8, 2026 12:42
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

2 participants