Skip to content

[BUG] Adding species remaps existing buddies #84

Description

@jpmalone0

I went to submit a PR for a new species and ran into 2 failed tests:
✗ generateBones > golden snapshot: 'golden-user-alpha' (common ghost) [0.25ms]
✗ generateBones > golden snapshot: 'golden-user-beta' (common rabbit) [0.08ms]

The problem is the species selection in generateBones uses pick(rng, SPECIES) which computes floor(rng() * arr.length). This means any change to SPECIES.length (like adding a new species) remaps existing buddies to different species.

Proposed fix:
Remove/update the golden snapshots. Additions to the number of species only affects new generations, anyway. Since we already allow for so much customization, a user should never really worry about "losing" their buddy regardless. They can regenerate a buddy with the same species, rarity, eyes, hat, etc. trivially. I personally don't see how the number of species can be scaled out while maintaining the current requirement.

Steps to reproduce

  1. Create a new species (and update art.ts, engine.ts, and buddy-status.sh accordingly)
  2. Run bun test
  3. Observe errors related to species being re-mapped

Environment

  • OS: macOS 26
  • Claude Code version: 2.1.112
  • Bun version: 1.3.12
  • Terminal: cmux

Screenshots
New proposed species: Wyvern
Image
Image
Image

Status line output (renders differently in terminal)
echo '{}' | ~/.claude-buddy/../statusline/buddy-status.sh 2>/dev/null
⠀ .------------------------------. } {
⠀ | drums claws once this is | |^```^/|
⠀ | the kind of issue that saves |-- \ ✦' '✦ /
⠀ | someone three hours six | \ } { /
⠀ | months from now | (° °)
⠀ `------------------------------' '-'
⠀ Fewn

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions