Repository navigation
Nightly Windows tests stop timing out: shards pack by Windows test times (GST-3440) - #4661
Merged
Merged
Conversation
… 12 minutes (GST-3440) The Windows plan already read free-test-durations-windows.json, but a file missing from it was packed at the Windows 99th percentile (161 s). 27 such files made the packing balance phantom load, so one shard on #4646's tree held 946 s of real Windows time against a 900 s job and was cancelled twice (run 44971202453). A missing Windows time now falls back to the file's Linux time, and the plan adds shards from 8 until every shard predicts at most 720 s (80% of the job). Main's seeds now plan 10 shards, heaviest 650 s. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…Windows check still lists its files (GST-3440) windows-scoped-tests plans with --windows-only --ci-plan --shards 1 only to list the curated files, and the always-on 720 s budget made that plan fail. The budget is now opt-in through --shard-budget-seconds, which windows-free-tests.yml passes. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The Windows plan now reads scripts/free-test-durations-windows.json from scripts/test-free-shards.ts, so PR selection derived 250 paid cases from a seed edit (test/free-fixtures.test.ts, Free Tests 44977434508). The seed is free-only data, like the Linux seed beside it; the harness pin records the change as non-behavioral. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The nightly Windows test run no longer cancels a shard at its 15-minute limit: files without a Windows time use their Linux time instead of a 161 s guess, and the plan adds shards past eight until no shard holds more than 12 minutes.
Why: one shard on #4646's tree held 946 s of Windows work against a 900 s job and was cancelled twice (run 44971202453); any PR adding test files could trip it.
Nothing to do: the Windows run is nightly-only and this changes no test selection, timeout or retry.
What changed
The nightly Windows run kept losing a shard to its 15-minute job limit. Files that the Windows timing record didn't list were packed as if each took 161 s, so packing balanced made-up load and some shards ended up with more real work than the job allows. Now a file missing from the Windows record uses its Linux time, and the Windows plan adds shards beyond eight (up to sixteen) until no shard is predicted past 720 s. If even sixteen shards can't fit, the plan fails and says to refresh the Windows timing record.
scripts/test-free-shards.ts:--windows-only --ci-planreadsfree-test-durations-windows.jsonoverfree-test-durations.jsonper file. The new--shard-budget-secondsflag, passed only bywindows-free-tests.ymlwith 720 (80% of the job), makescreateWindowsCiPlangrow the shard count from--shardsup to twice that. The scoped Windows check's single-shard listing plan takes no budget and is unchanged.windows-free-tests.yml: the plan step drops itsGSTACK_FREE_TEST_DURATIONSoverride, since the planner now reads the Windows record itself.scripts/test-pr-profile.ts: an edit toscripts/free-test-durations-windows.jsonno longer selects paid test cases, because only the free Windows plan reads it (harness pin updated, non-behavioral).On the committed timing records, main 7abc194 plans 8 shards with shards 1 and 7 at 835 s and 832 s; this branch plans 10 shards, the heaviest at 650 s. Replayed on #4646's tree b6d4150: the old plan's shard 3 held 946 s; the new plan has 9 shards, the heaviest at 670 s.
Evidence
test/windows-native-workflows.test.tsruns the workflow's own plan step on the real seeds and fails if any shard's recorded Windows time (Linux fallback) or prediction passes 720 s. On main 7abc194 it fails with shards 1 and 7 at 835 s and 832 s; with the fix it passes (10 shards, heaviest 650 s).Why
"One shard on #4646's tree held 946 s of Windows work against a 900 s job and was cancelled twice (run 44971202453)." The nightly Windows result now completes instead of losing a shard whenever a PR adds test files.
Blast radius
Only plans built with
--windows-only --ci-planread the Windows record, and only the nightly workflow passes the budget, so the Linux plan, the scoped Windows check (--shards 1) and every PR check are unchanged. Script ran: the scoped listing plan still gives one shard, and a budget on a non-Windows plan is rejected. The aggregate and verify steps follow the plan's shard count, not a fixed eight (file read).Test Coverage
Tests: unchanged by the audit (+0 new). Coverage: 78% value-weighted (78% including 0 weakly covered paths). Test value: 0 tests written, 0 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered.
Proposed tests for the two gaps, not written (the audit ran audit-only):
Tests ran: free 1739
Pre-Landing Review
No issues found by the batched specialist (testing, security, state machines), the red team or the second-model review. The adversarial reviewer raised four notes below the blocking floor; none would fail a test, break production or lose data, so none was fixed here. Full output stays with the run.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
scripts/test-free-shards.ts:396completeness: a file missing from the Windows record packs at its Linux time, which can be near zero for a Windows-only test, and the unseeded-file warning no longer names it. Only the nightly Windows run can overrun.scripts/test-free-shards.ts:456completeness: on a Windows plan the unseeded-file warning prints the Linux refresh command (code this PR did not change).scripts/test-free-shards.ts:521api-contract:--job-setup-secondsis ignored in planning when--shard-budget-secondsis set; no workflow passes both.scripts/test-free-shards.ts:396completeness: a missing Windows record falls back to Linux times without a warning, and the Windows loader ignoresGSTACK_FREE_TEST_DURATIONS.Exploratory QA
Functional (CLI
scripts/test-free-shards.ts), 4 probes in a 300 s smoke budget, report-only. Verdict: pass.--windows-only --ci-plan --shards 8 --shard-budget-seconds 720exits 0 with 10 shards, heaviest 650 s.--windows-only --ci-plan --shards 1with no budget exits 0 with one shard.--ci-plan --shards 8 --shard-budget-seconds 720without--windows-onlyexits 1 ("applies only to --windows-only --ci-plan").Not observed here: in-shard wall time on a Windows runner (Windows Free Tests run 44977432351 at e44735b passed all 10 shards and the aggregate).
Verification Results
No plan file (bug fix): 0 plan checks. The failing-first test in
test/windows-native-workflows.test.tsfails on main 7abc194 (shards 1 and 7 at 835 s and 832 s) and passes here.Scope Drift
Scope Check: CLEAN. Intent: stop the nightly Windows run losing a shard to its job limit. Delivered: Windows plans pack by Windows time with a Linux fallback and grow shards under a 720 s budget, plus the paid-selection exclusion for the Windows record.
Issues
Refs #4646
TODOS
No TODO items completed in this PR.
Documentation
Scope: I reviewed the full diff against 7abc194 (seven files) at tree 84d828421f89494dfec26755922e6c0b46c71a93. I scoped the audit by hand from the diff and from searches of docs, README, CONTRIBUTING, CLAUDE.md and AGENTS.md. I did not use the skill's audit-scope discovery helper. No staged, unstaged or new files sit outside the diff. gstack-skill-start, run with the launch env sourced, printed
SESSION_KIND: spawned(SPAWNED_OVERRIDE: env (GSTACK_SESSION_KIND)).Result: The docs are current and I changed no files.
docs/TESTING_INTERNALS.mddescribes the Linux-time fallback and says--shard-budget-seconds 720makes--shards 8a floor. The workflow comment matches the new planner behavior. The changelog fragment describes the user-visible change. The searches found no stale mention of the shard count, the removedGSTACK_FREE_TEST_DURATIONSsetting or the 161 s fallback.Debt: None found.
docs/TESTING_INTERNALS.mdline 1848 shows the plan command without the budget flag, but line 1854 explains the flag right after it, so no edit was needed.Tests
Agent notes
GSTA-674's diagnosis that the Windows seed wasn't read was wrong; the named fix (Linux fallback per file, plus headroom) still applies. Windows Free Tests run 44977432351 ran at e44735b (44977158062 at 172dccb was cancelled when the second commit landed; that head's always-on budget broke windows-scope).
Refs GST-3440
Approvals
No approvals recorded for branch windows-shards-pack-by-windows-time.
Plan: exempt: bug fix with a failing-first test; bug fixes need no plan review
Plan check: exempt bug fix
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=4 fixed=0 scope=frozen ledgers_read=2 dispatches=4
Gate edits: 6 listed, 5 read, 0 findings — 0 kept, 0 restored, 0 open
Outside review: openai/gpt-6.1-sol (host subagent) completed, verdict CLEAN.