Skills 2026-08-31 15:04 UTC
skillscriptv0.40.1
Version [0.40.1] committed by sshwarts. Update Category: Testing & Quality Assurance. Commit details: test: de-flake the mid-flight deadline tests (60ms -> 300ms, named). This update adds test cases for better regression coverage.
CommitRaw commit message
test: de-flake the mid-flight deadline tests (60ms -> 300ms, named)
CI failed on ubuntu-latest for v0.40.1 with
`tests/deadlines-phase1.test.ts` — "expected undefined to be true" on
`r.deadlineExceeded`. Not a regression; the test is timing-sensitive and
the budget was too tight.
Four lines of evidence, strongest first:
1. A re-run of the SAME commit with no code change flipped ubuntu to
green.
2. Run 33331871144 failed on macOS for commit a48bfa6 — which changed
ONLY CHANGELOG.md and UPGRADING.md, 44 lines of prose. A docs-only
commit cannot break a runtime test.
3. The failing platform rotates run to run (windows, then macOS, then
ubuntu).
4. The mechanism is visible in the source: a 60ms deadline against ops
that sleep 1000ms/5000ms.
MECHANISM. These are MID-FLIGHT expiry tests: the deadline has to fall
after the op starts and before it finishes. 60ms left almost no room for
parse + setup + dispatch, so on a contended runner the budget was gone
before the op dispatched — nothing was in flight, nothing was cut, and
`deadlineExceeded` came back undefined rather than true.
Raised to 300ms at all FOUR sites that used 60ms, not just the one that
happened to fail today — the other three are the same hazard and would
have tripped next. Bounds checked before choosing the value: the shortest
thing kept in flight is `shell(command="sleep 1")` at 1000ms, so 300ms
clears setup with ~5x margin and still cuts that sleep with 3x to spare.
300ms is also already in use at line 352, so this aligns to an
established value rather than inventing one.
Extracted to a named DEADLINE_MID_FLIGHT_MS with the reasoning attached,
including both bounds and an explicit note not to "fix" a future failure
by relaxing the assertion — undefined there means the op never
dispatched, which is a different code path than these tests cover.
No product code touched. Suite 2412 passing; the deadline file run 5x
alone and the full suite twice, all green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XL4DLjokABUr6QwyYXLrxt