Skip to content

Reject /orbi helper flags from the ACTIONS table instead of hand-written checks - #512

Merged
XelHaku merged 2 commits into
mainfrom
orbi/TrebuchetDynamics-kit-issue-505
Dec 1, 2026
Merged

XelHaku merged 2 commits into
mainfrom
orbi/TrebuchetDynamics-kit-issue-505

Conversation

@XelHaku

@XelHaku XelHaku commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Change

  • orbi_control.py main: after the rules that need companion flags (--resume-setup, --pi-*, --allow-metered, --wait-minutes, status all, --apply, prune), one loop refuses any flag not in ACTIONS[action]['applies'].
  • It replaces the hand-written --stop, --wait, --harness and version --dry-run rules. Their error codes, messages and fixes stay, through FLAG_REFUSALS and ACTION_REFUSAL_CODES.
  • Newly refused before any probe:
    • status --dry-run (invalid_flag_selection);
    • set with --repo-dir, --config or --dry-run (invalid_set_selection, the code its handler already used on Linux).
  • help still ignores selectors, as before.

Checks

  • New FlagTableTests failed on the base commit for status --dry-run and the three set flags, and pass with the change. They check every action and flag pair outside applies, 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

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>
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 36f9c17c-8058-4990-beae-3282a78bbe76
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@XelHaku
XelHaku merged commit 84b996c into main Dec 1, 2026
10 checks passed
XelHaku added a commit that referenced this pull request Dec 1, 2026
Keep both FlagTableTests (#512) and PublicArgumentTests (#506) at the end of tests/test_orbi_control.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@XelHaku
XelHaku deleted the orbi/TrebuchetDynamics-kit-issue-505 branch December 1, 2026 23:10
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.

Reject /orbi helper flags from the ACTIONS table instead of hand-written checks

1 participant