Repository navigation
refactor(controller): keep command rules in one place (stack 1/4) - #246
Merged
Merged
Conversation
benvinegar
force-pushed
the
feat/cli-command-contracts
branch
from
November 9, 2026 02:22
f18a404 to
c9370fa
Compare
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.
Problem
Command rules were scattered through the dispatcher: which commands need a host, which need a terminal, and when
--helpis an option rather than text to send to a VM. Adding a command meant remembering those special cases.Change
Keep those rules next to each command's handler. The dispatcher and tests read the same declarations, and family actions inherit their handler's rules. Existing command behavior stays the same.
Tests
Lint, typecheck and shell tests passed; unit tests: 484 passed, 1 skipped.
Stack 1/4: #246 → #249 → #250 → #251. Merge in order; rebase/retarget the next PR after a squash merge.