Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 6:23 PM ET / 22:23 UTC. Summary PR surface: Source +7417, Tests +4196, Docs +309, Generated +318, Other +3. Total +12243 across 60 files. Reproducibility: not applicable. this is a feature foundation PR rather than a bug report, and review used source inspection plus contributor-supplied positive CLI/Gateway proof. Review metrics: 3 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Sequence this behind the RFC/product boundary, then merge only with explicit maintainer acceptance of the env, schema, privacy, and upgrade lifecycle plus final broad CI/build proof on the merge result. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature foundation PR rather than a bug report, and review used source inspection plus contributor-supplied positive CLI/Gateway proof. Is this the best way to solve the issue? Unclear as a product decision: the implementation now follows the opt-in shared-SQLite and protocol-validated shape, but the core durable runtime boundary needs maintainer acceptance before it can be called the best fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9c4274f94570. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +7417, Tests +4196, Docs +309, Generated +318, Other +3. Total +12243 across 60 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Updated after ClawSweeper review:
Validation:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Additional real behavior proof for the durable runtime foundation follow-up: Disabled CLI inspection does not create state: The follow-up filesystem check printed no files under the temp state dir. Enabled inspection then creates the shared state DB as expected: Disabled Gateway inspection rejects before opening durable state: {"ok":false,"code":"INVALID_REQUEST","message":"Durable runtime is disabled.","hasResult":false}Enabled Gateway inspection after creating a proof run returns the durable projection: {"ok":true,"runtimeRunId":"run_gateway_proof"}Focused validation: @clawsweeper re-review |
|
@clawsweeper re-review Updated PR #98718 with a fresh 2026-07-02 reviewer recheck proof at commit Proof now appears in both places ClawSweeper asked reviewers to keep current:
The refreshed proof shows:
Validation rerun after the proof refresh:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
519bae5 to
3e39e28
Compare
|
@clawsweeper re-review Updated PR #98718 after the latest review findings. Changes:
Validation:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Updated PR #98718 after the latest P1/P2 review findings. Changes:
Validation:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Refreshed the PR body for current head This is body/proof metadata only: no code changes. The body now records the gateway startup worker gate, public protocol validators, invalid-param-before-open handling, and latest validation commands. |
|
Superseded by #101828, which restates the durable-core scope with a clearer RFC/root-cause/test-plan review gate. The new PR keeps this stack durable-core-only: Workboard/TaskFlow and product workflow surfaces are out of scope. Closing this older PR to avoid review confusion; implementation PRs will follow sequentially after #101828 is reviewed. |
What Problem This Solves
This PR adds the opt-in, local-first durable runtime foundation proposed by PR1. The target failure mode is coordinator silence: long-running session/task/subagent work can continue across many steps, branches, and process restarts, but operators and runtime code need a bounded durable projection of which run, step, child, signal, or recovery state is open.
This is not a general-purpose workflow engine and does not include Work module, Workboard UI/tools, Task Flow projection adapters, or product-specific logic.
Dependency Chain
This is PR2 in the replacement durable runtime stack:
This PR is designed to be reviewable independently as a core foundation slice.
Summary
Adds:
durable_runtime_*tables in the shared OpenClaw state DB;packages/gateway-protocolschemas, inferred types, lazy validators, and validator tests fordurable.coordination.get;Explicit Non-Scope
Latest Reviewer Follow-Up
Updated on 2026-07-03 after the latest ClawSweeper P1/P2 findings and proof refresh.
Head:
cb0a5b5a9b0bcb46cd2f15469fd63c4db68d3358.Addressed ClawSweeper findings:
OPENCLAW_DURABLE_RUNTIME=1, but agent-turn/chat-send/subagent mark-lost reconciliation now runs only with explicitOPENCLAW_DURABLE_WORKER=1.durable.coordination.getnow has public protocol params/result/projection schemas, inferred exported types, lazy validators, and validator tests.validateDurableCoordinationGetParamsand rejects invalid params before opening durable state.OPENCLAW_DURABLE_RUNTIME=1alone does not start reconciliation.Regression coverage added:
src/durable/startup.test.tsverifies runtime-enabled startup without the worker flag preserves running runs/steps, while worker-enabled startup marks them lost.packages/gateway-protocol/src/index.test.tscovers the public durable coordination schemas and validators.src/gateway/server-methods/durable.test.tscovers invalid-param rejection before durable state open plus disabled/enabled inspection behavior.src/durable/recovery.test.tsandsrc/durable/sqlite-store.test.tscover the explicit worker gate and future-schema guard.Evidence
Latest validation:
node scripts/run-vitest.mjs run packages/gateway-protocol/src/index.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/server-methods/durable.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts src/durable/startup.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts src/durable/recovery.test.ts src/durable/sqlite-store.test.ts src/durable/worker.test.ts src/durable/coordination-projection.test.tsnode scripts/generate-docs-map.mjs --checkdocs/docs_map.md is up to date.npm run tsgo:coregit diff --checkEarlier post-rebase validation:
node scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts src/durable/recovery.test.ts src/durable/sqlite-store.test.ts src/durable/worker.test.ts src/durable/agent-turn.test.ts src/durable/subagent.test.ts src/durable/fan-in.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.commands.config.ts src/commands/durable.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/server-methods/durable.test.tsnode scripts/generate-docs-map.mjs --checkdocs/docs_map.md is up to date.git diff --check origin/main HEADLive behavior proof remains in
docs/specs/durable-runtime-foundation-pr-proof-2026-07-01.mdand covers:<temp>/state/openclaw.sqlite;OPENCLAW_DURABLE_WORKER=1;Full stack typecheck proof is recorded on PR3, which includes this PR2 foundation plus agent/session wiring.
Notes
This PR replaces the foundation portion of #97508 with smaller runtime-oriented naming and a narrower review boundary.