Skip to content

fix: interactive auth hang + repair broken release pipeline (v0.2.1)#7

Open
MasonStation wants to merge 5 commits into
mainfrom
fix/interactive-auth-spinner-hang
Open

fix: interactive auth hang + repair broken release pipeline (v0.2.1)#7
MasonStation wants to merge 5 commits into
mainfrom
fix/interactive-auth-spinner-hang

Conversation

@MasonStation

Copy link
Copy Markdown
Contributor

@

What this does

Three fixes that together unblock shipping to npm:

1. stack add no longer hangs on interactive auth

The CLI started a spinner, then provider.login() wrote the PAT prompt to stderr and blocked on stdin — the spinner repainted over the invisible prompt, so stack add looked frozen forever (only reproduced when no PAT was cached). Now the host owns prompting via ProviderContext.prompt + a spinnerBridge helper that pauses the spinner around credential entry. All 9 interactive providers routed through it; github device-code message goes through ctx.log.

2. Release workflow startup failure (this is why npm is stuck at 0.1.1)

The homebrew-tap commit step embedded a multi-line git commit -m whose blank line + column-0 Assisted-By: trailer terminated the YAML run: | block scalar early, leaking Assisted-By as a stray top-level workflow key. GitHub rejects the unknown key → every push since the v0.2 polish produced a 0-second startup failure, and the v0.2.0 release never published to npm. Collapsed to two -m flags.

3. Version bump 0.2.0 → 0.2.1

@ashlr/stack, @ashlr/stack-core, @ashlr/stack-mcp.

Notes

🤖 Generated with Claude Code
@

MasonStation and others added 4 commits June 9, 2026 21:35
…ring them

citty 0.1.6 maps kebab CLI tokens onto camelCase arg keys via a Proxy whose
fallback uses `??`. A boolean arg with `default: false` shadows the kebab-parsed
value, so `--dry-run` was silently ignored while `--dryRun` worked. For
`stack add` this fell through to the REAL provisioning flow (live OAuth /
network / vault writes) when the user asked for the documented no-op preview.

Normalize raw argv (`--dry-run` -> `--dryRun`) before citty parses it. This
fixes every command at once — add/init/import/swap/upgrade `--dry-run`, plus
`--all-orphans`, `--keep-remote`, `--keep-from`, `--continue-on-error`,
`--recipe-id` — while preserving camelCase, citty `--no-*` negation (the
disable path for default-true `continueOnError`), and `--` passthrough.

Bumps VERSION to 0.2.1.

Tests: 9 parser-level unit tests + 3 add --dry-run integration tests
(kebab works / camelCase regression guard / no-flag opt-in guard).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The "preview branch does NOT run without --dry-run" test asserted the
SUPABASE_STACK_CLIENT_ID OAuth error, but the no-flag path hits
requirePhantom() first — on a runner without Phantom installed it fails
there instead, so that string never appears (CI was red on this).

Assert the real invariant instead: no "(dry-run)" title and no preview
line, which proves the dry-run branch was skipped regardless of whether
the downstream failure is the Phantom preflight or the OAuth guard.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`stack add` started a clack spinner and then ran provider.login(). When a
provider fell back to PAT/key paste, it wrote the prompt to stderr and blocked
on stdin while the spinner kept repainting over it — the prompt was invisible
and the process appeared to hang forever (only reproduced when no PAT was
cached, e.g. a fresh repo).

Give the host ownership of credential prompting, mirroring the existing `log`
callback that already pauses the spinner:

- ProviderContext.prompt (optional) + PromptRequest, threaded through addService
- promptSecret() helper: uses ctx.prompt when present, falls back to stdin read
  for tests / non-CLI hosts
- spinnerBridge(spinner, label) in ui.ts returns { log, prompt } that pause and
  resume the spinner around terminal I/O (clack password/text for prompts);
  replaces the duplicated inline log closures at all addService call sites
  (add, scan, doctor, swap, templates)
- all 9 interactive providers route PAT/key entry through promptSecret; github
  device-code message goes through ctx.log; drop duplicate local readLine in
  cloudflare and turso

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(ci): repair release workflow startup failure + bump to 0.2.1

The homebrew-tap commit step embedded a multi-line `git commit -m` message
whose blank line + column-0 `Assisted-By:` trailer terminated the YAML
`run: |` block scalar early. That leaked `Assisted-By` as a stray top-level
workflow key — lenient parsers accept it, but GitHub Actions rejects the
unknown key and fails the whole file at startup. Every push since the v0.2
polish has produced a 0-second startup failure, and the v0.2.0 release never
published to npm as a result.

Collapse the message to two `-m` flags so it stays inside the block scalar.
Bump @ashlr/stack(+core,+mcp) 0.2.0 -> 0.2.1 for the next release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ashlr-stack Ready Ready Preview, Comment Jun 17, 2026 4:05pm

Request Review

ci(release): publish via npm Trusted Publishing (OIDC) instead of a token

npm now recommends Trusted Publishing for CI/CD over long-lived tokens, and
all three packages already exist on npm so per-package trusted publishers can
be configured. This removes the NPM_TOKEN secret entirely — the credential
that expired, risked leaking, and hit EOTP on the v0.2.0 release.

- publish-npm: drop the NPM_TOKEN gate, NODE_AUTH_TOKEN, and npm_otp plumbing
  (publish.sh never accepted --otp anyway — it would have died on the unknown
  arg); add `npm install -g npm@latest` for OIDC support (needs >= 11.5.1);
  keep provenance. Relies on workflow-level id-token: write (already present).
- scripts/publish.sh is unchanged: `npm publish --access public` uses OIDC
  automatically when the trusted publisher is configured.

Requires a one-time GitHub-Actions trusted publisher on each package at
npmjs.com (org/repo = ashlrai/ashlr-stack, workflow file = release.yml).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
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