Repository navigation
fix(windows): restore Gateway model runs with worker metadata - #155071
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. Reviewed September 21, 2026, 7:20 PM ET / 23:20 UTC (Revision 8). ClawSweeper reviewWhat this changesThe PR restores Windows model and thinking-level persistence by using the database worker’s captured environment, and improves synchronization and shared setup in related tests. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main. No blocking correctness or security finding emerged, and the recorded native Windows proof covers unchanged production source. Normal CI gates remain separate from this review. Priority: P1 Review scores
Verification
How this fits togetherSession metadata records model and thinking-level changes during agent runs. The session manager sends these changes through the database worker, which commits them and returns the resulting transcript state. flowchart LR
A[Agent model run] --> B[Session manager]
B --> C[Ordered write admission]
C --> D[Database worker]
E[Captured host environment] --> D
D --> F[SQLite session history]
F --> G[Committed transcript state]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +49. Total +52 across 5 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep metadata persistence on its existing worker and use that worker’s captured environment consistently without changing stored data or admission semantics. Do we have a high-confidence way to reproduce the issue? Yes: current main passes a Windows environment Proxy into V8 command serialization, and the regression exercises that exact boundary. This read-only review did not execute the failure. Is this the best way to solve the issue? Yes: reusing the already-captured worker environment removes the redundant payload while preserving the canonical database owner, ordering, and admission checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8acbd853756a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
ad23063 to
35dc861
Compare
83bd788 to
077eea4
Compare
077eea4 to
983cec7
Compare
2abb5cc to
20dc190
Compare
Prepare the existing complete candidate runtime once per suite while keeping each state, executor grant and qualification/finalization process isolated. Retain native inspection and finalization work until the shared fixture can safely clean up. Preserve full runtime build qualification and the existing 30-second test budget. Validation: all 20 cases passed on the configured Blacksmith Testbox with the unchanged build prerequisite; the retained-owner case completed in 4.934 seconds. Scoped native lint and fresh independent P2 review passed. The original CI timeout and local prerequisite failure remain recorded; no same-host speed ratio is claimed.
20dc190 to
a250c9e
Compare
|
Merged via squash.
|
…aw#155071) * fix(windows): restore Gateway model runs with worker metadata * test(update): share prepared candidate runtime across migration cases Prepare the existing complete candidate runtime once per suite while keeping each state, executor grant and qualification/finalization process isolated. Retain native inspection and finalization work until the shared fixture can safely clean up. Preserve full runtime build qualification and the existing 30-second test budget. Validation: all 20 cases passed on the configured Blacksmith Testbox with the unchanged build prerequisite; the retained-owner case completed in 4.934 seconds. Scoped native lint and fresh independent P2 review passed. The original CI timeout and local prerequisite failure remain recorded; no same-host speed ratio is claimed. Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes Windows Gateway model runs failing with “could not be cloned” when recording session model or thinking metadata.
Why This Change Was Made
The metadata command duplicated the host environment in its serialized payload. Windows environment snapshots use a case-insensitive Proxy, which V8 cannot serialize. The database worker already receives canonical captured state facts, so the repair removes the redundant payload and uses that existing context for initialization, appends and committed-view reads.
The migrated-update tests also reuse their existing prepared native candidate runtime across cases. Each case retains separate state, authority and fresh child processes; tracked work settles before shared fixture cleanup. Qualification, finalization, full-build prerequisites and deadlines are unchanged.
User Impact
Windows sessions can persist model and thinking changes through the canonical database worker. Database identity, writer authority, ordering, cancellation and transaction checks remain intact. No schema, public API or configuration change.
Related: #153216. Production LOC: +10/-7 (net +3), including ownership comments; tests/support: +116/-74. The final PR contains four files and no Codex question-test or workflow changes.
Evidence
chat.history. SQLite contained six expected events, includingmodel_change,thinking_level_change, user and assistant messages. Total fixture time was48.566 seconds; the native lifecycle owner joined all children and removed private state.ad230637c7e59d5c55545a348e074cd49716b6a5, SHA256b3d64a247ecb02904decb07c27208f30ae0ce6f8fb5d5748ef2ad98390efe32c. The metadata producer/worker and relevant admission/context source remain identical at current heada250c9e002cceff633de3b88a1e06cd22362d1a7. Existing static test authentication was used; production authentication was unchanged. This is isolated packaged proof, not a production rollout claim.a250c9efound no actionable P0–P2 findings (confidence0.96). Scoped lint and formatting passed. Current-head hosted CI remains the landing gate.Measured changed-test costs:
session-manager.test.ts,28 cases/10.622 seconds summed case time (46-test sibling run31.21 seconds total);update-command-migrated.test.ts,20 cases/69.33 seconds Vitest including setup. The native Windows proof and measured costs address the completed ClawSweeper review requests.