Repository navigation
docs: split database-schemas reference into seven child pages - #143152
Conversation
docs/reference/database-schemas.md was 90,025 bytes in a single page. Split it into docs/reference/database-schemas/ and keep the parent as an index, matching the docs/reference/session-management-compaction/ and docs/reference/full-release-validation/ precedents already on main. Content-preserving: children carry their original H2 sections verbatim at their original heading levels. The seven child bodies reassemble byte-identically to the original body apart from one declared orphan-reference rewrite (a "below" that now points across a page boundary). All 46 pre-split anchor ids are stubbed on the index so existing deep links such as /reference/database-schemas#schema-bumps-and-older-updaters continue to resolve.
|
🦞👀 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 September 9, 2026, 10:14 AM ET / 14:14 UTC. ClawSweeper reviewWhat this changesSplits the database reference into seven topic pages, preserves existing links through an index, and updates navigation and Chinese glossary entries. Merge readiness✅ Ready for maintainer review Keep open: the split remains useful because current main still contains the monolithic reference. Content preservation and navigation checks found no blocking defect; the maintainer-authored PR is also protected from automated closure. Priority: P3 Review scores
Verification
How this fits togetherThe database reference helps operators and contributors find storage, compatibility, migration, and recovery guidance. Documentation navigation and existing deep links now lead through an index to focused reference pages. flowchart TD
A[Documentation navigation] --> C[Database reference index]
B[Existing section links] --> C
C --> D[Layout and personal storage]
C --> E[Versioning and storage changes]
C --> F[Schema history]
C --> G[Integrity and recovery]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceDocs +156. Total +156 across 10 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one canonical copy of each reference section on its focused page, with the parent index preserving existing entry points. Do we have a high-confidence way to reproduce the issue? Not applicable: this reorganizes documentation rather than repairing a runtime defect; source comparison confirms the original reference remains monolithic on main. Is this the best way to solve the issue? Yes: the split follows an established repository pattern and preserves the original content, headings, and entry-point links without creating competing reference copies. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 82050740b551. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…aw#143152) docs/reference/database-schemas.md was 90,025 bytes in a single page. Split it into docs/reference/database-schemas/ and keep the parent as an index, matching the docs/reference/session-management-compaction/ and docs/reference/full-release-validation/ precedents already on main. Content-preserving: children carry their original H2 sections verbatim at their original heading levels. The seven child bodies reassemble byte-identically to the original body apart from one declared orphan-reference rewrite (a "below" that now points across a page boundary). All 46 pre-split anchor ids are stubbed on the index so existing deep links such as /reference/database-schemas#schema-bumps-and-older-updaters continue to resolve.
What
docs/reference/database-schemas.mdwas 90,025 bytes / 907 lines in one page. This splits it intodocs/reference/database-schemas/(seven children) and keeps the parent as an index.Shape matches the two split directories already on
main:docs/reference/session-management-compaction/anddocs/reference/full-release-validation/. Children carry their original##sections verbatim, at their original heading levels; the page title is new frontmatter. No prose was rewritten, reordered or "improved" — with the single exception declared below.layout— Database layoutversioning— Versioning contractpersonal-data— Per-person and companion storagestorage-changes— Storage changes and release preflightagent-schema-history— Agent schema historystate-schema-history— State schema historyintegrity-and-recovery— Integrity, troubleshooting, and recoveryIndex: 90,025 → 8,922 bytes.
Not a generated page
Checked first, since a schema reference often is generated. It is hand-written:
scripts/writesdocs/reference/database-schemas.md; nothing insrc/,test/,scripts/orqa/even reads it (the only two hits are comments insrc/state/openclaw-state-schema-v{10,11}-retirement.test-support.ts).<!-- generated -->marker; every "generated" hit in the file is ordinary prose.scripts/lib/sqlite-session-schema-baseline.ts) emits.artifacts/*.sqlplusdocs/.generated/sqlite-session-transcript-schema-baseline.sha256— never this markdown.CONFIG_DOC_BASELINE_PATHSinscripts/changed-lanes.mtsnames only the twoconfig-baseline.*files; this page is not pinned there, and neither is a baseline of it.Losslessness, proven
Reassembly rule: strip each child's frontmatter, rejoin the seven bodies with the single blank line that separated their sections, restore the terminating newline.
The raw extraction (before the rewrite below) reproduced that sha256 exactly. The complete diff of the final tree against the original body is three lines — the one rewrite, and nothing else:
Invariants: fenced blocks 2 → 2 with identical info strings; table rows 89 → 89; word count 10,472 → 10,478 (grew only).
The one prose diff
python3 .audit/check-orphan-refs.pysurfaced three directional references. Two are fine and were verified, not assumed:layout.md"the legacy explicit repair/supersession rules below" — target is at original lines 204–223, inside the same child.storage-changes.md"the review checkpoint below" — target is## Review checkpoint for material changes(original line 645), inside the same child.One was genuinely orphaned by the split and is the entire prose diff above: "the older-updater schema-publication bound below" (original line 199) sat in Database layout, but its target is the deferred-publication discussion in Versioning contract (original lines 361, 408–411). "Below" no longer reaches it, so it is now an explicit link.
Anchors
All 46 pre-split ids are stubbed on the index under
## Where each section moved, each linking to the child that now holds it. Enumerated with the repo's ownparseDocsDocument(scripts/lib/docs-markdown.mjs), not a slug approximation:/reference/database-schemas; 46/46 also exist on a child.### Why you cannot go back after updating to 2026.7.2mints two ids (…-2026.7.2encoded and…-2026-7-2cleaned). Both are stubbed, on one bullet, as the sibling precedent does.Stranded stubs. The page already carried eight authored
<a id=…>anchors (original lines 888–896) — legacy anchors for the removed "Downgrades are unsupported" section. They sit above## Downgrade recoveryand below### A database is quarantined…, exactly the shape a naive##-boundary cut strands in the wrong child. The cut keeps them with the heading they belong to; both sections land inintegrity-and-recovery.python3 .audit/stranded-stubs.py docs→ 0 suspects.Note:
/reference/database-schemas#integrity-checksat original line 684 (now instorage-changes.md) is left unchanged — it resolves through the index stub. Retargeting it at the child would be a second prose diff for no correctness gain.Pins classified
.audit/docs-test-pins.pyreported 9; an independent unfilteredgit grep -n "reference/database-schemas" origin/mainreturned 46 hits. Every one classified:src/cli/update-cli.test.ts,src/infra/sqlite-user-version.test.ts,src/state/openclaw-agent-db.test.ts,src/state/openclaw-state-db.test.ts) assert the bare routehttps://docs.openclaw.ai/reference/database-schemasinside runtime error messages, with no fragment. The route is unchanged. Same for the constant insrc/state/openclaw-state-db-contract.ts.AGENTS.md,CONTRIBUTING.md,CHANGELOG.md,appcast.xml,.agents/skills/*and ~20docs/**pages link the page or its anchors; all resolve (index kept, all anchors stubbed).taxonomy.yamlhas no entry for this page.RELEASE_METADATA_PATHSdoes not contain it.CI
.github/labeler.ymlhas zero references todatabase-schemas— no file-exact glob names the page, so it was never labelled. That is a pre-existing gap, not one this split creates; reported, not fixed here.test/scripts/labeler-*.test.tspass unchanged.docs/docs.json: children added as a"Database schemas"group directly after the parent entry, matching the sibling pattern.docs/.i18n/glossary.zh-CN.json: sevensourceentries added, one per new child title —check-docs-i18n-glossary.mtshard-fails without them. Appended beside the existing "SQLite maintenance and session migration" entry rather than at the end of the array, so concurrent split PRs touch different regions and merge cleanly. 1010 entries, 0 duplicate sources.CODEOWNERS
Simulated last-match-wins against
.github/CODEOWNERS. No rule matchesdocs/reference/database-schemas.mdordocs/reference/database-schemas/**. The only/docs/reference/entries aresecretref-credential-surface.md,secretref-user-supplied-credentials-matrix.json(@openclaw/openclaw-secops) andRELEASING.md(@openclaw/openclaw-release-managers). No maintainer team gates this page.Validators
Baseline measured on a clean tree at the merge-base
2c19155, in this worktree, before any edit — not by stashing, and not against a movingorigin/main.pnpm check:docsdocs-link-audit.mjsdocs-link-audit.mjs --anchors#windows-app-node)check-docs-mdx.mjsmarkdownlint-cli2 --config config/markdownlint-cli2.jsoncvitest tooling src/scripts/docs-link-audit.test.tsvitest full-core-unit-src src/docs/vitest tooling test/scripts/labeler-*.test.ts.audit/stranded-stubs.py docsThe one
docs-link-audit.test.tsfailure (expected ['ass-guide','param-ass-guide'] to deeply equal ['as-s-guide','param-as-s-guide'], line 155) is pre-existing: reproduced at the base sha on a clean tree before any change here.format-docs.mts --checkinitially flagged the index; running the formatter padded only the index table's columns. Children were already format-clean and were not touched.