This repository was archived by the owner on Apr 8, 2026. It is now read-only.
Commit f10bf8f
committed
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-ci1 parent bf59abc commit f10bf8f
1 file changed
+66
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
590 | 593 | | |
591 | 594 | | |
592 | 595 | | |
| |||
5318 | 5321 | | |
5319 | 5322 | | |
5320 | 5323 | | |
| 5324 | + | |
5321 | 5325 | | |
5322 | 5326 | | |
5323 | 5327 | | |
| |||
5328 | 5332 | | |
5329 | 5333 | | |
5330 | 5334 | | |
| 5335 | + | |
| 5336 | + | |
| 5337 | + | |
| 5338 | + | |
| 5339 | + | |
| 5340 | + | |
| 5341 | + | |
| 5342 | + | |
| 5343 | + | |
| 5344 | + | |
| 5345 | + | |
| 5346 | + | |
| 5347 | + | |
| 5348 | + | |
| 5349 | + | |
| 5350 | + | |
| 5351 | + | |
| 5352 | + | |
| 5353 | + | |
| 5354 | + | |
| 5355 | + | |
| 5356 | + | |
| 5357 | + | |
| 5358 | + | |
| 5359 | + | |
| 5360 | + | |
| 5361 | + | |
| 5362 | + | |
| 5363 | + | |
| 5364 | + | |
| 5365 | + | |
| 5366 | + | |
| 5367 | + | |
| 5368 | + | |
| 5369 | + | |
| 5370 | + | |
| 5371 | + | |
| 5372 | + | |
| 5373 | + | |
| 5374 | + | |
| 5375 | + | |
| 5376 | + | |
| 5377 | + | |
| 5378 | + | |
| 5379 | + | |
| 5380 | + | |
| 5381 | + | |
| 5382 | + | |
| 5383 | + | |
| 5384 | + | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
5331 | 5391 | | |
5332 | 5392 | | |
5333 | 5393 | | |
| |||
5398 | 5458 | | |
5399 | 5459 | | |
5400 | 5460 | | |
| 5461 | + | |
5401 | 5462 | | |
5402 | 5463 | | |
5403 | 5464 | | |
| |||
5417 | 5478 | | |
5418 | 5479 | | |
5419 | 5480 | | |
| 5481 | + | |
5420 | 5482 | | |
5421 | 5483 | | |
5422 | 5484 | | |
| |||
5438 | 5500 | | |
5439 | 5501 | | |
5440 | 5502 | | |
| 5503 | + | |
5441 | 5504 | | |
5442 | 5505 | | |
5443 | 5506 | | |
| |||
5491 | 5554 | | |
5492 | 5555 | | |
5493 | 5556 | | |
| 5557 | + | |
5494 | 5558 | | |
5495 | 5559 | | |
5496 | 5560 | | |
| |||
5573 | 5637 | | |
5574 | 5638 | | |
5575 | 5639 | | |
| 5640 | + | |
5576 | 5641 | | |
5577 | 5642 | | |
5578 | 5643 | | |
| |||
5603 | 5668 | | |
5604 | 5669 | | |
5605 | 5670 | | |
| 5671 | + | |
5606 | 5672 | | |
5607 | 5673 | | |
5608 | 5674 | | |
| |||
0 commit comments