squad cast can't add a second member with the same role: the provenance "rename" heuristic matches on the exact role string
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- backend-api-design, cli
Direzione di ricerca
Start with packages/squad-sdk/src/casting/agent-provenance.ts around reconcileAgentProvenanceRegistry and the roleHints check, then trace how packages/squad-cli/src/cli/commands/cast.ts calls it. Check the cast command tests for repeated roles and rename behavior. Done means a new member can share an existing role without being mistaken for a rename, with the command’s rename behavior defined explicitly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version: CLI built from release/prepare-2.0.0-preview.5 @ 38d45d02 (package version 2.0.0-preview.6).
What happens
Casting a second member whose role string equals an existing active member's role is rejected:
D=$(mktemp -d); cd "$D"; git init -q
node <squad-cli>/dist/cli-entry.js init --roles --client copilot,claude
node <squad-cli>/dist/cli-entry.js cast --name Alpha --role "Test Engineer" # ✓
node <squad-cli>/dist/cli-entry.js cast --name Beta --role "Test Engineer" # ✗
AgentProvenanceError: New agent id "beta" ambiguously resembles existing role owner(s) alpha; supply the existing stable id for a rename
Teams with two or more people in the same role (two Test Engineers, two Backend Engineers) can't be cast with squad cast. The only workaround is to invent a distinct role string for each member. This failure also leaves partial state behind; that's #2525.
Why it looks wrong
- The docblock on
reconcileAgentProvenanceRegistrysays identity binds only through the explicit id: "Display name, role, labels, paths, and other incidental signals never establish identity." TheroleHintscheck makes role establish (suspected) identity anyway. - The hint can't be followed from the CLI.
squad castderives the id from--name, and it has no way to "supply the existing stable id for a rename." Renaming Alpha to Beta and adding Beta as a new member look identical, so the heuristic blocks the add.
Expected
Adding a member with a new id and a new display name always adds a member, even when its role matches someone else's. A rename should be explicit, for example squad cast --rename <existing-id> --name <new-name>, or a dedicated squad rename. That would supply the existing id to reconcileAgentProvenanceRegistry. The ambiguity check could be dropped, or turned into an informational note ("Alpha already holds Test Engineer; adding Beta as a second one").
Source
packages/squad-sdk/src/casting/agent-provenance.ts, lines 1194–1203 (if (!previous) { const roleHints = ... record.role === role ...; throw ... }). The docblock contradicting it is at lines 1142–1148.packages/squad-cli/src/cli/commands/cast.ts:updateCastingStateWithAgent(line 295) passes one candidate{ id: slug, displayName, role, universe: 'cli-cast' }and has no rename input.
🤖 Generated with Claude Code
- Lingua principale
- TypeScript
- Stelle
- 3.4k
- Fork
- 516
- Merge medio
- 1g 15h
- PR unite (30g)
- 116
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/squad
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di github/squad
Issue simili
-
bot:ai-assisted component:platform-js status:untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
midnightntwrk/platform-js#38 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ranxianglei/billion-context#7068 ·
I maintainer di solito rispondono entro 1 giorno
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
ilan-pinto/roaring-lions#1552 ·
I maintainer di solito rispondono entro 1 giorno