oom-seq: --oom-seq-randomize (per-sequence length + window variety)#135
Merged
Conversation
`--oom-seq` previously emitted every sequence with a fixed length (--oom-seq-len) and a single module-wide failure window (--oom-window), so covering a range of sequence shapes meant running several fleet instances with different static configs. New `--oom-seq-randomize` (default off) instead draws, independently for each emitted sequence, the step count from [1, --oom-seq-len] and the failure window from [1, --oom-window] -- the configured values become upper bounds. One instance thus covers a spread of shapes; a fixed config is just the min==max case. Implementation: - oom_run() gains a `window` param (default _OOM_WINDOW) and uses it instead of the module constant; per-sequence windows are emitted as oom_run(..., window=k). The always-printed [OOM-SEQ] marker now includes window= so a crashing sequence's window is known on replay even without --oom-verbose. - _oom_pick_seq_len()/_oom_pick_window() helpers; both seq generators (function and class-method) draw per sequence. Window 0 (legacy fail-forever) is left as a static default and never randomized into. - Default off => generated output unchanged except oom_run's signature line. Tests: TestOOMSeqGeneration gains randomize-on (per-sequence window in bounds, lengths vary in bounds) and randomize-off (no per-call window kwarg) cases; the fixture pins oom_seq_randomize=False (MagicMock auto-attrs are truthy). Full suite 326 passed / 32 skipped; ruff clean. Docs: CLAUDE.md + doc/oom-sequences.md (which had already proposed this). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Closes #134.
What
New
--oom-seq-randomize(default off): each emitted OOM sequence independently draws its step count from[1, --oom-seq-len]and its failure window from[1, --oom-window](the configured values become upper bounds). One instance covers a spread of sequence shapes instead of a single static config — a fixed config is just themin == maxcase.How
oom_run()gains awindowparam (default_OOM_WINDOW); per-sequence windows emitted asoom_run(..., window=k). The always-printed[OOM-SEQ]marker now includeswindow=so a crashing sequence's window is known on replay even without--oom-verbose._oom_pick_seq_len()/_oom_pick_window()helpers; both seq generators (function + class-method) draw per sequence. Window 0 (legacy fail-forever) stays a static default, never randomized into.oom_run's signature line.Tests
TestOOMSeqGenerationgains randomize-on (per-sequence window within bounds; lengths vary within bounds) and randomize-off (no per-callwindow=kwarg) cases; fixture pinsoom_seq_randomize=False(MagicMock auto-attrs are truthy). Full suite 326 passed / 32 skipped; ruff clean. Docs updated (CLAUDE.md + doc/oom-sequences.md, which had already proposed this).🤖 Generated with Claude Code