Skip to content

fix(auth): show concise identity with whoami --quiet - #122

Merged
justinhelmer merged 2 commits into
mainfrom
plan/fix-it-bc0bba/u1
Oct 3, 2026
Merged

justinhelmer merged 2 commits into
mainfrom
plan/fix-it-bc0bba/u1

Conversation

@coreplane-switchboard

Copy link
Copy Markdown
Contributor

Requested by justin · Thread

polylane auth whoami --quiet --output text now prints a single signed-in identity line. Installer reruns can show who is signed in without dumping the full account record.

Why: cli#37 records that installer reruns lost their identity cue when the noisy status dump was removed in polylanedotcom#107; the launch-polish tracking record is nominal#1165.

Where to look

  1. Quiet whoami output Only explicit quiet text requests get the one-line identity; normal text and JSON still use the existing formatter. ⚠ Installer must request text because piped CLI output defaults to JSON.
  2. Whoami behavior checks Covers the short line, id fallback, default full text, and JSON precedence using a stubbed whoami response. ⚠ Authentication output must not accidentally disclose extra fields in quiet text.

Feedback wanted: Is the explicit --output text --quiet interface the right installer-facing contract, given JSON remains the piped default?

Risk: Limited to auth whoami quiet text rendering; if wrong, installer identity display or automation consuming it changes. Revert this commit to restore the old output.

Verified: 4 focused tests, scoped typecheck, ESLint and diff whitespace check passed; installer wiring and CI matrix remain human/CI-gated.

Decisions (1)
  • Use the existing quiet flag. Rejected a new --output line format: quiet is already a global option, while --output is limited to text and JSON; JSON consumers must retain the full object.
Validation (6 criteria)
Criterion Proof
Quiet text, default text, JSON, fallback identity npx tsx --test test/auth-whoami.test.ts exit 0; tests 4, pass 4, fail 0.
Type safety after rebase NODE_OPTIONS=--max-old-space-size=6144 npx tsc --noEmit -p tsconfig.json exit 0.
Changed-file lint npx eslint src/commands/auth/whoami.ts test/auth-whoami.test.ts exit 0.
Changed-range whitespace git diff --check origin/main...HEAD exit 0.
Historical baseline run_check refused baseline with command_refused and no completion receipt; no baseline pass asserted.
Other named fast gates No prettier, hygiene:check, specs:check or check:pr-title scripts/dependency in this repo; not run. CI checks.yml owns the full matrix.
For agents

Rebased onto origin/main before work and immediately before push (no conflicts). Ignored src/generated was regenerated with npm run codegen after the prepared checkout lacked it; do not commit generated output. node --test --experimental-test-module-mocks --import tsx was refused by recorded check tooling; the focused test instead ran with npx tsx --test. Installer itself lives in polylanedotcom and needs a separate integration change.

🤖 Generated with Claude Code

Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>

@justinhelmer justinhelmer 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.

Reviewed exact head 142b304 against cli#37, the flag parser, credential resolver and output formatter. Quiet text prints one identity line; ordinary text and JSON preserve their prior behavior. The test-only follow-up explicitly overrides stored OAuth credentials; its signed-in full suite passed 549/549, and all three current-head CI jobs passed. LGTM for the CLI change. Installer rerun wiring and a containing CLI release remain separate gates.

@justinhelmer
justinhelmer merged commit 15cca32 into main Oct 3, 2026
4 checks passed
@justinhelmer
justinhelmer deleted the plan/fix-it-bc0bba/u1 branch October 3, 2026 14:32
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.

1 participant