Repository navigation
fix: preserve Code Mode collector replay during argument coercion - #200679
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 maintainer review before merge. What this changesPreserve private Symbol metadata during tool-argument coercion and repair an outdated invalid-input test. Example: Code Mode executes
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR narrowly repairs a source-confirmed collector replay regression still present on main; no introduced correctness defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared coercion adapter normalizes OpenClaw tool arguments before runtime or harness execution; the collector bridge also supplies private metadata needed to identify replayed launches. flowchart LR
A[Code Mode agents.run] --> B[Collector bridge]
B --> C[Tool search runtime]
C --> D[Argument coercion]
D --> E[Native sessions_spawn]
E --> F[Collector registry]
F --> B
Technical reviewBest possible solution: Keep the existing coercion owner, preserve host Symbol descriptors on its validated result, and retain the existing collector replay regression. Do we have a high-confidence way to reproduce the issue? The source establishes the failure: the bridge attaches replay Symbols, the shared validator clones arguments without those Symbols, and sessions_spawn reads the missing metadata; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair at the shared adapter: preserve private metadata while leaving public normalization, validation, and collector authorization with their existing owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3777fda157ff. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +7, Tests +4. Total +11 across 2 files. Added test files: 0. 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. 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 17, 2026, 11:16 AM ET / 16:16 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…00679) (cherry picked from commit 7a55c60) Backport review: Required companion to #193200; retain private host invocation symbols across argument coercion so Code Mode collector replay remains functional. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit b0e18e92d74deb8b334a6210595d045c7222e8ab)
What Problem This Solves
Code Mode collector launches lose their replay identity when tool arguments pass through the coercion added in #193200. A resumed invocation can no longer find its existing collector. The same change made an old negative test input valid because numbers are intentionally coerced to strings.
User Impact
Collector calls retain their replay identity through argument coercion. Public arguments still follow the existing normalization and validation rules; no configuration or protocol changes are required.
Why This Change Was Made
The coercion adapter now preserves own Symbol property descriptors after validating the public JSON fields. It does not restore unvalidated string properties or change the live collector guard. The existing headless negative test now supplies a genuinely noncoercible object instead of a number.
Related: #193200
Evidence
20248a9ec7c38fc70751bcd31223684657f4621e.Local proof used macOS and the pinned OpenClaw Bun fork, with matched owner/test inputs overlaid on an existing qualified native checkout. It is not a full-current-tree or live Gateway result; PR CI supplies broader coverage. All temporary source overlays were restored.
Exact-head PR CI run 44121186351 completed with five independently attributed baseline failures: four jobs stopped before tests because the Git PPA returned HTTP 503, and core lint rejected the existing
_warningidentifier insubagent-result-owed.expiry-discard.test.ts. Security passed. The actual tested merge has unchanged failing owners relative to its main baseline. These failures remain recorded; the scoped inherited-failure landing exception does not claim green CI or broaden the Code Mode fix.