fix(fuzz): derive FuzzReadAgent's canonical set from agent.All() - #175
Merged
Conversation
The invariant was hardcoded to the original four agent IDs; when the roster expanded to 15 (#161), any fuzz draw hitting a newer agent's name failed CI — it finally did on main when the fuzzer generated "Kimi" (run 30788397013). ReadAgent's behavior is correct (validated via agent.ParseID); the check was stale. Derive the canonical set from agent.All() so roster growth can't stale it again, and seed the fuzzer with "Kimi" so the case is exercised deterministically in plain go test runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
skzv
added a commit
that referenced
this pull request
Aug 5, 2026
Caught by a 45s pre-release fuzz sweep — CI's 100k-exec smoke pass never drew the input. Same bug as #175, in the sibling target I didn't audit at the time: the invariant listed six agent IDs while the roster has fifteen, so ParseID("Kimi") correctly returning ("kimi", true) failed the test. The behavior was right; the hand-written set was stale. Derive from All() so roster growth can't stale it again, seed "Kimi" for deterministic coverage in plain go test runs, and commit the fuzzer's archived failing input as a regression seed. Audited the other six fuzz targets for the same shape — none carry a hardcoded agent allowlist (internal/tui's uses IDClaude as a fixed input value, not as a permitted-set check). Co-authored-by: Claude Fable 5 <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.
Fixes the fuzz failure on main (run 30788397013, the #171 merge commit) — not a bug from today's batches.
FuzzReadAgent's invariant was hardcoded to{claude,codex,antigravity,cursor}; the roster expanded to 15 agents in #161, so the day the fuzzer randomly drew"Kimi",ReadAgentcorrectly returnedkimiand the stale check failed. Nondeterministic draw explains why PR-level fuzz passed and main's run didn't.agent.All()so roster growth can't stale it again."Kimi"added as a deterministic seed (exercised by plaingo testtoo).🤖 Generated with Claude Code