Repository navigation
fix(sessions): make input relocation transaction-safe - #139002
fuller-stack-dev merged 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: blocked before merge. Reviewed September 5, 2026, 8:10 AM ET / 12:10 UTC. ClawSweeper reviewWhat this changesKeeps accepted messages linked to rewritten transcript entries through commits and rollbacks, and checks replay against the selected conversation branch. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 1 item remains This PR remains necessary: current main still has the targeted transaction-boundary gaps. No blocking findings remain, and the previous migration-proof blocker is unsupported by the diff. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw stores conversation history in per-agent SQLite databases. Transcript maintenance copies entries onto a new branch; accepted-input tracking must follow those copies without accepting stale entries or changing the admitted message. flowchart TD
A[Accepted message] --> B[Live input owner]
B --> C[Transcript rewrite transaction]
C --> D{Transaction outcome}
D -->|Rollback| E[Restore previous binding]
D -->|Commit| F[Publish binding before observers]
F --> G[Replay checks selected conversation branch]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +110, Tests +228. Total +338 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep relocation state owned by the transaction lifecycle and reuse normalized ancestry; explicit rollback state is necessary because an observer-only change cannot preserve bindings across nested savepoints. Do we have a high-confidence way to reproduce the issue? Yes at the transaction-owner boundary: immediate replay during a dirty projection and relocation behind a throwing observer have clear source paths and focused regression cases. The original live incident was not reproduced. Is this the best way to solve the issue? Yes. The patch repairs commit ownership and shares the canonical branch parser; catching observer errors alone would leave nested relocation and rollback incorrect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eec37f21426a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
c15f5ba to
51d3f7c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
51d3f7c to
5110a24
Compare
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
The remaining “SQLite table change” item is a classifier false positive. This PR changes no SQLite schema, table, DDL, migration, or serialized on-disk format. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…tody Refresh the task branch from main after #139002 landed. Reuse its canonical transaction-local custody staging and remove the rewrite-specific publication collector; keep manager adoption ahead of insert observers. Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]>
|
The complementary atomic transcript-publication repair #138984 has merged as b0ae5b6. It retains the existing accepted-input authority and transaction-local relocation behavior while publishing the replacement history coherently. Recorded regression coverage includes active versus closed/replaced admission, rejection before durable changes, input custody, and reader agreement after rewrites. This is follow-through on the shared transcript lifecycle, not a claim that the earlier input-ownership repair was unnecessary or replaced. |
(cherry picked from commit 140eb56)
Summary
Follow-up to #138967. That change authorizes transcript rewrites before appending the exact admitted user copy, but two commit-boundary gaps remain:
This change keeps relocation transaction-local through nested savepoints, publishes the final binding before fallible observers, and checks the selected visible transcript ancestry when the materialized projection is dirty. It deliberately ignores a divergent physical append cursor. Receipt IDs, approved message bytes, source consumption IDs, session scope, and lifecycle authority remain unchanged.
Proof
cd4504de2d, including all four direct/collected and context-visible/context-excluded rewrite variants plus direct and replay split-cursor casesnode scripts/check-changed.mjs -- <8 changed files>The original production trigger remains unproven. This PR addresses the reproduced custody and commit-order failures with synthetic fixtures only.