Repository navigation
Revert "perf(state): omit unchanged entries from transcript commit receipts (#184215)" - #184276
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR restores full session entries in transcript commit receipts and removes host-side entry reconstruction. Example: Append a transcript event while retaining an unchanged session entry containing a 32 KiB skills snapshot.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: the maintainer-directed revert exactly restores the prior receipt implementation, and no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe durable session actor executes mutations in the database worker and sends committed outcomes to the host for publication, observers, and replica installation. flowchart LR
A[Transcript append command] --> B[Database worker mutation]
B --> C[Complete committed receipt]
C --> D[Native receipt transport]
D --> E[Host settlement checks]
E --> F[Publications and observers]
F --> G[Session replica]
Technical reviewBest possible solution: Restore complete worker receipts now and revisit entry omission only after a consumer audit and streaming allocation comparison. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the additional host clone on matching unchanged-entry appends, and the maintainer reports its allocation profile; the overall performance regression was not independently reproduced. Is this the best way to solve the issue? The exact revert is the smallest complete rollback using existing receipt owners and preserves detached outcomes without introducing an unaudited frozen-entry alias. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5f71bbf09e6a. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -59, Tests -43, Docs -7, Other -203. Total -312 across 7 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 26, 2026, 2:24 AM ET / 06:24 UTC. |
…ceipts (openclaw#184215)" (openclaw#184276) This reverts commit 5401484. Team r222 stress profile: the host-side structuredClone in restoreSessionActorCommittedOutcome costs 33.55 MB/30 s on the main thread, more than the receipt bytes it saved. Re-land only with a consumer audit and a main-thread allocation A/B.
Reverts #184215 (e512f2a).
What Problem This Solves
#184215 removed the unchanged session entry from transcript commit receipts and restored it on the host with
structuredClone(reference.entry). Before it, the host only deserialized that entry once from the worker message;structuredCloneserializes and deserializes on the main thread, so main-thread copying of the entry roughly doubled. On Team that is now a top-10 main-thread allocation row under streaming load, costing more than the receipt bytes it saved on the worker.Dropping the clone is not a safe quick fix: the preimage is the replica's frozen hot state and the clone keeps public outcomes from aliasing it (a consumer mutating the outcome entry would throw in strict ESM). That needs a full consumer audit, so this restores the previous behavior now.
Evidence
structuredClone@js_transferable < restoreSessionActorCommittedOutcome < (anon)@session-actor-durable= 33.55 MB / 30 s on the main thread.git revert(same 7 files, −316/+4); it restores the previous receipt projection exactly. Focused session-actor receipt tests run in CI.Follow-up
Re-land only as a separate PR with (1) a consumer audit proving the restored entry is never mutated, returning the frozen preimage without a clone, and (2) a main-thread allocation A/B under streaming load.