Skip to content

fix: resolve installer stall and add clear completion signal#91

Merged
PatrickSys merged 2 commits intomainfrom
worktree-fix-installer-stall
Apr 24, 2026
Merged

fix: resolve installer stall and add clear completion signal#91
PatrickSys merged 2 commits intomainfrom
worktree-fix-installer-stall

Conversation

@PatrickSys
Copy link
Copy Markdown
Owner

Summary

  • gsdd init stalled after the last wizard prompt because promptChoiceList resumed stdin via readline.emitKeypressEvents but never paused it in cleanup() — the Node event loop stayed alive with stdin open, so the process appeared hung even though all output had already been written
  • Users had to force-quit (Ctrl+C) before they could read the routing instructions, making the installer feel broken

Changes

  • bin/lib/init-prompts.mjs — add input.pause() to promptChoiceList's cleanup() so stdin is released after each choice-list prompt; lets the event loop drain naturally once the wizard finishes
  • bin/gsdd.mjs — add process.exit(process.exitCode ?? 0) under the IS_MAIN guard as a hard backstop against any future open-handle leak
  • bin/lib/init-flow.mjs — upgrade the completion banner to a bold green ✓ GSDD initialized. and append Setup complete — this session will now exit. so users see an unambiguous signal that the wizard finished intentionally

Test plan

  • Run node bin/gsdd.mjs init interactively in a scratch dir; confirm the shell prompt returns automatically after the last wizard step (no Ctrl+C needed)
  • Run node bin/gsdd.mjs init --auto --tools claude in a scratch dir; confirm clean non-interactive exit
  • Run node bin/gsdd.mjs help and node bin/gsdd.mjs health; confirm both exit with code 0
  • Run node bin/gsdd.mjs bogus-cmd; echo $?; confirm exit code 1

After the last wizard prompt, Node's event loop stayed alive because
promptChoiceList resumed stdin via emitKeypressEvents but never paused
it in cleanup(). The process appeared hung even though all output had
been written. Users had to force-quit before reading the completion text.

- pause stdin in promptChoiceList cleanup so the event loop can drain
- add process.exit() under IS_MAIN as a hard backstop against future leaks
- upgrade completion banner to bold green ✓ and add an explicit
  "Setup complete — this session will now exit." line so users know the
  wizard finished intentionally
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b90644ecf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/gsdd.mjs Outdated
process.exit() can truncate buffered stdout/stderr in piped or redirected
usage before streams fully flush. The stdin.pause() in promptChoiceList
cleanup already lets the event loop drain naturally; the forced exit was
unnecessary backstop that introduced data-loss risk.
@PatrickSys PatrickSys merged commit 017620f into main Apr 24, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Apr 24, 2026
# [0.19.0](v0.18.5...v0.19.0) (2026-04-24)

### Bug Fixes

* accept successful npm token exchange responses ([e58847f](e58847f))
* fail fast without npm trusted publishing ([e3b3578](e3b3578))
* resolve installer stall and add clear completion signal ([#91](#91)) ([017620f](017620f))

### Features

* add brownfield change continuity flow ([2915854](2915854))
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