Skip to content

docs: generate docs map at publish time - #117398

Merged
steipete merged 3 commits into
mainfrom
codex/goal100k-docs-map-owner-0801-2d45
Aug 1, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/goal100k-docs-map-owner-0801-2d45

Conversation

@steipete

@steipete steipete commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • replace the committed 11,077-line deterministic docs/docs_map.md body with a 9-line source compatibility stub
  • render the byte-identical full map only at docs-publish and source-owned npm/Docker package boundaries
  • consolidate map generation into the canonical docs:list implementation and delete the duplicate generator/build wrapper
  • serialize package preparation, preserve lifecycle ownership across concurrent callers, and restore source files in owner order

Root cause and architectural owner

docs/docs_map.md is deterministic output derived from tracked docs frontmatter and headings, but the generated artifact was committed as source. That duplicated canonical docs data, accumulated about 13.5k lines of historical churn, and required a separate generator implementation. The canonical owner is now scripts/docs-list.js; publication and packaging materialize its output only at their respective boundaries.

The tracked 9-line stub intentionally retains the source path and frontmatter so GitHub/Mintlify Edit source links and zero-argument pnpm docs:list behavior remain valid.

Review follow-ups incorporated

  • Normalize docs-map output paths to / while leaving ordinary no-argument docs:list output unchanged; platform-injected tests cover nested Windows index and page paths.
  • An OCM caller now restores only after it successfully acquires preparation ownership, so a concurrent loser cannot restore the winner receipt, changelog, or generated map.
  • OCM restores historical source refs through their existing package-changelog.mjs owner when the newer composite postpack helper is absent.
  • Interrupted-pack guidance points to the composite postpack owner. Changelog recovery must succeed before the docs receipt releases the lifecycle lock.
  • Docker package generation loads the docs-map lifecycle from the target source ref. Frozen pre-map refs remain byte-owned by that ref and receive no modern generated file.
  • Both legacy/frozen tests are self-contained and require no tag, historical object, network, or non-shallow checkout.

Compatibility proof

  • Exact generated map SHA-256 before and after: 6ec35b71578fa9e54a3636c0c182389d10fbfe65ffc9c483f2f1f2c6fa73263f
  • Clean downstream sync against current openclaw/docs: all 21 English/localized public map routes remained byte-identical; localized routes were untouched
  • pnpm docs:list output SHA-256 remained 662a8236355d2619292c88ee75b425598f3401c35b942db90052a8e2cdaf200d
  • Full exact-head release-style remote pnpm pack: archive package/docs/docs_map.md had the exact public SHA above; source stub, git status, and lifecycle receipts were restored
  • Package tests cover concurrent owners, interrupted composite recovery, changed transient output, legacy OCM fallback, frozen Docker refs, ignore-scripts packing, and failure cleanup
  • A true one-commit shallow clone of exact head ran the focused cross-platform/package suites successfully

LOC

  • Whole repository delta: 959 additions, 11,408 deletions, net -10,449 lines
  • Generated source artifact: net -11,068 lines (docs/docs_map.md, 11,077 to 9)
  • Handwritten non-test code/docs excluding the map: net +202 lines for publish/package compatibility, historical-source ownership, and cleanup safety
  • Tests: net +417 lines

Validation

Exact head: 745626f74312e205f1cf0794ee790bb1296f6bb0

  • Focused local suites: 41 tooling tests passed; 30 Docker-packaging E2E tests passed, 3 platform-specific tests skipped
  • Exact one-commit shallow clone: 24 focused tooling tests passed; 30 Docker E2E tests passed, 3 platform-specific tests skipped
  • Exact renderer cmp, generated-map SHA, and zero-argument docs:list SHA checks
  • node scripts/check-script-declarations.mjs, targeted oxlint, formatting, and git diff --check
  • Downstream docs sync: 21 map routes, zero map changes, exact English SHA
  • Blacksmith Testbox changed gate on the final tree: tbx_01kyypwftjr8a2zgzbq8050bzf (jade-crab-02a8), authoritative wrapper JSON exitCode: 0, runStatus: succeeded; transport run. The backing transport may show canceled during Testbox lifecycle cleanup and is not used as the pass signal.
  • Blacksmith Testbox exact-head release package proof: tbx_01kyyqeks6md6kzs409pek2erj (blue-hermit-4386), authoritative wrapper JSON exitCode: 0, runStatus: succeeded; transport run. Archive SHA, source restoration, clean status, and absent receipts were asserted in the command.
  • Independent xhigh autoreview on the final tree: no findings, patch correct, confidence 0.98

ClawSweeper exact-head review

ClawSweeper reviewed exact head 745626f74312e205f1cf0794ee790bb1296f6bb0, found no actionable patch defect, rated proof and patch quality 5/6, and confirmed that current main has no touched-path overlap since the PR base. Its only remaining item is explicit release/package maintainer approval while preserving the clean GitHub three-way result and exact-head package restoration evidence. Hosted exact-head CI is terminal green: 88 passed and 22 intentionally skipped, with no failures.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts docker Docker and sandbox tooling size: L maintainer Maintainer-authored PR labels Aug 1, 2026
@steipete
steipete marked this pull request as ready for review August 1, 2026 12:12
@steipete
steipete requested a review from a team as a code owner August 1, 2026 12:12
@github-actions

github-actions Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive changes noted

This PR includes security-sensitive file changes. The guard is informational because the PR author is a repository admin or a member of @openclaw/openclaw-secops.

  • Current SHA: 745626f74312e205f1cf0794ee790bb1296f6bb0
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Changed files:

  • .gitignore: Controls ignored secret and local files, including common .env files, before they can be accidentally committed.

Security review is still recommended before merge when the change is intentional.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 9:41 AM ET / 13:41 UTC.

ClawSweeper review

What this changes

The branch retains a small tracked docs-map stub and generates the full deterministic heading map only for documentation publishing and npm/Docker package archives.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This PR is still necessary: current main retains the committed docs-map generator. Direct branch inspection finds no actionable patch defect, but the protected maintainer label and intentional package-lifecycle contract require explicit release/package-owner approval before merge.

Priority: P3
Reviewed head: 745626f74312e205f1cf0794ee790bb1296f6bb0
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong behavior and validation evidence support the cleanup, with no actionable patch finding; release/package-owner approval remains for the intentional lifecycle contract.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR body and supplied check context show exact-head archive parity, source restoration and clean-status assertions, downstream docs-sync parity, focused package tests, and green hosted checks; the remaining gate is package-owner approval.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR body and supplied check context show exact-head archive parity, source restoration and clean-status assertions, downstream docs-sync parity, focused package tests, and green hosted checks; the remaining gate is package-owner approval.
Evidence reviewed 6 items Current-main gap: Current main still invokes the separate generator and checks the committed generated map, so it does not already contain this cleanup.
Canonical renderer and publish output: The branch centralizes heading-map generation in the docs-list implementation and materializes the map in the publication tree.
Package cleanup boundary: The receipt records the source map before package preparation and cleanup restores it only when the generated content still matches, protecting operator edits and concurrent package ownership.
Findings None None.
Security None None.

How this fits together

OpenClaw derives documentation navigation metadata from source documentation pages. The proposed lifecycle sends that map to publishing and package assembly, then restores the tracked source state after the archive is made.

flowchart LR
  A[Source docs] --> B[Heading-map renderer]
  B --> C[Docs publish tree]
  B --> D[Package preparation]
  D --> E[Package archive]
  D --> F[Source restoration]
Loading

Decision needed

Question Recommendation
Should the release/package owner approve the intentional temporary source-rewrite lifecycle for the final merge result? Approve after merge-result package check: Retain the canonical renderer and receipt-backed restoration after confirming the final GitHub merge result creates the expected archive and restores source state.

Why: The PR changes ownership and recovery behavior across npm, Docker, and OCM package flows; that contract needs explicit release/package acceptance even though no source defect was found.

Before merge

  • Resolve merge risk (P1) - The PR intentionally rewrites a tracked docs file during npm, Docker, and OCM packaging; the receipt and ordered cleanup must preserve a clean source checkout on successful, failed, and concurrent calls.
  • Resolve merge risk (P1) - The branch is mergeable but behind main, so the release/package owner should confirm that the final GitHub merge result retains the demonstrated archive and source-restoration behavior.
Agent review details

Security

None.

PR surface

Tests +417, Docs -11067, Config -1, Other +202. Total -10449 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 449 32 +417
Docs 3 7 11074 -11067
Config 2 4 5 -1
Generated 0 0 0 0
Other 16 499 297 +202
Total 27 959 11408 -10449

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: scripts/package-docs-map.mjs. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify final archive restoration (recommended)
    Before merge, preserve or rerun exact merge-result proof that npm, Docker, and OCM archives contain the full map while the working tree is restored.
  2. Accept the lifecycle contract
    The release owner may accept the source-rewrite and recovery behavior as the packaging contract after reviewing the supplied proof.

Technical review

Best possible solution:

Land the canonical renderer with generation only at publication and archive boundaries after the release/package owner confirms archive parity and source restoration on the final merge result.

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

Not applicable: this PR refactors deterministic docs publication and package assembly rather than fixing a reported runtime failure.

Is this the best way to solve the issue?

Yes, conditionally: one renderer and boundary-only materialization remove duplicated generated source; the package owner should still approve the final merge-result restoration contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 56ffa2bca48b.

Labels

Label justifications:

  • P3: This is a non-urgent documentation and packaging-maintenance improvement, not a user-facing outage.
  • merge-risk: 🚨 compatibility: Existing npm, Docker, and OCM packaging flows now materialize and restore a tracked documentation artifact differently.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body and supplied check context show exact-head archive parity, source restoration and clean-status assertions, downstream docs-sync parity, focused package tests, and green hosted checks; the remaining gate is package-owner approval.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and supplied check context show exact-head archive parity, source restoration and clean-status assertions, downstream docs-sync parity, focused package tests, and green hosted checks; the remaining gate is package-owner approval.

Evidence

What I checked:

  • Current-main gap: Current main still invokes the separate generator and checks the committed generated map, so it does not already contain this cleanup. (package.json:1476, 56ffa2bca48b)
  • Canonical renderer and publish output: The branch centralizes heading-map generation in the docs-list implementation and materializes the map in the publication tree. (scripts/docs-list.js:255, 745626f74312)
  • Package cleanup boundary: The receipt records the source map before package preparation and cleanup restores it only when the generated content still matches, protecting operator edits and concurrent package ownership. (scripts/package-docs-map.mjs:35, 745626f74312)
  • Feature-history route: Current-main blame attributes the existing docs-map generator and package baseline to Peter Steinberger, who also authored this branch’s lifecycle follow-ups. (scripts/generate-docs-map.mjs:3, 7aacd1314d71)
  • Unmerged and unreleased: The PR head is not an ancestor of current main and no local release tag contains it, so no implemented-on-main or shipped close reason applies. (745626f74312)
  • Inspection limitation: The partial checkout could inspect the PR-head files, but could not materialize a missing historical base object because GitHub DNS resolution failed; no local tests or writes were performed.

Likely related people:

  • steipete: Current-main blame assigns the existing docs-map generator and package baseline to Peter Steinberger, and the same contributor authored the proposed lifecycle repair commits. (role: feature introducer and recent area contributor; confidence: high; commits: 7aacd1314d71, ba321f9904f6, ffdd7cd490a3; files: scripts/generate-docs-map.mjs, scripts/docs-list.js, scripts/openclaw-prepack.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-01T12:58:11.498Z sha ffdd7cd :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T13:29:19.874Z sha 745626f :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Aug 1, 2026
@steipete
steipete merged commit 385f1de into main Aug 1, 2026
129 of 131 checks passed
@steipete
steipete deleted the codex/goal100k-docs-map-owner-0801-2d45 branch August 1, 2026 14:01
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

pull Bot pushed a commit to NickHood1984/openclaw that referenced this pull request Aug 1, 2026
* origin/main:
  docs: generate docs map at publish time (openclaw#117398)
  refactor(plugins): move plugin contributions into the registry bundle (openclaw#117372)
  fix(tui): keep PTY progress and lifecycle truthful (openclaw#117402)
  test(xai): type realtime sent item payloads
  fix(qa): preserve Slack fallback evidence (openclaw#117420)
  fix(qa): satisfy update lane execution contracts (openclaw#117388)
  fix(qa): Matrix replies disappear after final replacement (openclaw#117390)
  test(xai): prove rejected tool call continuation
  fix(xai): complete rejected realtime tool calls
  test(xai): add live tool argument probe
  test(xai): cover rejected realtime tool arguments
  fix(xai): validate realtime tool arguments before dispatch
  fix(xai): skip tool call when rawArgs JSON parse fails instead of silently falling back to empty args
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* docs: generate docs map at publish time

* fix: canonicalize Docker pack entry path

* fix: preserve package lifecycle ownership
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main:
  docs: generate docs map at publish time (openclaw#117398)
  refactor(plugins): move plugin contributions into the registry bundle (openclaw#117372)
  fix(tui): keep PTY progress and lifecycle truthful (openclaw#117402)
  test(xai): type realtime sent item payloads
  fix(qa): preserve Slack fallback evidence (openclaw#117420)
  fix(qa): satisfy update lane execution contracts (openclaw#117388)
  fix(qa): Matrix replies disappear after final replacement (openclaw#117390)
  test(xai): prove rejected tool call continuation
  fix(xai): complete rejected realtime tool calls
  test(xai): add live tool argument probe
  test(xai): cover rejected realtime tool arguments
  fix(xai): validate realtime tool arguments before dispatch
  fix(xai): skip tool call when rawArgs JSON parse fails instead of silently falling back to empty args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL 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