Skip to content

fix: broken stdin during ory dev release publish#445

Merged
alnr merged 3 commits into
masterfrom
alnr/fix-dev-release-publish
Jul 10, 2026
Merged

fix: broken stdin during ory dev release publish#445
alnr merged 3 commits into
masterfrom
alnr/fix-dev-release-publish

Conversation

@alnr

@alnr alnr commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What was happening

For a non-pre release, pkg.GitTagRelease ran git tag vX.Y.Z -a and handed the process's stdin to git, which spawned vim (cmd/pkg/git.go:46-48). Handing the inherited terminal to a full-screen editor mid-run is fragile: when vim exits, it restores the termios state it saw at startup, and if anything in the session had left the terminal non-canonical, every later stdin read returns EOF. The next thing ory does after the tag is Confirm("Pressing [y] will push…"), whose ReadString got that EOF → pkg.Check printed "An unexpected error occurred: EOF" and exited, leaving the terminal in the raw state (that's the "buggered terminal"; reset or stty sane recovers it). I reproduced the full flow — including your tag.gpgsign=true SSH signing — under a pseudo-terminal where it happens to work, so the corruption is triggered by something specific to your live terminal session, but the editor handoff is the fragile link either way.

The fix (in cmd/pkg/git.go)

  • The annotated-tag path now prompts Enter the tag message for vX.Y.Z. Finish with an empty line: and passes the (possibly multi-line) message via git tag -a -m …. No editor, no terminal handoff.
  • Confirm had a second real bug: it created a fresh bufio.Reader(os.Stdin) per prompt, so any read-ahead input was silently discarded (with piped stdin the first prompt slurps all the answers and the next one hangs forever — I hit this while reproducing). All prompts now share one package-level reader.

@alnr alnr self-assigned this Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@alnr, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e0577747-558e-4d71-97a1-c763faf07616

📥 Commits

Reviewing files that changed from the base of the PR and between 1683ab1 and 834fabc.

📒 Files selected for processing (3)
  • Makefile
  • cmd/cloudx/testhelpers/testhelpers.go
  • cmd/pkg/git.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alnr/fix-dev-release-publish

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@alnr alnr merged commit f9247ab into master Jul 10, 2026
17 checks passed
@alnr alnr deleted the alnr/fix-dev-release-publish branch July 10, 2026 14:51
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