mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-04-27 06:57:37 +08:00
roadmap: #267 filed
This commit is contained in:
parent
cc14d6edd6
commit
25adb26dd5
12
ROADMAP.md
12
ROADMAP.md
@ -16960,3 +16960,15 @@ Required fix shape: (a) introduce `pub enum RuntimeErrorKind { TurnBudgetExhaust
|
||||
Acceptance: a downstream caller can pattern-match on `error.kind()` returning `RuntimeErrorKind::TurnBudgetExhausted { iterations, max }` instead of substring-matching `message.contains("conversation loop exceeded")`; `--output-format json` emits `{ "error": { "kind": "turn_budget_exhausted", "iterations": 33, "max": 32, "message": "…" }, … }` with typed payload fields per variant; the 22-branch substring classifier shrinks to a single `error.kind().as_str()` call; new error classes added to the runtime are compile-time-visible at every emit point because the enum requires exhaustive matching; a new error variant added without a classifier branch becomes a compiler error rather than silently degrading to `"unknown"`; #264's `TurnBudgetExhausted` variant has a typed home; #130/#130b's filesystem context-loss has a `RuntimeErrorKind::FilesystemError { path, operation, errno }` typed home rather than a classifier substring branch.
|
||||
|
||||
**Status:** Open. No source code changed. Filed 2026-04-26 13:35 KST. Branch: feat/jobdori-168c-emission-routing. HEAD: `8975354` before filing (post-rebase fast-forward onto gaebal-gajae's #265 `--output-format stream-json` lane-absent pinpoint). Cluster delta: Typed-error-kind-enumeration cluster 0→1 (founder, NEW SOLO CLUSTER); complementary-pinpoint-pair-bundle discovery-pattern extended to 3 bundles total (#245+#250 WebSearch, #262+#264 turn-budget, #264+#266 turn-budget-runtime/typed-error-axis). Smaller-scope by design (matches #253/#254/#257/#258/#260/#261/#262/#263/#264/#265 context-budget discipline). Sister: #264 (Turn-budget primitive runtime-side; #264 names `RuntimeErrorKind` as a future variant; #266 is the dedicated structural audit of that absent enum itself). Distinct from §4.44 typed-error contract proposal (which targets the JSON envelope boundary; #266 targets the runtime enum that the envelope would serialize FROM). Distinct from #130/#130b classifier-pattern-missing (which is downstream of the absent enum; #266 catalogues the upstream root cause). Concurrent-dogfood-rebase parity will be confirmed local==origin==fork at HEAD `8975354+#266` after push.
|
||||
|
||||
## Pinpoint #267 — `prompt TEXT` subcommand has the same post-prompt greedy-slurp control-token absorption shape as `-p`, so flags after `prompt` become model input instead of parse errors
|
||||
|
||||
Dogfooded 2026-04-26 14:02 KST on `feat/jobdori-168c-emission-routing` at HEAD `fae9fd9` (post-#266). While probing the help-advertised `claw [--model MODEL] [--output-format text|json] prompt TEXT` path, source inspection showed the `prompt` subcommand arm does `let prompt = rest[1..].join(" ")` at `rust/crates/rusty-claude-cli/src/main.rs:1239`, then immediately returns `CliAction::Prompt` without validating whether any later token is a flag-looking control token. This mirrors #262's `-p` greedy slurp (`args[index+1..].join(" ")`) but on the documented `prompt TEXT` subcommand surface rather than the short `-p` compat alias.
|
||||
|
||||
Concrete failure mode: `claw prompt "say hi" --max-turns 0`, `claw prompt "say hi" --output-format json`, or `claw prompt "say hi" --definitely-unknown` are structurally parsed as prompt text (`"say hi --max-turns 0"`, etc.) rather than as either (a) recognized flags that continue parsing, or (b) typed `cli_parse` errors for unsupported trailing flags. In contrast, the same unknown flag before the first positional token is rejected by the global `other if rest.is_empty() && other.starts_with('-')` arm. The help text advertises `prompt TEXT` as the safe explicit non-interactive form, but the explicit form still makes the boundary after `TEXT` invisible: machine-control tokens after the prompt become model input.
|
||||
|
||||
Gap. This is distinct from #262 but sibling-shaped. #262 filed the missing `--max-turns` flag plus position-sensitive absorption after `-p` and bare prompt forms. #267 covers the long-form documented `prompt TEXT` subcommand. The `prompt` arm is a separate parser site (`rest[1..].join(" ")`) with separate acceptance criteria and deserves its own regression because a fix that only rewrites the `-p` arm would leave the documented subcommand silently absorbing flags. This extends the position-sensitive-parse-asymmetry sub-shape from short-option prompt mode to the explicit `prompt` subcommand surface.
|
||||
|
||||
Required fix shape: (a) define a delimiter contract for `prompt TEXT`: either require all flags before `prompt` and reject any `rest[1..]` token that starts with `-` unless escaped via `--`, or parse `prompt` as consuming exactly one TEXT argv and then resume global flag parsing; (b) support `--` as an explicit literal-prompt delimiter so users can intentionally include flag-looking text (`claw prompt -- "explain --max-turns"`); (c) emit a typed `CliFlagWarning`/`cli_parse` JSON error when a flag-looking token appears after the prompt without `--`; (d) add parser tests for `prompt x --max-turns 0`, `prompt x --output-format json`, `prompt x --definitely-unknown`, `prompt -- "x --max-turns 0"`, and `--output-format json prompt x`. Acceptance: the documented `prompt TEXT` path no longer silently mutates trailing control tokens into model input; fixes for #262 cannot pass while leaving this long-form parser site greedy.
|
||||
|
||||
**Status:** Open. No source code changed. Filed 2026-04-26 14:02 KST. Branch: feat/jobdori-168c-emission-routing. HEAD: `fae9fd9` before filing. Cluster delta: position-sensitive-parse-asymmetry sub-shape +1 documented-subcommand member; sibling to #262, not duplicate. Concrete delta this cycle: ROADMAP-only pinpoint appended after source verification of the `prompt` arm.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user