Skip to content

Inject input into confirmApply instead of hardcoding os.Stdin#22

Merged
ametel01 merged 1 commit into
mainfrom
fix/11-inject-input-into-confirm-apply
Mar 14, 2026
Merged

Inject input into confirmApply instead of hardcoding os.Stdin#22
ametel01 merged 1 commit into
mainfrom
fix/11-inject-input-into-confirm-apply

Conversation

@ametel01
Copy link
Copy Markdown
Owner

Summary

  • confirmApply now accepts an io.Reader parameter instead of hardcoding os.Stdin.
  • Input is threaded from the command boundary via cmd.InOrStdin().
  • Adds table-driven test for confirmation flow with injected input.

Test plan

  • TestConfirmApplyFromInjectedInput — table-driven tests for "y", "YES", "n", and empty input
  • Default CLI behavior still reads from stdin via cmd.InOrStdin()
  • make verify passes

Closes #11

🤖 Generated with Claude Code

confirmApply now accepts an io.Reader parameter threaded from the
command boundary via cmd.InOrStdin(). This makes the confirmation
flow testable with injected input and reusable in non-interactive
integrations.

Closes #11

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 14, 2026

Warning

Rate limit exceeded

@ametel01 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 98496989-a381-45f7-b006-19438548d43b

📥 Commits

Reviewing files that changed from the base of the PR and between da56566 and e0135b9.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • cmd/atb/install.go
  • cmd/atb/runtime.go
  • cmd/atb/runtime_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/11-inject-input-into-confirm-apply
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

@ametel01 ametel01 merged commit aee0983 into main Mar 14, 2026
4 checks passed
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.

Inject input into confirmApply instead of hardcoding os.Stdin

1 participant