Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed September 1, 2026, 5:27 AM ET / 09:27 UTC. ClawSweeper reviewWhat this changesThis PR adds operation-scoped durable worker claims and expired-claim recovery for persisted agent work. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 8 items remain Keep open: an introduced durable identity collision makes repeated persistent cron runs fail in authority mode, and the broader core-durability design still needs maintainer direction. Priority: P2 Review scores
Verification
How this fits togetherThe durable runtime records accepted agent work and recovery facts in shared state. Cron and other agent entry points create those records, after which recovery workers either reconcile them or leave them for the canonical owner. flowchart LR
A[Agent work accepted] --> B[Durable operation record]
B --> C[Worker claim]
C --> D{Claim expired or valid}
D -->|valid| E[Registered owner handler]
D -->|expired| F[Recovery reconciliation]
F --> G[Owner decision or safe requeue]
E --> H[Durable settlement]
Decision needed
Why: The PR adds shared persistence, a recovery worker, and a new configuration surface across established lifecycle owners; that ownership choice cannot be resolved from a local code correction alone. Before merge
Findings
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: First repair durable cron identity to use a unique scheduled occurrence while retaining session identity as metadata, then land this core layer only after maintainers explicitly sponsor its ownership boundary. Do we have a high-confidence way to reproduce the issue? Yes—source establishes that two fresh persistent cron occurrences reuse a session ID as the durable key, although this read-only review did not execute the scenario. Is this the best way to solve the issue? No—the proposed worker slice is not safe as written because durable cron identity must be per occurrence, and the core ownership model remains unapproved. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a7f946192717. LabelsLabel justifications:
EvidenceAcceptance criteria:
What 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 (17 earlier review cycles; latest 8 shown)
|
Durable Core stack context
This is PR 5/6. Its incremental role is to add exact operation-kind/version execution, lease fencing, and expired-claim recovery; no new schema or public mutation.
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 PR5-only compare.
Exact head for this PR:
2c69a09edeb0860d7885d23ac345bab770ee6bab.What Problem This Solves
PR2 persisted generic execution records, and PR3-PR4 added owner recovery and
durable front-door admission. Those pieces still need a narrowly scoped way to
execute explicitly registered durable operations and classify expired claims
after a process disappears.
This slice adds an exact
operationKind@operationVersionregistry, executor,worker, and expired-claim recovery path. It does not turn the Gateway into a
generic workflow engine and it does not claim that arbitrary agent turns or
tool processes can be replayed.
Contract
and settlement writes are fenced by the claim token.
evidence use caller-composed SQLite transactions.
infrastructure failures.
idempotent, or idempotency-key-backed work.
unknown_after_side_effectand wake theircanonical owner without replay.
requires_owner_decisionand wake their owner;they are not claimed by a generic fallback.
receive no generic replay handler.
Evidence
Exact-head fault proof
An isolated shared SQLite database and three independent connections modeled a
process disappearing after a handler returned but before settlement committed.
For
proof.idempotent@1, injected failure ofruntime.step.succeededrolled back the output and terminal event. A newconnection and registry recovered the expired claim, requeued it because its
owner declared idempotency, and completed with one output ref and one terminal
event:
{ "handlerCalls": 2, "recovery": { "scanned": 1, "requeued": 1, "requiresOwnerDecision": 0, "unknownAfterSideEffect": 0, "raced": 0 }, "terminalEvents": 1, "outputRefs": 1 }For
proof.unsafe@1, the same settlement fault produced no replay:{ "handlerCalls": 1, "recovery": { "scanned": 1, "requeued": 0, "requiresOwnerDecision": 0, "unknownAfterSideEffect": 1, "raced": 0 }, "replayClaimed": false, "recoveryState": "unknown_after_side_effect" }An expired unregistered operation became
requires_owner_decision. Repeatingboth scans found zero additional claims and did not duplicate uncertainty or
wake state.
Exact-head validation
Exact head
2c69a09edeb0860d7885d23ac345bab770ee6babpassed:wake-dispatcher shard;
repeated-convergence trace above;
pnpm tsgo:all;pnpm check:durable-canonical-naming;pnpm lint:kyselyandpnpm db:kysely:check;pnpm lint:agent:ingress-owner;pnpm deadcode:unused-files;git diff --check;pnpm build, reportingOpenClaw 2026.7.1 (2c69a09).Boundary
This PR does not claim exactly-once external effects. If a handler completes an
external side effect before SQLite settlement fails, replay is permitted only
when the owner explicitly supplies idempotency or equivalent safety. It does
not resume arbitrary operating-system processes, replay metadata-only agent
turns, replace task/flow/subagent owners, add a schema, or expose public recovery
mutation methods.
This PR is AI-assisted. The implementation and proof were manually reviewed
against operation/version isolation, transaction atomicity, attempt fencing,
owner authority, no-replay, and convergence boundaries.