docs(roadmap): add #463 — removed subcommands (login/logout) emit kind:unknown with hint:null; classifier orphan from #37×#77 interaction#3076
Open
Yeachan-Heo wants to merge 1 commit into
Conversation
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 #463 —
claw login/claw logoutremoved-subcommand sentinel mis-bucketed askind:unknownwithhint:nullDogfooded for the 2026-05-24 13:30 Clawhip pinpoint nudge (message 1508099780230906027).
The bug in two envelopes
$ claw login --output-format json {"error":"`claw login` has been removed. Set ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN instead.","hint":null,"kind":"unknown","type":"error"} $ claw logout --output-format json {"error":"`claw logout` has been removed. Set ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN instead.","hint":null,"kind":"unknown","type":"error"}Cross-input classifier audit
kindhintxyznotrealmissing_credentialstotally-fake-cmdmissing_credentialslogin(removed)unknownlogout(removed)unknownplugins(formerly #78)Three different code paths, three different misclassifications. This PR addresses the middle two.
Root cause (traced)
main.rs:951—parse_argsreturns the sentinel as a plain String:main.rs:1150-1154— single-line sentinel:main.rs:253-286— classifier has 13 specific kinds,has been removedmatches none:main.rs:290-295—split_error_hintsplits on\n; sentinel is single-line, sohintis always None.Verification grep:
grep -nE 'removed_subcommand|"removed"' rust/crates/rusty-claude-cli/src/main.rsreturns zero hits. Test coverage atmain.rs:11793-11794only asserts--helpnegative-presence:No envelope-shape test exists.
Why distinct from existing items
classify_error_kind+split_error_hintwith 13 specific kinds for THEN-existing sentinels. Theremoved_auth_surface_errorsentinel added under 我喜羊羊合影留念!!!!!! #37 was never registered.kind:missing_credentials— different code path, different fix.This is a #37×#77 classifier-orphan pattern: features added after the classifier shipped never get registered, silently degrading their envelope quality.
Why it matters
if claw cmd --output-format json | jq -e '.kind == "unknown"'treats removed-command typos as unrecoverable internal errors — bad escalation triage.hintfield discarded is the same anti-pattern as 火钳流明,合影合影。后厂村发来贺电 #459 / 合影~ #455 / MARK #79 / 合影 #326 / 合影 #462 — structured field exists, data exists, envelope drops it.Err(...)sentinel has a matchingclassify_error_kindbranch. Sweep would surface other orphans.hintfield is null. Human sees it, machine doesn't.Required fix shape
(a) Structured sentinel emission: replace
Err(removed_auth_surface_error(...))with a typed variant (e.g.,CliAction::Error(CliError::RemovedSubcommand { name, replacement_env_vars })) so JSON layer can serialize{"kind": "removed_subcommand", "subcommand": "login", "hint": "..."}without classifier-string-matching.(b) Add
"removed_subcommand"toclassify_error_kindas defensive fallback keyed on"has been removed"substring.(c) Make
removed_auth_surface_errortwo-line sosplit_error_hintpopulateshinteven on the string-only path.(d) Envelope-shape regression tests in
output_format_contract.rs: assertclaw login --output-format jsonproduces{"kind": "removed_subcommand", "hint": <non-null string>}.(e) Sweep for other classifier orphans:
grep -rnE 'Err\(format!|Err\("' rust/crates/rusty-claude-cli/src/and cross-check againstclassify_error_kind.Acceptance check
Should print
true(currently.kind == "unknown"and.hint == null→ exit 1).Method honesty
Pre-grep gate filtered 9 hypotheses → 3 fresh (E=login/logout envelope, F=CLAW_CONFIG_HOME validation across 5 silent-failure modes, G=skills empty envelope).
/nonexistentsilent ok,/etcsilent ok,/dev/null/cfgdegraded but exit=0, empty string silent ok, regular file silent ok) and warrants its own consolidated entry.Also caught one near-miss mid-investigation: my E1 reading was contaminated by stdout from a prior shell command. Required clean re-isolation with separate file handles to confirm exit=1 (correct) and stderr-only routing (correct) — the actual bugs are envelope-shape, not exit-code.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]