Repository navigation
Conversation
Preserve own symbol-keyed data descriptors in transcript clones so explicit reset-retained history survives provider sanitization and turn validation before history limiting. Keep the string-key copier and immutable sharing fast path unchanged. Fixes the regression introduced by #195961. Tests cover all three replay hook routes and symbol descriptor, alias, cycle, and detached-value contracts. Allocate exactly 108 regression-test lines.
|
🦞👀 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 Summary: ✅ CompletedThis 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 preserves symbol-keyed transcript metadata when cloning messages for provider replay hooks. Example: Retain “retained before reset,” then add “new turn 1” through “new turn 3” with historyLimit=1 and a replay hook.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a source-confirmed retained-history regression still present on main; no actionable patch defect was found, and exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSession context construction marks explicitly retained messages; provider replay hooks receive detached clones before history limiting selects the model’s conversation window. flowchart LR
A[Session entries] --> B[Context construction]
B --> C[Transcript clone]
C --> D[Provider replay hooks]
D --> E[History limiting]
E --> F[Model context]
Technical reviewBest possible solution: Preserve symbol data descriptors and graph aliases in the existing transcript copier while retaining its immutable-sharing and opaque-value fallback behavior. Do we have a high-confidence way to reproduce the issue? The current-main producer, clone boundary, and history-limit consumer establish the failing path, and the added integration fixture supplies concrete inputs; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch is the smallest complete repair using the existing owner: it preserves metadata at the point of loss without adding caller-specific retention policy, state, or another cloning path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4b077d31b914. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +7, Tests +108, Other +2. Total +117 across 4 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 November 9, 2026, 9:27 AM ET / 14:27 UTC. |
|
Landing note (maintainer review): fixes a regression from #195961 (245cbaf, not yet deployed to Team). The provider replay hook detaches messages with |
openclaw#196023) Preserve own symbol-keyed data descriptors in transcript clones so explicit reset-retained history survives provider sanitization and turn validation before history limiting. Keep the string-key copier and immutable sharing fast path unchanged. Fixes the regression introduced by openclaw#195961. Tests cover all three replay hook routes and symbol descriptor, alias, cycle, and detached-value contracts. Allocate exactly 108 regression-test lines.
What Problem This Solves
Fixes retained history being cut after a reset when a provider replay hook runs before history limiting. With three newer user turns and
historyLimit=1, the explicitly retained prelude must remain alongside the newest turn. Regression from #195961 (245cbaf915c2).User Impact
Explicitly retained reset history survives provider replay sanitization and turn validation. No configuration, schema, migration, or provider API change.
Why This Change Was Made
cloneTranscriptViewpreviously enumerated only string keys, dropping the non-enumerable prelude marker. A symbol-only pass now preserves own symbol data properties and their descriptors, recursively copying values using the existing cycle/alias map. The existing string-key loop is unchanged. The immutable-payload sharing fast path remains unchanged. Production change: +7/−0 lines, net +7; the extra lines preserve metadata without adding another owner or cache.The marker audit also covers steering-message identity, attached steering runtime context, and memory reset-recall cutoff metadata. The latter two have object-valued payloads; tests verify detachment and cyclic/shared references. Non-enumerable string properties remain excluded.
Evidence
245cbaf9: all 3 replay-hook regression cases fail by losing the retained prelude; both clone-marker cases fail by losing descriptors. The fixed-source focused result is below.transcript-snapshothas no direct Control UI consumer.pnpm check:changedcompleted; all task-owned gates pass after repairing and rerunning the new fixture's typecheck. The changelog-attribution and dead-export failures reproduce on main and are detailed below.Reflect.ownKeyspass because the same workload increased CPU 30.3% and allocation 83.6%.The 108-line test allocation covers the requested retained-reset replay regression across all three hook routes and the independent clone descriptor/alias contract. Individual changed-file test durations: snapshot 0.47 s, provider replay 3.93 s including worker import/transform; actual test bodies are milliseconds. CI duration is pending.
The lead owns merge. No deployment was performed.
Unresolved main check failures requiring follow-up
Changelog attribution fails on exact parent
245cbaf915c21c6cc02ba2edbe3c62e2725a133e(20 credits), introduced by266a7aa0fe69/ #194364. Dead exports:authorDisplayNameintroduced by832bbf926fc5;isLaunchctlNotLoadedbarrel orphaned byb4262689db5d/ #130634;parseLaunchAgentEnabledandresolveLaunchAgentPlistPathbarrels became production-unused at3d707a9b963b/ #121929. These are unresolved main defects, not passing checks. Both dead-export scans reproduce on the exact parent with an emptygit diff 245cbaf9 --name-only; only the candidate files were temporarily removed/replaced for that run, then restored.