Repository navigation
fix: continue steered chats after plugin reload - #160908
roboclaw-bot wants to merge 1 commit into
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. |
|
Codex review: needs real behavior proof before merge. Reviewed September 29, 2026, 5:51 PM ET / 21:51 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch moves steering confirmation into the SQLite transcript owner and delays Codex turn cleanup until accepted input settles, allowing a chat to continue after plugin reload. Merge readiness⛔ Blocked before merge - 7 items remain Current main still has the reported reload failure, and the prior merge conflict is resolved. This PR has useful production-path proof, but a newly identified accepted-input replay path blocks merge. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw routes chat input into an active Codex-backed turn and records user messages in SQLite. Plugin reload stops the native turn, then a continuation reads the transcript to produce the final reply. flowchart LR
A[Chat input] --> B[Active turn]
B --> C[Steering queue]
C --> D[Transcript confirmation]
D --> E[SQLite transcript]
E --> F[Plugin reload]
F --> G[Continued reply]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The new confirmation checks protect the SQLite rewrite, but refused caller authority can release accepted input to a later dispatch. PR surfaceSource +782, Tests +1629, Other +1. Total +2412 across 27 files. View PR surface stats
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: Keep accepted input in consumed or indeterminate custody when confirmation fails, report one terminal outcome, and prove revoked-source rejection reaches no later provider or tool effect. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: accept a steer, revoke its receipt before confirmation, then observe the outer queue fallback. This exact replay path was not executed in this read-only review. Is this the best way to solve the issue? No. The producer-owned transcript confirmation is a suitable repair boundary, but the accepted-input failure path must retain custody instead of re-dispatching the input. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6326f5c3702a. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
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 (1 earlier review cycle)
|
Worked on by: - @jalehman Co-authored-by: jalehman <[email protected]> OpenClaw-Publication: 7029d9ec-10d3-44ed-9b50-d3cbf6e650ee
69e2648 to
6e1aba7
Compare
Related: #156353. Two more paths from steering confirmation to the fence, hit in production on 2026.9.6–2026.9.7. Neither involves a plugin reload:
In both cases the only changed receipt field was Ask: please confirm, or cover with a scenario, that the A receipt installed at steering confirmation also reaches (a) a retry attempt inside the same run and (b) the next model-fallback candidate's prepared attempt, not only the reload continuation. A test such as "steer → provider 529 retry → final reply" plus "steer → fallback candidate → final reply" would show it. Context: I closed our narrower #165437. It kept a generation epoch across any in-place transcript rewrite, and ClawSweeper recommended limiting preservation to validated steering confirmations. This PR does that at the producer. Until a release ships it, we run a local patch that drops the |
Related: #156353
What Problem This Solves
Fixes chats failing after a plugin reload when a steering message has changed the transcript generation.
User Impact
The original request can continue with refreshed tools without another prompt or repeating completed actions. Stop remains effective during continuation. No configuration, schema, retention, or permission change is required.
Why This Change Was Made
Confirm steering at the transcript producer: validate the exact original and incoming messages, then install both private receipts from that same commit before publication. The native attempt joins accepted input through receipt installation before reload or terminal cleanup retires its handle. Genuine stale or revoked admissions still fail closed; there is no receipt recapture or whole-turn retry.
Evidence
Rebase update: current head
6e1aba7c8c2976735d04ccc056e7f9d27c963656is rebased onto main6326f5c3702a5027f406ff483451e21f7154402b. The database-worker registry conflict was resolved by preserving both sets of registrations; main entries and both steering registrations were checked. Exact-head runtime/compatibility validation is in progress. The results below belong to the original head69e2648563106c0902f2c28c020897edea56b1ba, not the rebased head; skipped draft checks are not CI success.Historical real failing-before/passing-after proof on original head
69e2648563106c0902f2c28c020897edea56b1ba. Blacksmith Testbox run, leasetbx_01m3nb51vtfynn46jjdr78eget; Node 24.19.0 and native Codex 0.158.0. Standardpnpm buildpassed in 4m 43.3s. The final remote receipt recordssettled:true,exitCode:0.Actual scenario test times: 47.506s / 55.618s / 56.783s / 47.793s, respectively. Each fixed scenario passed one test/file. Cancellation preserves the completed effect and emits no late final reply. These are dedicated runtime controls, not a claim that the linked hydration workflow ran the full CI suite.
The proof uses a real built Gateway, authenticated RPC, installed native Codex, SQLite persistence, a real file-writing tool action, and actual
plugins.reload. Only model inference is synthetic and deterministic through a local HTTP server; this is not an external-provider live test.fb503c9e1f25d8c3877881e55e83d4378eda3676. Plain reload passes. With confirmed steering, the plugin reload succeeds and the original continuation fails at the transcript-admission fence; the side effect remains exactly once. A separate recovery prompt succeeds without repeating it.Known validation limit: the complete changed-check command stops at the inherited environment-variable budget (477 names versus 476 allowed); the scanner reports the same 477 on baseline and candidate, with no added names. No budget exception was added. The full repository test suite was not run. The historical incident build is unknown; this proves the reproduced invalidating transition, not that it was the only possible trigger in that incident.
Safety coverage, implementation cost, and reproducible checks
Coverage includes ordered/batched steering, unchanged original content and boundary, projection/raw-cursor invalidation, reset/branch/writer/database changes, copied-recorder refusal, live source revocation at commit, cancellation, unconfirmed input, and post-commit notification/cleanup failures. The transcript read-fence file is byte-identical to baseline.
Historical source tree:
3090224361cecef7571dfa47daa0860edd6fe0de; changed-file content fingerprint:062b80dbd96a8ea5d5cc695726c8d086502d0db595bfff17df0b73e9a18470ab. Both were verified before execution, and the local source fingerprint was rechecked after completion.Production growth is needed to validate and commit this transition through the existing SQLite worker broker rather than add main-thread SQL or a weaker generic rewrite. The old steering rewrite was removed; no generation-alias registry, competing continuation manager, new production SDK hook, or retry loop was added. Incognito retains its existing in-memory database owner.
Measured focused costs: storage regression 22 tests / 9.33s wrapper wall (5.03s Vitest); initial host-binding regression 22 tests / 8.98s wrapper wall (3.95s Vitest); after adding the logical-alias case, host + storage run 45 tests / 44.77s wrapper wall including fresh worker compilation (7.71s Vitest). The five native-composition cases take 80.99s wrapper wall / 69.4s test time: they protect the real registration → native notification → worker receipt → cleanup composition that helper-only tests missed. They simulate native notifications rather than claiming live-native proof. The opt-in product test is not part of routine per-PR execution. Hosted CI seconds are not yet available.
pnpm build OPENCLAW_E2E_VERBOSE=1 OPENCLAW_E2E_RELOAD_TRANSCRIPT_PROOF=1 \ RELOAD_PROOF_STEER=1 node scripts/run-vitest.mjs \ test/e2e/qa-lab/runtime/reload-transcript-admission.product-proof.e2e.test.ts # Also exercise plain mode, RELOAD_PROOF_RACE=1, and RELOAD_PROOF_CANCEL=1.Contributor credit
Requested by @jalehman.
Worked on by
Work sessions
View the OpenClaw team session