feat(cli): route hol-guard binary to combined mode for scanner+guard commands#700
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request introduces documentation for the HOL Guard headless runner and skills, refines CLI routing for guard subcommands, and adds an end-to-end test suite. However, several issues were identified in the review: a critical bug in CLI argument resolution where argv=None bypasses routing logic, an ignored cwd parameter in the test runner's run helper, and potential masking of test failures during JSON decoding errors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Greptile SummaryThis PR re-classifies the
Confidence Score: 5/5The routing changes are well-scoped and the production CLI path is safe to merge. The core cli.py changes correctly implement combined-mode routing and fix a pre-existing bug where legacy-arg resolution was never applied on normal CLI invocations. The issues found are limited to the e2e test helper and do not affect production behaviour. tests/e2e_droid_exec.py warrants a second look for the FileNotFoundError crash path and the filename mismatch with the PR description. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[hol-guard invoked] --> B{program name?}
B -->|plugin-guard| C[mode = guard]
B -->|plugin-scanner| E[mode = scanner]
B -->|hol-guard or other| F[mode = combined NEW]
C --> G[_resolve_legacy_args]
E --> G
F --> G
G --> H{argv 0 value}
H -->|hook| I[early return to guard hook]
H -->|hermes| J[early return to guard hermes legacy]
H -->|scan lint verify submit doctor| K[argv unchanged scanner wins]
H -->|guard subcommand no format flag| L[prepend guard to argv]
H -->|other| M{default to scan target?}
M -->|yes| N[prepend scan to argv]
M -->|no| O[argv unchanged]
I --> P[parser.parse_args]
J --> P
K --> P
L --> P
N --> P
O --> P
P --> Q{args.command}
Q -->|None or scan| R[_run_scan defaults plugin dir to dot]
Q -->|lint verify submit doctor| S[respective handler]
Q -->|guard| T[run_guard_command]
Reviews (4): Last reviewed commit: "feat(cli): route hol-guard binary to com..." | Re-trigger Greptile |
cd1cca5 to
e2ed4a2
Compare
e2ed4a2 to
3be85c1
Compare
…commands When invoked as `hol-guard`, the CLI was routing to guard-only mode, which prevented scanner features like `--format` from working. This re-classifies `hol-guard` as combined mode and adds guard subcommand auto-prefixing so that commands like `hol-guard detect` and `hol-guard scan --format json` both work correctly when called through the Droid CLI or any other harness. Also adds: - .factory/skills/hol-guard/ SKILL.md for Droid skill auto-invocation - .factory/droids/hol-guard-runner.md for headless test delegation - tests/test_droid_exec_e2e.py end-to-end test running the scanner and guard surfaces via headless droid exec against common fixtures. Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
3be85c1 to
15624a7
Compare
Summary
hol-guardbinary as "combined" CLI mode instead of guard-onlyscan,lint,verify,submit,doctor) now work viahol-guard scan --format jsondetect,install,run,status, etc.) auto-route viaguard detectin combined modescansubcommand is distinguished from scannerscanby the presence of--formatflaghol-guardskill for Droid CLI integration andhol-guard-runnercustom droid for headless delegationtests/test_droid_exec_e2e.py) that runs scanner+guard+droid exec headlessly against common test fixturesTesting
All 11 test cases pass (scanner: 6/6, guard: 3/3, droid exec: 2/2).
Notes
python3 -m codex_plugin_scanner.cli scanfor the scanner surface, ensuring the tests validate both paths