feat(queue): configurable min-severity gate (Codex #3)#16
Merged
Conversation
The loop processed whatever the scanner surfaced, so a flood of low-severity documentation/dead-code tasks could spend the budget before a critical test-failure was ever reached. Add a severity floor. - `SEVERITY_RANK` + `meetsSeverityFloor()` define the ordering (critical < high < medium < low). - `TaskQueue` gains a `minSeverity` option. Below-floor tasks are refused at enqueue, and any below-floor task persisted under an older, lower floor is skipped at dequeue (so tightening the floor takes effect on reload). - `ImprovementLoopConfig.minSeverity` (optional, defaults to `low` = accept-everything) threads through `runLoop`. - `run:a --min-severity <critical|high|medium|low>` exposes it on the CLI and the run summary prints the active floor. Default behavior is unchanged: omitting the floor accepts every severity. Adds queue tests (enqueue drop, default-accepts-all, persisted-below-floor skip) and a `meetsSeverityFloor` table. Co-Authored-By: Claude Opus 4.8 <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.
Summary
Codex review finding #3 — no way to focus the loop on what matters. The loop processed whatever the scanner surfaced in priority order, so a flood of low-severity
documentation/dead-codetasks could burn the per-run budget before acriticaltest-failure was ever reached. This adds a configurable severity floor.Changes
SEVERITY_RANK+meetsSeverityFloor()(types.ts/task-queue.ts) — single source of truth for severity ordering:critical < high < medium < low.TaskQueueminSeverityoption — below-floor tasks are refused atenqueue; any below-floor task persisted under an older, lower floor is skipped atdequeue, so tightening the floor takes effect on the next reload.ImprovementLoopConfig.minSeverity— optional, threaded throughrunLoop. Defaults tolow(accept everything) → existing callers are unaffected.run:a --min-severity <critical|high|medium|low>— CLI surface; the run summary prints the active floor.Test plan
New
task-queue.test.tscases:low) accepts every severity — backwards-compatibility guardmediumtask persisted under the default floor is not served after reload with--min-severity highmeetsSeverityFloortruth tableLocal validation:
asil-improvement-loop184 tests,asil-runners65 tests, build + typecheck clean across both packages.