Skip to content

fix(cmd): use portable os.Stdin.Fd for password read on Windows (follow-up to #1279) - #1459

Merged
cristim merged 2 commits into
mainfrom
fix/1279-followup-windows-readpassword
Jul 20, 2026
Merged

cristim merged 2 commits into
mainfrom
fix/1279-followup-windows-readpassword

Conversation

@cristim

@cristim cristim commented Jul 19, 2026

Copy link
Copy Markdown
Member

Follow-up to #1279 — unaddressed CodeRabbit thread

Part of the adversarial-sweep over recently-merged PRs. #1279 merged with an unresolved CodeRabbit Major thread.

term.ReadPassword takes an int, but syscall.Stdin is an int only on Unix; on Windows it is a syscall.Handle (uintptr), so cmd/configure_azure.go failed to compile under GOOS=windows. Fix uses int(os.Stdin.Fd()) (portable) and drops the now-unused syscall import.

Verification

  • Confirmed pre-fix: GOOS=windows go build ./cmd/... fails with cannot use syscall.Stdin (variable of uintptr type Handle) as int value.
  • Post-fix: host build + GOOS=windows GOARCH=amd64 build both pass.

…ow-up to #1279)

term.ReadPassword takes an int, but syscall.Stdin is an int only on Unix; on
Windows it is a syscall.Handle (uintptr), so cmd/configure_azure.go failed to
compile under GOOS=windows. Use int(os.Stdin.Fd()), which is portable across
platforms, and drop the now-unused syscall import.

Addresses the unresolved CodeRabbit review thread on #1279. Verified that the
prior code fails `GOOS=windows go build ./cmd/...` with a type error and the
fix builds cleanly for both host and windows/amd64.
@cristim cristim added triaged Item has been triaged priority/p2 Backlog-worthy severity/low Minor harm urgency/this-sprint Within the current sprint impact/few Limited audience effort/xs Trivial / one-liner type/bug Defect labels Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 57 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ed2aa3d9-597b-40a0-b8a2-bf5151c5f24c

📥 Commits

Reviewing files that changed from the base of the PR and between 5c267c5 and 6d74785.

📒 Files selected for processing (1)
  • cmd/configure_azure.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1279-followup-windows-readpassword

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

@cristim

cristim commented Jul 19, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim
cristim merged commit a6665b5 into main Jul 20, 2026
19 checks passed
@cristim
cristim deleted the fix/1279-followup-windows-readpassword branch July 27, 2026 11:09
cristim added a commit that referenced this pull request Sep 27, 2026
…ow-up to #1279) (#1459)

* fix(cmd): use portable os.Stdin.Fd for password read on Windows (follow-up to #1279)

term.ReadPassword takes an int, but syscall.Stdin is an int only on Unix; on
Windows it is a syscall.Handle (uintptr), so cmd/configure_azure.go failed to
compile under GOOS=windows. Use int(os.Stdin.Fd()), which is portable across
platforms, and drop the now-unused syscall import.

Addresses the unresolved CodeRabbit review thread on #1279. Verified that the
prior code fails `GOOS=windows go build ./cmd/...` with a type error and the
fix builds cleanly for both host and windows/amd64.

* fix(cmd): justify terminal descriptor conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/few Limited audience priority/p2 Backlog-worthy severity/low Minor harm triaged Item has been triaged type/bug Defect urgency/this-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant