feat(saturation): configurable tuning knobs; deprecate stop_after_failures#151
Merged
brayniac merged 1 commit intoJun 13, 2026
Merged
Conversation
…lures iopsystems#5 — promote the saturation search's hardcoded tuning constants to optional config, all defaulting to their current values (zero behavior change): - confirm_windows (default 3): windows used to confirm the boundary (M-of-N). Threaded into SearchPlanner (replaces the CONFIRM_WINDOWS const), clamped to >= 1. - drain_settle_ms (default 500): settle time after draining before measuring. - drain_timeout_secs (default = sample_window): max wait for in-flight to drain. iopsystems#6 — stop_after_failures is dead since the bisect+confirm rewrite. It can't be removed outright because SaturationConfig is deny_unknown_fields (existing configs that set it would be rejected), so it's now Option<u32>, parsed-but-ignored, and a warning is logged if a value is present, nudging users that the knob no longer does anything. Example config documents the new knobs and the deprecation. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary
Design-limitations #5 and #6 — both small cleanups to the saturation config.
#5 — promote the search's hardcoded tuning constants to optional config, all defaulting to their current values (zero behavior change unless set):
confirm_windows(default 3) — windows used to confirm the final boundary (M-of-N); higher is more noise-robust but slower. Threaded intoSearchPlanner(replaces theCONFIRM_WINDOWSconst), clamped to ≥ 1.drain_settle_ms(default 500) — settle time after draining before measuring a rung.drain_timeout_secs(default =sample_window) — max wait for in-flight to drain before measuring a down-stepped rung.#6 —
stop_after_failuresis dead since the bisect+confirm rewrite (#145). It can't be removed outright becauseSaturationConfigis#[serde(deny_unknown_fields)], so a config still setting it would be rejected. Instead it's nowOption<u32>, parsed-but-ignored, and a warning is logged if a value is present, telling users the knob no longer does anything.The example config documents the new knobs and the deprecation.
Test plan
cargo test— 99 lib + 16 integration tests pass, 0 failures (planner convergence tests still pass with the now-parameterizedconfirm_windows).cargo clippy --all-targets— cleancargo fmt --check— cleanstop_after_failureswas already unused. Thedeny_unknown_fieldsinteraction is safe — the field still exists (asOption), so old configs that set it deserialize fine.Generated with Claude Code