fix: interactive auth hang + repair broken release pipeline (v0.2.1)#7
Open
MasonStation wants to merge 5 commits into
Open
fix: interactive auth hang + repair broken release pipeline (v0.2.1)#7MasonStation wants to merge 5 commits into
MasonStation wants to merge 5 commits into
Conversation
…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> @
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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> @
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@
What this does
Three fixes that together unblock shipping to npm:
1.
stack addno longer hangs on interactive authThe CLI started a spinner, then
provider.login()wrote the PAT prompt to stderr and blocked on stdin — the spinner repainted over the invisible prompt, sostack addlooked frozen forever (only reproduced when no PAT was cached). Now the host owns prompting viaProviderContext.prompt+ aspinnerBridgehelper that pauses the spinner around credential entry. All 9 interactive providers routed through it; github device-code message goes throughctx.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 -mwhose blank line + column-0Assisted-By:trailer terminated the YAMLrun: |block scalar early, leakingAssisted-Byas 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-mflags.3. Version bump 0.2.0 → 0.2.1
@ashlr/stack,@ashlr/stack-core,@ashlr/stack-mcp.Notes
Lintjob is red due to a pre-existing repo-wide CRLF issue (no.gitattributes/biomelineEnding), tracked separately — it does not block releases.NPM_TOKENto an Automation token (the v0.2.0 publish hit EOTP/2FA).🤖 Generated with Claude Code
@