Registry Mirror
Skip to content

Conversation

@saphid

@saphid saphid commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Problem

In a foreground terminal, npx t3 auth session issue --token-only can ask to install t3 and print prompt and status text to stdout before the bearer token. The npm launcher identifies the runner to runCli, which calls offerCliInstall before Command.run; the auth handler's quiet logging applies only later and cannot remove text already written to stdout.

Deterministic repro on origin/main (0353e276be35d8ab1a84d0d009db8c5bb7388cdd)

Build the standalone CLI with vp run build:exe from apps/server under Node 26.13.1. In a fresh temporary HOME, place the built t3 at $HOME/.t3/runtime/versions/$VERSION/t3 and write $VERSION to .install-complete beside it. Copy scripts/npm-launcher/t3.mjs to $HOME/.npm/_npx/fixture/node_modules/t3/bin/t3.mjs with a package manifest containing name: "t3" and the matching version. In a foreground PTY with TERM=xterm, no installed t3 on PATH, and no CI or npm auto-yes flags, run:

node "$HOME/.npm/_npx/fixture/node_modules/t3/bin/t3.mjs" auth session issue --token-only

Repeat with --token-only=true in a fresh home so the saved decline cannot mask the bug. Observed: An install question appears; answering n prints Skipped. Run `npx t3 install` any time. before the token. Expected: No prompt or status text; the token is the only nonblank line on stdout.

Change

Add --token-only to the server CLI's existing install-prompt skip set. The existing argument normalization covers --token-only=true as well; both forms are covered by the install-offer test. No client, provider, or wire changes are needed.

Scope

Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.

Verification

  • The focused regression fails on base with AssertionError: expected 2 to equal +0 (two prompt invocations, expected zero) and passes with the fix.
  • The redacted before/after CLI transcript shows both forms prompting on base and emitting only the token on the patched build, with empty stderr and exit status 0.
  • vp run check:changed exits 0; six affected tests pass.
  • Not shown: npm package download/bootstrap, pnpm or Bun launchers, non-Linux terminals, or the unanswered-prompt timeout.

Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Dec 2, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Dec 2, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 1447fc5

Macroscope's review found this PR approvable — Skips the optional CLI installation prompt when --token-only is supplied, preserving machine-readable output. Normal interactive behavior and token issuance remain unchanged.

Notes:

  • All code in this push has already been reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The CLI now skips the install prompt when an invocation includes --token-only. A test covers auth session issue --token-only.

Changes: Token-only prompt suppression

Layer / File(s) Summary
Skip the install prompt for token-only commands
apps/server/src/cli/install.ts, apps/server/src/cli/install.test.ts
The skip list now includes --token-only. A test verifies that auth session issue --token-only does not prompt.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: Minimal · up to 1447f

The CLI no longer prints the install prompt before the token when --token-only is passed. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix (skipping the npx install prompt when --token-only is passed) and the scope (cli). The raw summary says --token-only was added to SKIPPED_ARGUMENTS in install.ts, with a matchi…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The Problem section gives a reproduction and expected and observed behavior. The …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix (skipping the npx install prompt when --token-only is passed) and the scope (cli). The raw summary says --token-only was added to SKIPPED_ARGUMENTS in install.ts, with a matching test update. The title matches the main change.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The Problem section gives a reproduction and expected and observed behavior. The Change section explains the one-line fix. The Scope section justifies the absence of a linked issue. The Verification section lists the focused regression, the before/after transcript, and the checks run, and it states what was not tested. The template asks for a model and harness note when an agent did the work. The author gave one ('Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity)'). The description is complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9e359ee and 1447fc5.

Files selected for processing: 1

  • apps/server/src/cli/install.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 2, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review December 2, 2026 15:35

Dismissing prior approval to re-evaluate 1447fc5

@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

On each commit, build the real standalone CLI with vp run build:exe --target linux-x64. For each flag use a fresh HOME, place the unchanged repository npm launcher at $HOME/.npm/_npx/fixture/node_modules/t3/bin/t3.mjs with its matching package manifest, and prepopulate its runtime cache with that commit’s executable. Run node "$HOME/.npm/_npx/fixture/node_modules/t3/bin/t3.mjs" auth session issue --token-only in a foreground PTY with stdin and stdout attached. Answer n if the install prompt appears. Repeat in separate fresh homes with --token-only=true and --json.

Linux x64; identical 110×30 foreground PTYs and dark terminal rendering. Real CLI output and observed timing were recorded, then bearer tokens were redacted before rendering. No provider or service stand-ins. All six commands exited 0.

Before After
ca36afaeb1 1447fc57fd
Both token-only forms prompt; declining prints “Skipped…” before the token. Both token-only forms print only the token, without prompt or install status.
Before --token-only After --token-only
Before --token-only=true After --token-only=true
Before recording After recording
JSON control: Before JSON control JSON control: After JSON control

Reproduction driver · Terminal renderer · Redacted timed streams and transcripts

The JSON control remained prompt-free on both commits. Captures and recordings were inspected before upload.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Dec 2, 2026
@juliusmarminge
juliusmarminge merged commit 0e45890 into pingdotgg:main Dec 2, 2026
59 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants