docs(roadmap): add config unknown section hang

This commit is contained in:
Yeachan-Heo
2026-05-21 06:01:53 +00:00
parent 63f4865c8d
commit 66e3c8c6d7

View File

@@ -6609,3 +6609,5 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
526. **`config env` swallows unsupported trailing runtime/session flags into a zero-byte hang while sibling diagnostics reject the same flags with `cli_parse`, so config inspection has a unique prompt-fallback/argument-drain bug** — dogfooded 2026-05-21 from the `#clawcode-building-in-public` 05:00 UTC nudge on `/home/bellman/Workspace/claw-code-pr2967` with branch/origin `docs/roadmap-workdir-provenance@24ccc6e` and binary `./rust/target/debug/claw` built from source SHA `25d663d`. Clean-home probes from a minimal temp workspace compared the same unsupported trailing flags across `status`, `version`, `config env`, `doctor`, and `sandbox`. For `--resume`, `--max-turns`, `--continue`, and `--verbose`, the non-config diagnostics all returned bounded `cli_parse` errors like `unrecognized argument '--resume' for subcommand 'status'`. But `claw config env --resume`, `claw config env --max-turns`, `claw config env --continue`, and `claw config env --verbose` each timed out after 6s with `stdout=0`/`stderr=0`. This is the same family as #525's `config env --allow-broad-cwd` hang, but the broader sweep shows `config env` is the outlier parser path for multiple unsupported runtime/session flags, not just one safety override. **Required fix shape:** (a) give `config env` and all `config <section>` forms the same strict trailing-argument validation as `status`/`doctor`/`sandbox`; (b) reject unsupported flags before any config/runtime fallback with `kind:"cli_parse"` / `kind:"unsupported_flag_for_command"`, echoing the offending flag and valid config options; (c) centralize config-subcommand argument parsing so `config env`, `config model`, `config hooks`, and `config plugins` cannot drift; (d) add clean-home elapsed-time regressions for `config env --resume`, `--max-turns`, `--continue`, `--verbose`, `--allow-broad-cwd`, and a valid `config env --output-format json`; (e) audit whether the same hang exists for `config model/hooks/plugins` and close it in the same parser fix. **Why this matters:** `config env` is a support/debug surface users paste into issue reports. Unsupported flags should fail fast and visibly; a zero-byte hang makes config troubleshooting look like startup deadlock and hides the actual CLI typo. Source: gaebal-gajae dogfood response to Clawhip message `1506884276522848317` on 2026-05-21.
527. **`config model/hooks/plugins` reject unsupported trailing flags with `kind:"unknown"` while sibling commands use `kind:"cli_parse"`, and `config env` hangs on the same flags, so config-section argument errors have three different contracts** — dogfooded 2026-05-21 from the `#clawcode-building-in-public` 05:30 UTC nudge on `/home/bellman/Workspace/claw-code-pr2967` with branch/origin `docs/roadmap-workdir-provenance@4639a58` and binary `./rust/target/debug/claw` built from source SHA `25d663d`. Clean-home probes with `.claw.json` containing `model`, `env`, `hooks`, and `plugins`: `claw config model --resume`, `config model --verbose`, `config model --continue`, and the same flags for `config hooks`/`config plugins` all return nonzero bounded errors, but the discriminator is `[error-kind: unknown] error: unexpected extra arguments after \`claw config <section>\``. In the same parser family, `status`/`version`/`doctor`/`sandbox` report `[error-kind: cli_parse] unrecognized argument ... for subcommand ...`, while `config env` still zero-byte hangs on the same flags (#526). This means automation cannot switch on one stable error kind for a simple bad argument: it sees `cli_parse`, `unknown`, or timeout depending only on which config section was requested. **Required fix shape:** (a) route every `config <section>` extra-argument failure through the same CLI-parse error constructor as other subcommands; (b) reserve `kind:"unknown"` for truly unclassified internal failures, never deterministic parser errors; (c) give `config env` the same bounded path instead of the hang in #526; (d) include `command:"config"`, `section`, `unexpected_args`, and `supported_flags` in JSON/text diagnostics; (e) add regression coverage for `config env/model/hooks/plugins --resume|--verbose|--continue` verifying exit nonzero, bounded output, and `kind:"cli_parse"` or `kind:"unsupported_flag_for_command"` consistently. **Why this matters:** config inspection is a core support surface. If identical typo/flag-placement errors produce three contracts, wrappers have to special-case config sections and users see random-looking behavior instead of a clear command-line mistake. Source: gaebal-gajae dogfood response to Clawhip message `1506891824852242513` on 2026-05-21.
528. **`config` unknown sections and extra arguments fall into zero-byte hangs, including JSON-mode invocations, instead of returning bounded config-section parse errors** — dogfooded 2026-05-21 from the `#clawcode-building-in-public` 06:00 UTC nudge on `/home/bellman/Workspace/claw-code-pr2967` with branch/origin `docs/roadmap-workdir-provenance@63f4865` and binary `./rust/target/debug/claw` built from source SHA `25d663d`. Clean-home probes from a minimal temp workspace: `claw config bogus`, `claw config bogus --output-format json`, `claw config --output-format json bogus`, `claw config env extra`, `claw config env --definitely-unknown`, `claw config env --output-format json --definitely-unknown`, and `claw config env --output-format json extra` all timed out after 6s with `stdout=0`/`stderr=0`. This extends #526/#527: unsupported runtime flags on `config env` hang, known sections `model/hooks/plugins` produce bounded-but-wrong `kind:"unknown"`, and now arbitrary unknown config sections or plain extra args also hang. The config parser is not enforcing the advertised section grammar (`env|hooks|model|plugins`) before prompt/runtime fallback. **Required fix shape:** (a) parse `config` with an explicit section enum and reject unknown sections (`bogus`) before runtime startup; (b) reject any extra positional/flag arguments after a valid section unless explicitly supported; (c) in JSON mode, return a typed envelope such as `kind:"unknown_config_section"` or `kind:"unsupported_config_argument"` with `section`, `unexpected_args`, and `supported_sections`; (d) keep text mode bounded with the same information and exit nonzero; (e) add elapsed-time regressions for unknown section before/after `--output-format json`, valid section plus extra positional, valid section plus unknown flag, and bare `config` success. **Why this matters:** config inspection is a primary startup/debug surface. A typo like `config enb` or an extra copied flag should produce an immediate parse diagnostic, not an opaque no-output timeout that makes users think config loading or provider startup is dead. Source: gaebal-gajae dogfood response to Clawhip message `1506899371755569274` on 2026-05-21.