prevent test timeout waiting for interactive input#1025
Merged
Conversation
Entire-Checkpoint: 226cd08bdf39
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents a CLI unit test from hanging due to interactive TUI input by introducing a small seam to stub out huh.Form.Run() during tests.
Changes:
- Add an overridable
runDispatchWizardFormfunction variable used to execute the wizard form. - Update the dispatch wizard to call
runDispatchWizardForm(form)instead ofform.Run(). - Stub
runDispatchWizardFormin the relevant test to avoid blocking on interactive input.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
cmd/entire/cli/dispatch_wizard.go |
Adds a form-runner indirection and uses it when executing the dispatch wizard form. |
cmd/entire/cli/dispatch_wizard_test.go |
Stubs the form runner so the test can reliably proceed without waiting for TTY input. |
gtrrz-victor
approved these changes
Apr 24, 2026
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.
https://entire.io/gh/entireio/cli/trails/6bb3a182c922
Note
Low Risk
Low risk: only refactors how the form is executed (via an overridable function) and adjusts a test to stub the interactive call path.
Overview
Prevents
dispatch_wizardtests from blocking on interactivehuhinput by routingform.Run()through an overridablerunDispatchWizardFormfunction.Updates
TestRunDispatchWizard_ProceedsWhenCurrentBranchCannotBeResolvedto stub form execution and assert the wizard reaches the form-running path (via therun dispatch wizarderror wrapper) instead of hanging.Reviewed by Cursor Bugbot for commit 0054242. Configure here.