fix(tui): actionable CLI error messages (doctor, exec, stream, review) - #6725
Merged
Merged
Conversation
Message-only slices plus one presence-only credential check: - doctor: plain value/profile validation errors are shown (without the rejected value, which may be a pasted secret) with `fix: codewhale config set <key> <valid>`; parse and credential errors stay suppressed. Text and --json paths share SafeConfigDiagnostic. - doctor verdict: a key saved with `codewhale auth set` (secret store, config, or env; read-only presence) clears "no model provider"; the hint is /provider or `codewhale auth set --provider <p>` when headless. - exec preflight: headless next steps name CLI commands only, no duplicate auth instruction, no "..", multi-line guidance keeps its indentation; DeepSeek zsh caveat on its own line and the DeepSeek Harness bullet only when dsh is on PATH; the final exec failure line no longer repeats an error the stream already printed. - `config set provider <typo>` reuses "Invalid provider 'x': expected ...". - SSE H1 fallback: full error chain, FORCE_HTTP1 hint only after protocol/TLS errors, connect failures read "Cannot reach host:port". - 400s classify as ContextLengthError only on context-specific phrases. - cloud sanitize_error: controls/whitespace collapse to one space, redact before cut, keep head and tail. - exec --resume shows the typed id (redacted only for stream-json) plus `Run \`codewhale sessions\` to list ids.`; review outside a repo says "Not inside a git repository (cwd: ...)", git diff errors keep one line. Tests: targeted codewhale-tui lib tests, 63 passed / 0 failed; touched modules (config::tests, llm_client, cloud_dispatch, exec_agent, route_preferences, doctor) 724 passed / 0 failed / 1 ignored. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ZwqatxgVFxHvovngywnks
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Checkpoint the 12-file working tree left by the original Claude repair:L2 worker for PR #6725 after its session limit interrupted the repair. Preserve that work before the DSH helper ownership move; this commit is local only and is not a green landing claim. Provenance: original lane commit 2562f29; Claude session_014ZwqatxgVFxHvovngywnks; repair workflow receipt wg9a2bnyw.output reports the quota stop. No original edits were discarded. Verification at checkpoint: - git diff --check: pass. - scripts/split/module_graph.py --check: FAIL, four new integrations-to-UI references (two crate-root references and two ratatui imports). - Recovered repair log b0yfkj7tx.output: test result: FAILED. 332 passed; 1 failed (tls_failure_during_connect_keeps_the_http1_hint). - Hosted Ubuntu at the preceding PR head failed the 80x24 keyless error visibility test; the recovered tree has no repair of that rendering yet. - No Rust build or npm/check:web gate was run for this checkpoint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Hunter B <hmbown@gmail.com>
Finish the interrupted PR #6725 repair preserved in a4740de. Render each explicit error-text line through the existing wrapper, keeping the recovery command visible after a config acknowledgement at 80x24 and 140x40. Keep DeepSeek Harness consent advice conditional without probing PATH or another application's credential file from the runtime's missing-key path. The existing integration detector remains intact. Recognize rustls errors inside the two nested IO wrappers produced by the current hyper-rustls/tokio-rustls stack, so TLS handshake failures retain the protocol hint while refused connections retain their host-specific message. Verification: - npm test: 636 passed (68 wrapper, 16 runtime SDK, 50 extension host, 502 web); npm run check:web: passed including production build. - Targeted recovered-source Rust run: 747 passed, 1 failed, 1 ignored. The sole failure was the real loopback TLS fixture fixed here; unchanged passing modules were not rerun. - After the final nested-IO fix: stream_entry 15/0, diagnostic_read_only integration 13/0, and error/history rendering 4/0. The original keyless test and its 80x24/140x40 visible-command assertions remain unchanged. - Command-boundary regression suite: 23/0; module graph check passed. - Blocking-call inventory: 747 sites across 209 files, within existing budget; no budget increase. cargo fmt and git diff --check passed. Hosted Ubuntu and Windows at 2562f29 failed the same keyless rendering assertion. Local results above do not claim new hosted CI or release proof. Preserve the original Claude repair worker's provenance and checkpoint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Hunter B <hmbown@gmail.com>
Windows CI received TCP reset10054 when the test peer dropped unread ClientHello bytes, masking the intended TLS protocol error. Drain the peer until client closure so the assertion checks the actual TLS path. Validation: 15 focused stream tests passed; 0 failed. git diff --check passed. Required npm636pass and check:webpass from3886ef026 remain applicable: this follow-up changes only four lines in the Rust fixture. Hosted Windows proof is pending the pushed head.
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.
No-Issue: verified quality-hunt findings; integration evidence tracked in SHA-6705.
CLI failures now give usable recovery commands without exposing pasted credentials or suggesting the wrong authentication flow. Doctor reports safe validation errors and the setup state without reading external credentials merely to form its verdict. Headless route failures use CLI guidance; OAuth errors are not directed to API-key storage. Session-resume errors redact the supplied identifier in every output mode, and the final exec failure line retains the actual error for automation.
DeepSeek recovery guidance puts the save command first and describes Harness import conditionally, without probing PATH or another application's files from the runtime. Error-history rendering preserves explicit line breaks, keeping recovery commands readable in small terminals. Git review distinguishes a missing work tree from other repository failures and retains actionable Git diagnostics.
Streaming errors distinguish refusal/DNS failures from TLS/protocol failures, including typed TLS causes. The HTTP response parser and engine share the context-overflow phrase list. Cloud-error sanitization rejoins control-split tokens before redaction, then bounds the displayed output while keeping its head and tail.
Validation
At production repair head
3886ef026d0868770fb0e895fc70afe2339ecce2:npm test: 636 passed, 0 failed; requirednpm run check:web: passed including production build.The local TUI linker emits its existing large-unwind-table warning. Hosted checks must qualify this new head.
Full workspace and hosted checks remain CI responsibilities. No live provider, native app, release, or deployment qualification is claimed.
Recovered Claude Code edits were checkpointed before the follow-up repair; original commits and contributor attribution remain intact. Original session.
Windows fixture follow-up
Windows CI at3886ef026 reported TCP reset10054 in the TLS handshake fixture because its peer immediately dropped unread ClientHello bytes. Commit557cfac53 keeps the peer open and drains it until the client closes. All 15 focused stream tests pass locally; hosted Windows, macOS, Linux and all other current-head workflows passed at
557cfac53a8dbf0231c9dced9809d6f524a686d3. No production behavior changed.