Repository navigation
improve(tests): accelerate local service timeout fixture - #118104
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 2:21 PM ET / 18:21 UTC. ClawSweeper reviewWhat this changesThe PR speeds up the provider local-service failed-startup test by advancing the nested test host’s readiness clock after its real child process starts, avoiding a five-second wall-clock wait. Merge readinessThis PR remains necessary: current Priority: P3 Review scores
Verification
How this fits togetherProvider local services are optional child processes started for model endpoints. The local-service manager probes a child until it becomes healthy or reaches its readiness deadline, then releases diagnostic pipes and terminates the child when startup fails. flowchart LR
A[Provider local-service test] --> B[Nested Node host]
B --> C[Real local child process]
C --> D[Readiness probe]
D --> E{Healthy before deadline?}
E -->|No| F[Startup cleanup]
F --> G[Diagnostic pipes released]
G --> H[Host and child exit assertions]
B --> I[Test-only clock advance]
I --> E
Before merge
Agent review detailsSecurityNone. PR surfaceTests +18. Total +18 across 1 file. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the production lifecycle contract unchanged and merge this focused fixture acceleration after normal maintainer review of the current head. Do we have a high-confidence way to reproduce the issue? Yes. Current main visibly configures the failed-readiness cleanup fixture with a 5,000 ms timeout, and the production loop reaches its error after the Date.now-based deadline; executing it was intentionally omitted in this read-only review. Is this the best way to solve the issue? Yes. Advancing only the nested host’s clock after the real child writes its PID preserves the failed-startup and pipe-cleanup boundary while removing avoidable wall-clock delay; it is narrower than changing production timeout behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1f7e2f0dc673. 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.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
The provider local-service test suite spent five seconds of wall time waiting for a real readiness deadline solely to verify that diagnostic pipes are released after a failed startup. That made one cleanup regression test dominate the focused file.
Why This Change Was Made
The test still starts a real child process and exercises the production timeout and cleanup path. Its nested host advances only its own clock after the service PID exists, then asserts both the exact readiness-timeout error and that the clock advance actually occurred. Production code, production timeout values, coverage, and test sharding are unchanged.
User Impact
No product behavior changes. The focused test file completes substantially faster while retaining the same process-lifecycle coverage.
Evidence
node scripts/run-vitest.mjs src/agents/provider-local-service.test.ts: 22/22 passing on repeated runs.git diff --check: clean.node scripts/check-changed.mjsattempted remote delegation; Blacksmith Testbox and brokered Crabbox were unavailable, so focused local proof was used and hosted CI is the broad gate.