Repository navigation
improve: speed up updater preview signal tests - #150439
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 16, 2026, 9:10 PM ET / September 17, 2026, 01:10 UTC. ClawSweeper reviewWhat this changesThe PR runs updater preview-signal tests through the existing compiled test runtime while retaining TypeScript loading for source/watch execution. Merge readiness✅ Ready for maintainer review This remains a useful, focused optimization: current main still loads TypeScript separately for these preview tests. No actionable correctness or security defect was found, and the maintainer-protected PR is not a cleanup candidate. Priority: P3 Review scores
Verification
How this fits togetherUpdater preview tests launch isolated child processes, send operating-system signals, and inspect update-history records afterward. The shared test compiler supplies the same runtime modules without repeated TypeScript startup. flowchart TD
A[Preview signal tests] --> B{Test execution mode}
B -->|Repository runner| C[Shared compiled modules]
B -->|Source or watch| D[TypeScript preload]
C --> E[Isolated child process]
D --> E
E --> F[Signals and exit handling]
F --> G[History and cleanup assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +15. Total +15 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Reuse the shared compiled graph while preserving source/watch execution and every existing signal and state-preservation assertion. Do we have a high-confidence way to reproduce the issue? Not applicable as a product bug: this is a test-performance optimization with an author-reported before/after comparison; timings were not independently rerun. Is this the best way to solve the issue? Yes. Reusing the existing compiler and declaration mechanism follows the neighboring signal tests and avoids weakening coverage or introducing another runtime owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e1804606aebc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Nine updater preview-signal tests repeatedly load the TypeScript runtime in fresh child processes; they account for 70.4 of 79.4 seconds of this test file in a recent main CI run.
User Impact
Faster test execution with no user-visible runtime change. All nine signal scenarios, fresh state directories, IPC handshakes, database assertions, deadlines and child cleanup remain intact. No additional shards or workers.
Why This Change Was Made
Use the shared compiled test runtime already used by the neighboring mutable-signal tests. Reuse the existing command, ledger, state and recovery declarations, and expose the already-loaded signal-barrier module through the same test build. Source/watch execution retains its TypeScript preload.
Evidence
Same-checkout Node 24 / pnpm 12.4 comparison: all nine cases pass; summed case time falls from 43.585s to 9.462s (78.3%). The complete targeted invocation, including preparation and cleanup, falls from 63.48s to 22.18s. These are local measurements, not a whole-CI speedup claim.
The complete updater-run and mutable-signals files pass all 54 cases with the frozen dependency install. The neighboring one-shot-exit file also passed 36 cases. Independent P2 review is clean. Changed-scope checks pass, including the full core-test typecheck, dead-code guards and targeted lint. Exact-head Linux CI passes the changed-test and boundary jobs. On its two-CPU/8.22-GB runner, all nine preview cases pass in 8.228s combined (0.869–0.985s each); the full 44-case file passes in 15.34s. The existing shared build takes 12.377s for the complete changed-test job. These native results confirm behavior and fast execution, not a matched Linux before/after comparison. Source-mode URL checks retain all five original modules and the TypeScript preload.
Production LOC delta: zero. Test/test-support delta: +21/-6.