Skip to content

fix(cli): create's remedy covers an unknown row state; test that the operator credential is never printed #593

Description

@tps-flint

Two follow-ups from the review of #591 (tps agent create reports success only after the stored key reads back equal):

  1. When the read-back itself fails (a non-404 error), create cannot tell whether an Agent row exists, and it prints the no-row remedy. If a row does exist, flair agent add then refuses and the operator has no next step. The fix: when row existence is unknown, the remedy names both branches ("if flair agent show <id> (or the equivalent read that exists on flair main) finds the agent, run flair agent remove <id> first, with the warning about what remove deletes; otherwise ..."). Test: a read-back failure prints both branches.
  2. Nothing tests that the operator credential used for the read-back never appears in stdout or stderr on any path. The fix: a test that runs each refusal path and the success path with a recognisable credential value and asserts it appears in neither stream.

Refs #512.

Activity

  1. self-assigned this
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions