Skip to content

fix(assistant): one Claude card, under the name the assistant asked for (abilityai/trinity-enterprise#1354) - #4759

Merged
vybe merged 3 commits into
devfrom
feature/ent1354-one-claude-card
Nov 24, 2026
Merged

vybe merged 3 commits into
devfrom
feature/ent1354-one-claude-card

Conversation

@trinity-ability

Copy link
Copy Markdown
Contributor

For abilityai/trinity-enterprise#1354 (the private issue is closed by hand at release). Pairs with the trinity-enterprise PR and the trinity-gateway PR on the same branch name.

What the walk found

Dev self-serve instance on 8d7ca11, 2026-11-24. Two names were in play for the instance's Claude card:

  • The assistant asks under ANTHROPIC_API_KEY.
  • The panel renamed a fresh card to CLAUDE_SUBSCRIPTION, but not one restored from an earlier conversation, and only that name had the token behaviour on the instance.
  • The restored card refused a subscription token, gave the API-key message for a code-shaped paste, and saved an untested key.
  • The renamed card's "Provided: CLAUDE_SUBSCRIPTION" line was not the line the assistant waited for, so it showed a second card.

Change

  • validCredential keeps the card's name, and the dead instanceCredentialName is removed. The panel posts the name the assistant asked for, and the assistant hears "Provided:" for that name.
  • The enterprise pin moves to the companion branch (657d4e3): the instance treats both names as one Claude card, tests a token or a key before saving, and gives "a token is expected" for a code-shaped paste.
  • docs/memory/requirements/credentials.md §3.8a: one card, either name.

Merge the enterprise PR first, then re-pin this branch to its merged main commit before merging this one.

Tests

  • assistantClaudeToken.mount.spec.js, through the real widget and store:
    • the card under both names shows the three steps and posts its own name;
    • a card restored from a kept conversation does the same.
  • With the rename put back, 2 of its tests go red.
  • Touched specs: 137 passed. Ratchets: 28 passed. The full vitest run was not completed in this container.

🤖 Generated with Claude Code

…or (abilityai/trinity-enterprise#1354)

A live walk on this repo at 8d7ca11 with gateway 6068d2bb1 found two names
for one card. The gateway's key step asks for ANTHROPIC_API_KEY. The panel
renamed a fresh card to CLAUDE_SUBSCRIPTION but not one restored from an
earlier conversation, and the instance gave the token behaviour only to
CLAUDE_SUBSCRIPTION. On the restored card:
- a subscription token was refused;
- a sign-in code got the API-key message;
- a bad key was saved untested.
The renamed card's "Provided: CLAUDE_SUBSCRIPTION" line was not the line the
assistant waited for, so it showed a second card.

- validCredential keeps the card's name: the instance takes both Claude names
  as one card. The panel therefore posts what was asked, and the assistant
  hears "Provided:" for it.
- instanceCredentialName is removed: the rename was its only use.
- The enterprise pin moves to feature/ent1354-one-claude-card (657d4e3): both
  names test before saving and give token_expected for a code-shaped paste.
- requirements/credentials.md §3.8a: one card, either name.

Tests: assistantClaudeToken.mount.spec.js now covers the card under both names
and a card restored from a kept conversation (same three steps, posts its own
name). With the rename put back, 2 of its tests are red. 3 specs pass (137
tests), and so do the three ratchets (28).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trinity-ability

Copy link
Copy Markdown
Contributor Author

/validate-pr — REQUEST CHANGES (one mechanical item)

This PR requires the following change before merge:

  • Re-pin src/backend/enterprise from 657d4e3 (the companion PR's head, not yet merged) to the companion PR's merged commit, once abilityai/trinity-enterprise#1378 lands. Its parent is the current private main, so a squash merge should give a tree-identical commit: confirm with git diff 657d4e3 <merged> (empty).

Nothing else blocks.

  • End to end, with this panel: the real store and widget, mounted, receiving the assistant service's real key-step turn and posting over real HTTP to the instance route.
  • Card names: under both card names, and for a card restored from an earlier conversation, the card posts the name it was asked under. After a passing test the assistant is told exactly Provided: <that name> for this instance., the line it was told to wait for.
  • Paste outcomes: a rejected token, a rejected key, a code-shaped paste and garbage each get a plain refusal, store nothing and send the assistant nothing. An empty paste sends nothing.
  • No pasted value shows up in the conversation kept in the browser, in a turn, or in the instance log or database.
  • Settings code: the Settings and onboarding code is untouched, and their specs pass (268).
  • Mutation: with assistantCards.js and firstSession.js reverted to dev, 5 specs go red.
  • Specs: touched specs + ratchets: 165 passed. Tier 1 and the lane-C PR runs (journey-smoke, e2e) are green, and dev-ci is green.

Deploy compatibility, checked:

  • The previous panel (8d7ca11) with the new assistant service: the main path works. A card restored under ANTHROPIC_API_KEY keeps the old defect until this image ships.
  • This panel with the previous assistant service: the main path works and the line matches. Only a CLAUDE_SUBSCRIPTION card restored from an 8d7ca11 conversation may be asked for a second time.
  • Neither order breaks anything that works today.

Suggestion: the new spec's header names a private test file and a build walk. A generic "the companion route test" would read better in this repo.

Not patched: the body has no closing keyword. That is deliberate, because the linked issue stays open until a live walk; the reviewer sets its status by hand.

@trinity-ability trinity-ability added the status-needs-fix PR has an unaddressed review/validation finding; cleared by the author's next push (#2815) label Nov 24, 2026
Trinity Agent (trinity) and others added 2 commits November 24, 2026 08:23
…78 on main)

Same tree as the prior pin 657d4e3; moves the pointer onto the merged
enterprise main commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trinity-ability trinity-ability removed the status-needs-fix PR has an unaddressed review/validation finding; cleared by the author's next push (#2815) label Nov 24, 2026

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End-to-end validation asked only for the submodule pointer to sit on the merged commit; it does. All checks green.

@vybe
vybe merged commit b236f97 into dev Nov 24, 2026
28 checks passed
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.

2 participants