Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 12:20 PM ET / 16:20 UTC. ClawSweeper reviewWhat this changesThe PR registers two session transcript workers in the shared compiled-runtime entry set, streamlines SQLite byte assertions, and makes test cleanup tolerate an already-exited child process. Merge readinessNo introduced correctness or security defect was found. This maintainer-authored, still-useful refactor should remain open for exact-head CI and maintainer acceptance. Priority: P3 Review scores
Verification
How this fits togetherSession archive and reconciliation run in Node worker threads from source checkouts and packaged builds. The shared runtime-entry registry selects the matching worker URL so CI fixtures can reuse compiled outputs while production retains stable packaged paths. flowchart LR
A[Session archive or reconciliation] --> B[Worker launcher]
B --> C[Shared runtime entry registry]
C --> D[Worker URL resolver]
D --> E[Source or compiled worker]
E --> F[SQLite transcript result]
Decision needed
Why: The PR is associated with a repository member and carries the maintainer label, so automated cleanup must leave final acceptance to a maintainer. Before merge
Agent review detailsSecurityNone. PR surfaceSource -19, Tests +10, Docs +1, Other -4. Total -12 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the single shared worker-entry declaration after the exact PR head receives normal green CI, retaining the existing source and packaged resolution contract. Do we have a high-confidence way to reproduce the issue? Not applicable: the PR optimizes CI and test execution rather than reporting an end-user defect; the changed source/package resolution paths are directly traceable. Is this the best way to solve the issue? Yes: consolidating the duplicate resolvers into the existing shared runtime-entry registry keeps build and launch paths aligned without a parallel mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9cc05cca83e2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
8cc1e0f to
d088cbd
Compare
d94db62 to
9e29e39
Compare
767c47e to
acbf9f0
Compare
|
Implemented through #134038, merged as 4ee565c6d2a, including compiled session-worker reuse and native byte comparison. The integration preserves the connected main changes and removes the superseded duplicate paths. Exact-head CI33434384581 completed successfully with all applicable Testboxes green. Both Windows jobs, all 16 UI jobs and the macOS Node job passed. The integration PR records the focused source-owner and regression proof, including the Windows readiness repair and trusted-wrapper merge checks. This source PR is superseded by that verified landing. |
Related: #134038
What Problem This Solves
Windows CI repeatedly starts TypeScript loaders while testing transcript archive and reconciliation workers, even when the invocation already owns a compiled runtime generation. Large SQLite snapshot assertions also spend seconds expanding unchanged Buffer bytes into JavaScript entries.
Why This Change Was Made
The two existing workers now use the canonical runtime entry declaration and URL resolver. This removes their duplicate source/package resolvers and package-entry declarations, while retaining stable published worker paths, standalone source execution, original source preload arguments, messages and cleanup ordering. The existing real-worker fixture now verifies that archive execution uses its invocation-owned generation.
Five existing snapshot assertions use Node strict equality over the same complete Buffers and metadata. Native comparison preserves byte-for-byte protection without Vitest’s per-byte traversal. No SQLite schema, stored data, queue, worker count, concurrency, timeout, dependency or configuration changes.
User Impact
Faster developer validation with the same production worker behavior and exact snapshot checks. This PR is stacked on #134038 so its CI includes the already-reviewed startup and routing repairs; it will target main after that prerequisite lands.
Evidence
The existing borrower fixture fails before the runtime repair because the actual Worker URL still ends in source
.ts. Integrated validation passes the two actual compiled-borrower/standalone-source cases, 18 archive cases, four reconciliation lifecycle cases, 23 state-ownership cases and 23 package-entry guards. These retain archive byte fidelity, publication ordering, stale-state rejection, failure preservation and database-lease release before terminal messages.A controlled local replay preserves all 25 archive and two reconciliation Workers: archive test-body time falls from 17.01 to 4.95 seconds, with median archive-worker lifetime falling from 580.2 to 109.9 milliseconds. The existing ownership case falls from 1.727 seconds to 164 milliseconds; an eight-scenario parity probe rejects the same byte, length, metadata and file-set changes. These are local macOS measurements, not native Windows after timings. The Windows long-path test retains its platform guard and still requires native CI.
A full canonical package build passes in 3m30.9s and creates both previously absent stable worker outputs; both emitted files pass Node syntax checking. Parent integration passes all 70 focused cases. The complete changed-file gate passes, including all selected type programs and full lint. Scoped Codex review reports no actionable finding at the configured blocking threshold. Exact-head CI is required before landing. Whole CI below five minutes remains an open goal.
The previous CI failed an unrelated report-fixture cleanup race: a child could exit between a liveness probe and a raw SIGKILL, causing
ESRCHinfinally. The three affected cleanup sites now use the existingkillPidIfAliveowner, which accepts only that already-gone result and still throws other errors. A deterministic real-process interleaving reproduces the old race; all 43 report/helper cases pass after repair with the same assertions, signal sequence and deadlines. Both original commits remain byte-identical after restacking onto the parent's Gateway validation fixes. Full changed-file gates and fresh Codex review pass.Runtime/build code is net -23 lines, tests/support net +10 after the cleanup simplification, and documentation net +1. No retry, timeout increase or process-lifecycle assertion was added or weakened.