fix(cli): honor --ignore-rules in oneshot mode - #72075
Conversation
2a2cb8a to
d12ec8f
Compare
|
Updated this Draft as a current- |
d12ec8f to
35eb464
Compare
|
Thanks for preserving the earlier contributor credit and updating the fix for the current one-shot contract. The premise is verified on current GitHub main: both top-level dispatches omit the isolation flag ( No blocking implementation defects identified in the reviewed diff. Automated hermes-sweeper review. |
SummarySix PRs address or reference this complex: #26669, #26771, and #72075 wire Related pull requests
Duplicates#26669, #26771, and #72075 implement the same core Suggested consolidationKeep #72075 open with a salvage path: retain its two-dispatcher forwarding, safe-mode/environment resolution, both AIAgent skip flags, current one-shot contracts, focused tests, and preserved #26771 authorship. Close #26771 as duplicate of #72075 despite its keep_open review because #72075 contains the exact Termux and tuple-contract salvage requested there; keep #26669 closed as the earlier superseded reference. Handle #49204 and #57859 under #49195 rather than as isolation fixes: author action on #49204 is to move the guard before startup and add both dispatch-level tests, while author action on #57859 is to add the requested SQLite two-turn integration test and rebase while preserving Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I26633(["issue #26633 (open)"])
I72064(["issue #72064 (open)"])
subgraph Dup26669 ["PRs duplicating each other"]
P26669["PR #26669 (closed)"]
P26771["PR #26771 (open)"]
P72075["PR #72075 (open)"]
end
P72075 -->|best fix| I26633
P72075 -->|best fix| I72064
class I26633 open
class I72064 open
class P26669 closed
class P26771 open
class P72075 open
class P72075 best
class P72075 best
class P72075 target
click I26633 "https://github.com/NousResearch/hermes-agent/issues/26633"
click I72064 "https://github.com/NousResearch/hermes-agent/issues/72064"
click P26669 "https://github.com/NousResearch/hermes-agent/pull/26669"
click P26771 "https://github.com/NousResearch/hermes-agent/pull/26771"
click P72075 "https://github.com/NousResearch/hermes-agent/pull/72075"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 6 pull requests and 3 issues in this complex. Diffs were read for 5 of 6 PRs (rest unavailable); Assessment working set: 53 kB of PR diffs, 29 kB of issue/PR text, 12 kB of discussion (15 comments), 16 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
35eb464 to
d7d8e53
Compare
d7d8e53 to
bb1eb02
Compare
fix(cli): honor --ignore-rules in oneshot mode
|
Address automated review feedback on PR NousResearch#72075: - extract _effective_ignore_rules() so run_oneshot and _run_agent share one env/flag contract instead of duplicating the same check - extract _oneshot_ignore_rules() at the two dispatch sites so --ignore-rules/--safe-mode are resolved in one place - add a parser-registration regression proving both flags are real argparse options (not silent getattr fallbacks) - parametrize the Termux fast-launch test across --ignore-rules, --safe-mode, and the bare path
|
Addressed the AI review feedback in
Validation: 21 focused tests pass, |
a2c9ce1 to
58db132
Compare
Summary
This is a current-
mainsalvage of #26771. The original fix commit is preserved with@honor2030as its author; a second commit updates it for the current one-shot architecture.--ignore-rulesthrough the normal and Termux fast one-shot dispatch pathsHERMES_IGNORE_RULES=1andHERMES_SAFE_MODE=1for direct one-shot callersskip_context_filesandskip_memoryRoot cause
Top-level
-z/--oneshotexits through an early dispatcher beforecmd_chat()applies the usual rule-isolation policy. The parsedignore_rulesvalue was not passed intorun_oneshot(), and_run_agent()always constructedAIAgentwith context and memory injection enabled.Current-main salvage work
Compared with #26771, this branch also:
(response, result)contract, usage reporting, fallback configuration, and agent/session cleanupHERMES_SAFE_MODEconsistently#59402 is broader (
--skillsand--ignore-user-configas well) and currently overlaps this narrower fix. #34852 established that default SOUL/context inclusion works; this PR does not change that default—it fixes only the explicit isolation path.Contract note
#86328 separately proposes redefining
--ignore-rulesso persistent memory remains enabled. This PR intentionally follows the current CLI help and the canonical reports in #26633/#72064, which define explicit isolation as skipping context files, memory, and preloaded skills. If maintainers adopt the new policy, the one-shot wiring can be adjusted to match that decision without changing the dispatcher fix here.Impact
hermes -z "..." --ignore-rulesnow matches the currently documented interactive-chat behavior: project context files and persistent memory are not injected. Normal one-shot runs remain unchanged.Validation
upstream/mainat5ed4506f4scripts/run_tests.sh tests/hermes_cli/test_tui_resume_flow.py tests/hermes_cli/test_ignore_user_config_flags.py tests/hermes_cli/test_safe_mode.py tests/hermes_cli/test_oneshot_usage_file.py -q— 23 passedruff check hermes_cli/main.py hermes_cli/oneshot.py tests/hermes_cli/test_tui_resume_flow.py— passedscripts/check-windows-footguns.py --diff upstream/main— passedgit diff --check upstream/main...HEAD— passedCloses #26633
Related: #72064