mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 22:48:57 +02:00
fix(test-runner): duration-packed walls keep the per-file floor — predictions don't transfer across machines
The committed duration seed is recorded on fast CI; a syscall-supervised sandbox replays the same files 2-4x slower. Observed post-merge: a 253-file shard predicted ~242s was wall-killed at its predicted-x3 725s wall while genuinely progressing (the old count heuristic guaranteed 1265s). Packed walls may be looser than the count floor, never tighter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
eacef8d5fa
commit
c45b2c2d17
@@ -654,4 +654,15 @@ describe('test-free-shards: duration-aware packing (full-suite LPT)', () => {
|
||||
// Tiny prediction: base still floors it.
|
||||
expect(wallTimeoutForPackedShard(1_000)).toBe(WALL_BASE_MS);
|
||||
});
|
||||
|
||||
test('packed walls never undercut the per-file floor (predictions do not transfer across machines)', () => {
|
||||
// The duration seed is recorded on fast CI; a syscall-supervised sandbox
|
||||
// replays the same files 2-4x slower. A 253-file shard predicted at ~242s
|
||||
// got wall-killed at predicted×3 = 725s while genuinely progressing —
|
||||
// the count-based floor (253 × 5s = 1265s) the runner always guaranteed
|
||||
// must survive duration packing. Looser is allowed, tighter is not.
|
||||
expect(wallTimeoutForPackedShard(242_000, WALL_BASE_MS, 253)).toBe(253 * 5_000);
|
||||
// When the prediction is the larger bound, it still wins.
|
||||
expect(wallTimeoutForPackedShard(600_000, WALL_BASE_MS, 10)).toBe(1_800_000);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user