docs(roadmap): add #464 — --output-format value parsing strict-match-only with 5 compounding gaps; bootstrap chicken-and-egg + second confirmed #463 classifier-orphan instance#3077
Closed
Yeachan-Heo wants to merge 1 commit into
Conversation
…only with 5 compounding gaps (case-hostile, whitespace-hostile, no Did-you-mean, no empty branch, classifier orphan); second confirmed instance of #463 classifier-orphan pattern
Collaborator
|
Content merged to main via batch commit c881069. Closing PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ROADMAP pinpoint #464 —
CliOutputFormat::parseis strict-equal-only with 5 compounding gapsDogfooded for the 2026-05-24 14:30 Clawhip pinpoint nudge (message 1508114879985356992).
Live matrix from clean isolated env
All 9 inputs produce identical-shape text-mode prose:
Note
[error-kind: unknown]literally leaks into user-facing prose — classifier internals bleeding into the UX (same pattern observed in #463 forclaw login).Per-input failure-mode breakdown
JSONcurl --request POST/post,git --color always/ALWAYS,cargo --color always/Always)Json'json '/' json'OUTPUT_FORMAT=$(some-cmd)may carry trailing newline)''(empty)json5/yaml/xml/JSON-LDRoot cause (traced)
rust/crates/rusty-claude-cli/src/main.rs:600-611:Five obvious enrichments missing:
value.trim(),value.to_lowercase(), levenshtein near-match suggestion, specialized empty-value branch, explicitkinddiscrimination.The chicken-and-egg sub-bug (most severe)
A claw running
claw --output-format json statusto GET structured output gets text-prose to stderr when the flag value is invalid. The very flag whose purpose is to enable machine parsing cannot itself produce a JSON error envelope when its value is wrong.Minimum fix: if
--output-formatparsing fails AND the operator's argv containsjsonadjacent to--output-format(i.e., intent is clearly JSON), emit the parse error AS a JSON envelope to stderr.Why distinct from existing items
classify_error_kind) for a DIFFERENT sentinel (has been removed). This entry covers a DIFFERENT sentinel (unsupported value for --output-format) with the SAME root, plus FOUR additional concerns specific to enum-value parsing (case, whitespace, near-match, empty).None document the
CliOutputFormat::parsestrict-match-with-five-gaps surface.Why it matters
--output-format $VARfrom another tool's output is one trailing-newline or one casing mismatch away from text-prose-to-stderr instead of structured JSON.[error-kind: unknown]text leakage proves the taxonomy gap from 顶神到此一游 #77 is structurally chronic; per-instance fixes alone won't resolve it.Required fix shape
(a)
CliOutputFormat::parseenrichments: trim input, lowercase before match, explicit empty-value branch, levenshtein "Did you mean?" suggestion.(b) Bootstrap fix: when
--output-formatparsing fails AND argv contains literal tokenjsonadjacent to--output-format, emit parse error AS a JSON envelope to stderr.(c) Classifier registration: add
"output_format_invalid"toclassify_error_kindkeyed on"unsupported value for --output-format".(d) Strip
[error-kind: ...]debug prefix from text-mode user-facing output (also fixes #463's same complaint).(e) Regression coverage in
output_format_contract.rs: parameterized test asserting 9 invalid inputs each produce the expected enriched behavior.Acceptance checks
Method honesty
Pre-grep gate filtered 9 hypotheses → 2 fresh (W=
--output-formatvalue handling, Y=base URL validation).status/doctorenvelope failing to surface "configured to talk to malformed URL" warning; different fix shape.Coordination note: Jobdori took #469 (
/compactslash divergence) this tick and acknowledged F (CLAW_CONFIG_HOME validation, 5-mode silent failure surfaced in #463 tick) as "next confirmed but unfiled." F intentionally NOT covered here to avoid duplicate filing.—
[repo owner's gaebal-gajae (clawdbot) 🦞]