test: derive the persona count instead of hardcoding seventeen - #26
Merged
Conversation
Final audit of the v2 work found the recurring bug class in its last hiding place: the tests that guard against hand-maintained rosters were themselves pinned to a roster size. Four assertions compared against a literal 17. Simulated an eighteenth persona: four tests failed purely on the count, so adding a team member would have broken the suite for no reason and trained whoever hit it to edit the number rather than ask why. The count now derives from profiles/, skipping the coordinators, the same way every roster the CLI prints derives from them after the previous change. Verified both directions. An eighteenth persona that is generated passes 209/209. An eighteenth persona added without regenerating fails four tests that name it: the missing subagent, the regeneration diff, and the handoff brief absent from its command and its agent. The suite scales with the roster and still catches drift. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019j5DHEZsoeCGRueTbNLuTb
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.
Found during the final audit of the v2 work. The recurring bug class was in one last place, and it's a slightly embarrassing one: the tests that guard against hand-maintained rosters were themselves pinned to a roster size.
Four assertions compared against a literal
17.Reproduction
Simulated an eighteenth persona by adding a profile and regenerating:
Adding a team member would have broken the suite for no reason, and trained whoever hit it to bump the number rather than ask why the number was there.
Fix
PERSONA_COUNTderives fromprofiles/, skipping the coordinators — the same derivation the CLI rosters now use after #25.Verified both directions
nova: missing subagent, regeneration diff, handoff brief absent from its command and its agentSo the suite scales with the roster and still catches drift. That second case is the one that matters — deriving the count must not weaken the check.
shellcheck clean.
Generated by Claude Code