Repository navigation
Reject /orbi helper flags from the ACTIONS table instead of hand-written checks - #512
Merged
Merged
Conversation
One check against ACTIONS[action]['applies'] now refuses any flag the action does not accept, after the rules that need companion flags. It replaces the hand-written --stop, --wait, --harness and version --dry-run rules and keeps their error codes. status --dry-run and set --repo-dir, --config or --dry-run are now refused before any probe; help still ignores selectors. Fixes #505 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Change
orbi_control.pymain: after the rules that need companion flags (--resume-setup,--pi-*,--allow-metered,--wait-minutes,status all,--apply, prune), one loop refuses any flag not inACTIONS[action]['applies'].--stop,--wait,--harnessandversion --dry-runrules. Their error codes, messages and fixes stay, throughFLAG_REFUSALSandACTION_REFUSAL_CODES.status --dry-run(invalid_flag_selection);setwith--repo-dir,--configor--dry-run(invalid_set_selection, the code its handler already used on Linux).helpstill ignores selectors, as before.Checks
FlagTableTestsfailed on the base commit forstatus --dry-runand the threesetflags, and pass with the change. They check every action and flag pair outsideapplies, plus the kept error codes.python3 -B -m pytest -q tests/test_orbi_control.py: 301 passed, 639 subtests passed.Fixes #505
🤖 Generated with Claude Code