Repository navigation
Conversation
|
Replacement PR2 submitted at exact head Proof on this exact head:
The review body contains the exact ten-table inventory, enabled/disabled and @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 4:44 PM ET / 20:44 UTC. ClawSweeper reviewWhat this changesThis PR adds an explicitly opened SQLite/Kysely durable-runtime store with ten residual shared-state tables, transaction and lease handling, generated schema types, and focused storage tests, while leaving runtime activation and public APIs to later PRs. Merge readinessKeep this PR open for an explicit maintainer product decision, not because of a discrete patch defect. The proposal is a coherent, tested storage foundation, but it adds a new persistent cross-owner coordination boundary to the shared core database before maintainers have decided whether these recovery facts belong in a shared layer or in existing task, session, subagent, and delivery owners. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s shared SQLite database already holds owner-specific task, session, lease, and delivery state. This PR would add a dormant cross-owner evidence store that later Gateway recovery, worker, and inspection layers could use to coordinate those existing owners. flowchart LR
Owners[Existing task, session, subagent, and delivery owners] --> StateDB[Shared SQLite state database]
DurableStore[Proposed durable store] --> StateDB
DurableStore --> Evidence[Cross-owner evidence and obligations]
Evidence --> Recovery[Later recovery and attention logic]
Recovery --> Operators[Gateway and operator inspection]
Owners --> Operators
Decision needed
Why: The patch is technically bounded, but creating ten shared-state tables and a new cross-owner authority boundary is a product and architecture choice that implementation tests cannot settle. Before merge
Agent review detailsSecurityNone. PR surfaceSource +4897, Tests +1464, Docs +529, Config +1, Generated +501, Other +83. Total +7475 across 20 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: First sponsor or reject the shared durable coordination boundary through the canonical product discussion; if sponsored, rebase this slice onto current main and prove additive upgrade, disabled-mode non-mutation, and coexistence with current shared-state lifecycle ownership before landing. Do we have a high-confidence way to reproduce the issue? Not applicable as a standalone bug reproduction: this PR proposes a new durable coordination capability rather than fixing an established current-main contract. The linked product issue contains a separate source-backed stale-owner-handoff reproduction for the architectural question. Is this the best way to solve the issue? No—not yet as a merge decision. The storage implementation is coherent, but the best solution depends on whether maintainers accept a shared cross-owner authority or prefer owner-local repairs; current main also requires an integration pass before this release-branch patch can land safely. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f4766de45b74. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (15 earlier review cycles; latest 8 shown)
|
|
Restored this PR to the previously reviewed OpenClaw 2026.7.1 storage candidate at This returns PR2 to the bounded opt-in shared-state slice described in the body: exactly ten residual tables, no public configuration or API, and no worker or wake dispatch. The base, title, body, and exact-head evidence now match that candidate. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
This pull request has been automatically marked as stale due to inactivity. |
1 similar comment
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
Durable Core stack context
This is PR 2/6. Its incremental role is to add the explicitly opened shared-state foundation and exactly ten residual tables; no public config or API.
End state
The series targets infrastructure-level agent silence on supported OpenClaw
7.1 paths. Accepted long-running or delegated work should retain durable
identity, parent/owner attention, recovery state, and replay-safety evidence
across Gateway restart, process interruption, context overflow/compaction,
delayed children, stale claims, and ambiguous handoffs. The intended result is
truthful recovery or an explicit owner-decision/uncertainty state, not silent
loss and not blind replay.
This is not a promise that every agent will always produce a useful response.
It does not resume an arbitrary operating-system process, guarantee exactly-once
external effects, prove delivery through every transport, or replace profile,
skill, prompt, and model quality.
Official 7.1 baseline and residual gap
Official 7.1 already has authoritative lifecycle owners for tasks and task
delivery, Task Flow runs, subagents, outbound and session delivery queues,
leases, sessions, ACP, restart/boot, conversation bindings, audit, diagnostics,
and the shared SQLite schema. This stack keeps those owners authoritative.
The residual gap appears when a fact crosses owners. No single official 7.1
owner can safely answer all of these questions without taking authority from
another owner:
refer to the same run;
delivered;
or uncertain;
directly.
Durable Core therefore adds only residual cross-owner facts, owner-first
recovery coordination, and bounded inspection. It reuses
state_leasesforattempt authority and the existing
schema_meta/user_versionowner for schemaversioning. It does not add a second task, flow, subagent, delivery, session, or
migration ledger.
Root causes and stack coverage
Six-PR map
Review model
All six PRs target
release/2026.7.1at0790d9f593ad30c940ed93b5872a8cf6d6f3cf8c, so GitHub displays a cumulativediff for each later PR. Review and merge order remains PR1 through PR6.
Review the incremental change for this slice at PR2-only compare.
Exact head for this PR:
2d564d52fe14e5896abef1c51f813a4799f8f325.What Problem This Solves
Official 7.1 has durable owner-specific tables but no optional shared boundary
for generic execution evidence, wake obligations, delivery-attempt evidence,
uncertainty, correlations, and bounded payload references. This slice adds
only that residual storage while preserving existing owner authority and
leaving disabled installations untouched.
Exact base and head
release/2026.7.1at0790d9f593ad30c940ed93b5872a8cf6d6f3cf8c.5b8dfa9aade.2d564d52fe14e5896abef1c51f813a4799f8f325.correction commit is reverted.
What this slice adds
openclaw.sqliteowner.This PR adds no public durable configuration, starts no worker, integrates no
agent front door, dispatches no wake, exposes no Gateway/CLI method, and claims
no external delivery. Runtime configuration moves to PR3, where worker and
intake code consume it rather than leaving accepted settings inactive.
Owner-first schema decision
Existing official 7.1 owners remain authoritative:
task_runs,task_delivery_state,flow_runs,subagent_runs,delivery_queue_entries,state_leases, session/ACP/restart owners, audit,and diagnostics.
When a future consumer explicitly opens the durable store, this slice adds
exactly ten residual tables:
durable_execution_recordsdurable_event_evidencedurable_execution_stepsdurable_payload_refsdurable_run_correlationsdurable_timer_obligationsdurable_signal_evidencewake_obligationsdelivery_attempt_evidenceuncertainty_factsThere is no second migration ledger, mode table, result-mailbox table, generic
dedupe ledger, cleanup table, duplicated task/flow/subagent lifecycle, or
durable-specific
schema_metarow. The existing shared-stateuser_versionand
schema_meta(primary)remain the only schema-version authority.Safety properties proved
table; this slice adds no public durable setting that could imply inactive
behavior.
owner before durable DDL; the additive durable tables do not introduce a
competing version contract.
preserving canonical owner rows, including an existing
state_leasesrow.back atomically.
prematurely, and reopen cleanly after final close.
metadata, and lease fencing are enforced by the store.
boundaries; JSON extraction uses a closed-path Kysely helper.
files that Linux cannot reach until later stack wiring. It adds no public
config type or plugin SDK export budget.
Evidence
Run on
2d564d52fe14e5896abef1c51f813a4799f8f325:pnpm tsgo:all- passed across all workspace projects.1 skipped.
pnpm db:kysely:check- generated schema/types match.pnpm lint:kysely- Kysely guardrails OK.pnpm check:durable-canonical-naming- passed across 25 files.oxfmt --check- passed on all matched changed files.surface budget - 2 files passed; 24 tests passed.
pnpm docs:map:check- passed for the cumulative RFC docs.git diff --check- passed.The focused matrix includes enabled/disabled initialization, exact table
inventory, canonical-row preservation, future-version rejection, transaction
rollback, terminal immutability, wake claim fencing, close/reopen persistence,
shared-handle lifecycle, query plans, and the closed JSON-path no-silence
diagnostic regression. The schema-authority correction additionally passed 23
focused storage/factory tests, full workspace
tsgo, scoped type-aware lint,formatting, and
git diff --check.Redacted runtime probe output from the exact head (temporary database only):
{"head":"2d564d52fe14e5896abef1c51f813a4799f8f325","proof":"disabled-normal-bootstrap","durableTables":0,"durableMarker":false,"primarySchemaVersion":1} {"proof":"explicit-additive-open","durableTables":10,"durableMarker":false,"primarySchemaVersion":1} {"proof":"close-reopen-read-only","runs":1,"events":1}The probe creates an official shared-state database, inserts one canonical
state_leasesowner row, verifies normal bootstrap has zero durable tables,opens the durable store explicitly, verifies that no durable-specific schema
marker is written, writes one run/event, closes it, and reopens read-only. Its
reproducible assertions are covered by the focused tests above.
Non-claims
delivery.