claw-code-parity/rust/crates/rusty-claude-cli
Yeachan-Heo f10bf8f595 Keep argument parsing independent from plugin discovery
parse_args only needs the tool registry when --allowedTools is present, but it was eagerly normalizing an empty list through the plugin-backed registry. On a clean CI home this made no-arg parsing fail if bundled plugin sync surfaced a broken install, and it also left parse-related tests exposed to concurrent environment mutation.

Short-circuit empty allowed-tool normalization and serialize the default-permission parse tests that depend on shared process env.

Constraint: Rust CI runs unit tests in parallel inside one process, so std::env mutations are shared across tests
Rejected: Keep eager registry loading for empty allowed-tools lists | unnecessary work and leaks unrelated plugin failures into basic arg parsing
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any test that mutates HOME, CLAW_CONFIG_HOME, or RUSTY_CLAUDE_PERMISSION_MODE must hold env_lock while code under test reads process env
Tested: cargo fmt --all --check; cargo test -p rusty-claude-cli
Not-tested: Additional remote workflows beyond rust-ci
2026-04-03 09:37:46 +00:00
..
src Keep argument parsing independent from plugin discovery 2026-04-03 09:37:46 +00:00
tests Expand parity harness coverage before behavioral drift lands 2026-04-03 04:00:33 +00:00
Cargo.toml Lock down CLI-to-mock behavioral parity for Anthropic flows 2026-04-03 01:15:52 +00:00