Skip to content

fix(fuzz): derive FuzzReadAgent's canonical set from agent.All() - #175

Merged
skzv merged 1 commit into
mainfrom
claude/fix-fuzzreadagent-roster
Aug 3, 2026
Merged

fix(fuzz): derive FuzzReadAgent's canonical set from agent.All()#175
skzv merged 1 commit into
mainfrom
claude/fix-fuzzreadagent-roster

Conversation

@skzv

@skzv skzv commented Aug 3, 2026

Copy link
Copy Markdown
Owner

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", ReadAgent correctly returned kimi and the stale check failed. Nondeterministic draw explains why PR-level fuzz passed and main's run didn't.

  • The canonical set is now derived from agent.All() so roster growth can't stale it again.
  • "Kimi" added as a deterministic seed (exercised by plain go test too).
  • Verified with a 30s local fuzz run (75× the CI budget) — clean.

🤖 Generated with Claude Code

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
skzv merged commit fe77a56 into main Aug 3, 2026
6 checks passed
@skzv
skzv deleted the claude/fix-fuzzreadagent-roster branch August 3, 2026 06:03
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant