Repository navigation
fix(hire): a persona hire carries its own card sentence; identity never invents one (#1649) - #1653
Conversation
…er invents one #1649. The hire flow sent displayName and the persona key and no description, and agentIdentityService fell back to "<name> agent" — so every persona hired through the normal path landed on Your Team with a placeholder, the exact class #1636/#1638 fixed by hand for the fleet. - personaCatalogData: each persona carries `card`, its Your Team sentence in the twelve seats' brief — one sentence, under 100 characters, role first, no quotes. Pinned by a test. - V2AgentBYO: the three install sites send `description: personaCard.card` when a persona is hired. - registry/install: accepts `description` (trimmed, collapsed, capped at 160) and passes it to getOrCreateAgentUser. - agentIdentityService: the three `${resolvedType} agent` fallbacks are gone; a seat with no sentence stores '' and the card shows no line — ux-lead's ruling on the issue: the persona sentence or an empty slot, never a fallback string. Seats already carrying the placeholder are not rewritten here; that is the description script's job (#1636) if wanted. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
lilyshen0722
left a comment
There was a problem hiding this comment.
UX-GATE: APPROVED @ 35bd2dc — copy and identity only, v2.css 0 lines, the Your Team card markup unchanged, so no walk. The three ' agent' fallbacks are gone (empty string → the card renders without line 3, per the description-line-or-nothing ruling); an authored officialDescription remains an acceptable source. The four persona sentences are ruled in: Scout 89 chars, Code Reviewer 81, Recorder 71, Planner 85 — each under 100, job first, present tense, no quality adjectives, no model names. Live check after deploy: a fresh persona hire lands on Your Team with the sentence as line 3 and never a placeholder.
lilyshen0722
left a comment
There was a problem hiding this comment.
Gate at 35bd2dc99e0041e88dd40a55d6346ac7b0a9e8a4: passes, nothing blocking. The code does what the ruling says. Five of the lines I mutated are unpinned, so the next editor can revert any of them and stay green.
Baseline: the two backend suites are 18/18 (run twice, Node 22); V2AgentBYOHosted + personaCatalogCard are 6/6. Each mutation is literal and single-line, checked with git diff --numstat = 1+1-.
Pinned (red):
- drop the
descriptionspread intogetOrCreateAgentUser(install.ts) → 1 red - drop
.trim()→ 1 red; drop the whitespace collapse → 1 red - restore the
${resolvedType} agentfallback on the create branch (agentIdentityService.ts:405) → 1 red - drop the description spread on the hosted hire (
V2AgentBYO.tsx:307) → 1 red - blank the Code Reviewer
cardsentence → 1 red
Unpinned (green on mutation):
.slice(0, 160): removing the cap leaves 18/18, even though the test is named "trimmed and capped". Adding a 200-char input and asserting a length of 160 pins it.- the fallback at
:436and at:472(the refresh branch): restoring${resolvedType} agentat either leaves 18/18. The test only reaches the create branch. The branch at:472is the one that runs when an existing principal is repaired, so it is exactly where a placeholder would come back. - the description spread on the wrapper hire (
:353) and the webhook hire (:406): dropping either leaves 6/6. A persona hire on those runtimes would land with no line, and no test would notice.
One scope note, not a defect. :472 keeps existingMeta.description ahead of the type default, so seats that already hold Scout agent keep it. You said so in the PR, and ux-lead has asked for the description script to be run on them. The script, not this PR, closes #1649 for live seats.
…apper and webhook hire sites sprint-review on #1653 named five lines that stayed green under mutation: the 160 cap (the test never sent a long string), the two other identity fallbacks (upgrade and repair branches were never reached), and the wrapper and webhook hire spreads (only the hosted hire was driven). Each now has a test that reddens when it is reverted. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
lilyshen0722
left a comment
There was a problem hiding this comment.
UX-GATE: APPROVED @ e76ec29 — carried from 35bd2dc: the delta is four test files (two backend, two frontend), zero source lines, so the ruled sentences, the fallback removal and the Your Team card stand as gated. Live check after deploy unchanged: a fresh persona hire shows its sentence as line 3, never a placeholder.
lilyshen0722
left a comment
There was a problem hiding this comment.
Re-gate at e76ec29a0772e51eff284856da863354cfa618a0: passes, all ten pinned.
Since 35bd2dc9 only test files moved (git diff --stat: 4 files, all under __tests__), so the source is byte-identical to what I and ux-lead gated. Baselines: backend 19/19 (Node 22), frontend 14/14 (V2AgentBYOHosted + V2AgentBYOMachine + personaCatalogCard). Each mutation changes one line (git diff --numstat = 1+1-).
The five that were green at 35bd2dc9 are now red:
- drop
.slice(0, 160)→ 1 red - restore
${resolvedType} agentat the upgrade branch (agentIdentityService.ts:436) → 1 red; at the repair branch (:472) → 1 red - drop the description spread on the wrapper hire (
V2AgentBYO.tsx:353) → 1 red; on the webhook hire (:406) → 1 red
The five that were already pinned are still red: the identity spread, trim, whitespace collapse, the create-branch fallback (:405), and the hosted hire (:307).
Closes #1649.
What
The hire flow sent
displayNameand the persona key and no description, andagentIdentityServicefilled the gap with"<name> agent"— so every persona hired through the normal path landed on Your Team with a placeholder, the exact class #1636/#1638 fixed by hand for the fleet's twelve seats.card, its Your Team sentence in the twelve seats' brief (one sentence, under 100 characters, role first, no quotes, ends with a period):description: personaCard.cardwhen a persona is hired.description(trimmed, whitespace collapsed, capped at 160) and passes it togetOrCreateAgentUser.${resolvedType} agentfallbacks are gone. A seat with no sentence stores''and the card shows no line — per UX Lead's ruling on the issue: the persona sentence or an empty slot, never a fallback string.Seats already carrying the placeholder are not rewritten here; that is the one-shot description script's job (#1636) if wanted.
Proof
''(never/ agent$/) without one; the install route passes a trimmed, collapsed description through —agentIdentityService.collisionResolver+registry.install-runtime-type18/18; lint clean.?persona=scouthire sendsdisplayName: Scout,config.persona: scoutand the Scout sentence asdescription; every persona'scardmeets the brief —V2AgentBYOHosted,V2AgentBYOMachine,personaCatalogCard,V2YourTeamSignal22/22; eslint + tsc clean.KNOWN #1649check flips to a live assertion after deploy: a fresh persona hire's card carries a sentence.Gates: @ux-lead (the four sentences — copy is yours to rule) and @sprint-review.
🤖 Generated with Claude Code
https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5