feat(cli): make --debug output structured and useful (ENG-92248) - #536
feat(cli): make --debug output structured and useful (ENG-92248)#536blainekasten wants to merge 8 commits into
--debug output structured and useful (ENG-92248)#536Conversation
Broly Security ScanNote ✅ Clean scan Note Re-scan this PR anytime with
|
Replace the spammy Stainless/httpx DEBUG dump with Rich-formatted stderr traces: session context, redacted HTTP request/response pairs, request ids, timing, and JSON bodies. Hide noise such as full header objects, analytics internals, and x-stainless boilerplate. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
16437b1 to
52ed9db
Compare
_print_lines already prefixes every line with `debug`, so the session banner was rendering as `debug debug tg ...`. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
|
@cursoragent Findings
|
|
Addressed all four findings on #536:
Waiting on CI. |
Restore TOGETHER_LOG and the together logger level on teardown so a second launcher invocation cannot raw-print debug noise. Strip URL query strings from leftover SDK log lines (presigned S3/SigV4). Type HTTP debug hooks as AsyncClient-only to match the async hook impl. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
|
@cursoragent Findings:
|
|
Addressed all five review findings on #536:
Local pytest on the debug/progress/no-auth tests: 30 passed. Waiting on CI. |
Stop doubling warnings under --debug, restore exception tracebacks, show key=<missing> (and the request line) when no API key is set, and keep per-file ✓/↷ progress lines when the Live spinner is skipped. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Construct the dummy key as "0" * 40 instead of a 40-char literal so secret scanners do not treat it as a hardcoded API key. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
|
@cursoragent Findings
|
|
Fixed both on #536:
Tests for wrap + missing-key telemetry passed. Waiting on CI. |
…equests Rich was hard-wrapping stderr-to-file at 80 columns, splitting paths mid-token. Print debug lines with soft_wrap. Keep the missing-key block hook after HTTP debug hooks but before track_request so → GET still prints without emitting cli_command_api_request for a request that never leaves the process. Co-authored-by: Blaine Kasten <blainekasten@gmail.com>


Fixes ENG-92248.
--debugused to dump Stainless/httpx DEBUG logs as plain text: fullHeaders(...)objects, request-option dumps (including secrets), analytics internals, and checksum-chunk spam. That’s hard to scan and mostly noise.This replaces that with a CLI-owned stderr trace:
--debugis a documented Global Option; JSON mode stays on stdoutExample:
Linear Issue: ENG-92248
Linear Issue: ENG-92248