claw-code/rust/crates
YeonGyu-Kim 3a533ceba0 fix(#152-follow-up-2): claw bootstrap-plan rejects trailing arguments
## What Was Broken

`claw bootstrap-plan garbage` silently accepted the `garbage` argument:

    $ claw bootstrap-plan garbage
    - CliEntry
    - FastPathVersion
    - StartupProfiler
    - ...

Same pattern as #152 init follow-up (previous cycle): a no-arg diagnostic
verb was missing its `rest.len()` guard.

## What This Fix Does

Add parse-time length check before constructing CliAction::BootstrapPlan:

    "bootstrap-plan" => {
        if rest.len() > 1 {
            return Err(format!(
                "unrecognized argument \`{}\` for subcommand \`bootstrap-plan\`",
                rest[1]
            ));
        }
        Ok(CliAction::BootstrapPlan { output_format })
    }

## Dogfood Verification

Before:
    $ claw bootstrap-plan garbage
    - CliEntry
    - FastPathVersion
    (continues listing...)

After:
    $ claw bootstrap-plan garbage
    [error-kind: cli_parse]
    error: unrecognized argument `garbage` for subcommand `bootstrap-plan`

    $ claw bootstrap-plan  (no args)
    - CliEntry
    - FastPathVersion
    (still works normally)

## Full No-Arg Verb Suffix-Guard Sweep (Post-Fix)

All no-arg verbs now uniformly reject trailing garbage:

| Verb | Status |
|---|---|
| help garbage |  rejects |
| version garbage |  rejects |
| status garbage |  rejects |
| sandbox garbage |  rejects |
| doctor garbage |  rejects |
| state garbage |  rejects |
| init garbage |  rejects (previous cycle #55) |
| diff garbage |  rejects |
| plugins garbage |  rejects |
| skills garbage |  rejects |
| system-prompt garbage |  rejects |
| dump-manifests garbage |  rejects |
| bootstrap-plan garbage |  rejects (this commit) |
| acp garbage |  rejects |

Legitimate positionals (not a bug):
- `export <file-path>` — file path is the intended arg
- `config <section>` — flexible section filter (design question, not bug)

## Non-Regression

- `claw bootstrap-plan` (no args) still works 
- All 180 binary tests pass 
- All 466 library tests pass 

## Related

- #152 follow-up (init suffix guard, previous cycle)
- Completes diagnostic-verb suffix-guard contract hygiene
2026-04-23 02:17:16 +09:00
..
api US-024: Add token limit metadata for kimi models 2026-04-17 04:15:38 +00:00
commands feat: #144 phase 1 + ROADMAP filing — claw mcp degrades gracefully on malformed config 2026-04-21 19:07:17 +09:00
compat-harness feat: ultraclaw droid batch — ROADMAP #41 test isolation + #50 PowerShell permissions 2026-04-12 03:06:24 +09:00
mock-anthropic-service feat(harness+usage): add auto_compact and token_cost parity scenarios 2026-04-03 22:41:42 +09:00
plugins Keep poisoned test locks from cascading across unrelated regressions 2026-04-12 13:52:41 +00:00
runtime fix: #80 — session-lookup error messages now show actual workspace-fingerprint directory 2026-04-21 22:18:12 +09:00
rusty-claude-cli fix(#152-follow-up-2): claw bootstrap-plan rejects trailing arguments 2026-04-23 02:17:16 +09:00
telemetry feat: anthropic SDK header matching + request profile 2026-04-01 05:55:25 +00:00
tools ROADMAP #133: Blocked-state subphase contract — implement §6.5 2026-04-20 15:04:08 +09:00