You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Harden the CLI Usage Gate Against False Greens #2831
Follow-up hardening of tests/test_cli_usage.py, found by the local review pass on the #2285 branch.
The unknown-flag case passes on "bogus-flag" in output or "usage" in output.lower(). A script that treats --bogus-flag as a file target, prints "cannot read --bogus-flag", and exits 1 passes. For scripts that need a subcommand (carry, pr_review, canonical_review, local_review, handoff, resolve_description) the refusal observed is the missing argument, not the unknown flag.
The help case accepts any stdout containing "usage" with exit 0 and no stub call, so a default-mode report mentioning "usage" passes.
tree_state uses git status --porcelain=v1 -uall, which omits ignored paths, so a write into an ignored directory goes unseen.
Only HOME, APPDATA and LOCALAPPDATA are redirected. XDG_CONFIG_HOME and the tool-specific config-home variables pass through from the operator's environment.
Connections and stub calls are counted only while the direct child runs, so a detached grandchild is not seen.
spec/resolve_description.py now takes NAME as an argparse positional, so a name starting with - is read as an option, and repo-config/configure.sh passes "$name" without --.
Two more items from the hosted review of the gate: discovery lists only .sh, .ps1 and .py paths, so a future extensionless shebang CLI is missed (the extensionless files tracked today are hooks), and the whole EntryPointCase class is skipped on Windows, so the PowerShell entry points get no native check. Both belong with the hardening above.
Activity
ptr727 commentedon Oct 11, 2026
Two more items from the hosted review of the gate: discovery lists only .sh, .ps1 and .py paths, so a future extensionless shebang CLI is missed (the extensionless files tracked today are hooks), and the whole EntryPointCase class is skipped on Windows, so the PowerShell entry points get no native check. Both belong with the hardening above.
Require Every CLI Script to Answer Help and Refuse Unknown Arguments (#…
Promote the Write-Guard Fail-Closed Pass, CLI Usage Gate Hardening, a…