Repository navigation
docs(database): record contracts for a future backend - #138463
Conversation
|
🦞👀 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. |
|
@clawsweeper re-review The PR remains at |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 4, 2026, 2:15 PM ET / 18:15 UTC. ClawSweeper reviewWhat this changesThe PR adds a reference section describing the storage, transaction, and data contracts a future non-SQLite database backend would need to preserve, without changing runtime behavior. Merge readiness⛔ Blocked before merge - 1 item remains No introduced correctness or security defect was found. This active, maintainer-labeled documentation PR should remain open for normal maintainer handling; external documentation links could not be independently fetched because DNS is unavailable in this review environment. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s database reference documents the SQLite stores beneath Gateway and agent operations. A future backend would receive domain operations from store owners and must preserve durable-write and publication ordering. flowchart LR
A[Gateway and agent operations] --> B[Owning store]
B --> C[Database connection]
C --> D[Durable state]
C --> E[Post-commit effects]
F[Future backend adapter] --> B
Before merge
Agent review detailsSecurityNone. PR surfaceDocs +71. Total +71 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep this guidance in the canonical database reference and retain SQLite as the only supported runtime backend until a separately accepted adapter, migration, and multi-Gateway design exists. Do we have a high-confidence way to reproduce the issue? Not applicable: the PR changes documentation only and introduces no runtime behavior to reproduce. Is this the best way to solve the issue? Yes. The established database reference is the appropriate home, and the OpenClaw-specific statements align with current store, transaction, and plugin-state boundaries; external linked pages remain unverified locally due DNS failure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a33604ea1eca. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper’s remaining pre-merge item was a DNS limitation in its reviewer environment. The four linked upstream pages were independently fetched and read on September 4, 2026:
These sources support the added guidance. The reviewer’s network limitation is resolved by this independent verification; no document change is needed. |
|
Merged via squash.
|
What Problem This Solves
The schema reference describes current SQLite ownership and migration rules, but does not collect the behavioral contracts a future database backend must preserve. Merely changing Kysely's dialect would miss synchronous commit boundaries, exact stored bytes, writer fences and engine-owned search behavior.
Why This Change Was Made
Document the existing contracts and remaining PostgreSQL preparation work in the canonical database reference. The initial future scope is one Gateway using remote persistence; distributed Gateway coordination remains a separate design decision. SQLite remains the only supported backend.
The guidance covers domain operations, exact connection ownership, planning before synchronous writes, durable-write-before-publication, store identity and quarantine, canonical serialization, scalar decoding, retries and external effects. It identifies SQLite-owned search, maintenance and attachment behavior, and cites current Kysely, node-postgres and PostgreSQL contracts.
User Impact
Maintainers have a concrete reference for future adapter work. No runtime, schema, configuration, dependency or operator setup changes are made.
Evidence
Read the current store/accessor/transaction owners and installed Kysely contract, and verified the cited upstream documentation.
pnpm docs:list, the exact-file formatter, the required changed-file checks and fresh independent P0–P2 review pass. English source only; no generated translations or release changelog were edited.Documentation delta: +71 lines. No production or test code changes.