feat(cloud-agent-next): stream redacted setup command output to users#4583
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryAll 4 previously flagged issues (unredacted error passthrough, Files Reviewed (9 files)
Previous Review Summary (commit ccbf2ad)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit ccbf2ad)Status: 4 Issues Found | Recommendation: Address before merge Executive SummaryAn unclassified Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (49 files)
Reviewed by claude-sonnet-5 · Input: 34 · Output: 4.6K · Cached: 728.3K Review guidance: REVIEW.md from base branch |
Forward sanitized, redacted setup command stdout/stderr to the client during workspace preparation instead of a generic "still running" pulse. Output is stripped of ANSI/control codes and spinners, and secrets (bearer/basic auth, URL credentials, cookies, KEY=VALUE secret names, secret-bearing CLI flags) are redacted before reaching the client or failure diagnostics. - wrapper: add redact-output module and a setup output reporter that buffers line-by-line; expose redacted command + bounded output tail on failure. Drop failFast so setup commands always fail; mark setup command failures non-retryable while keeping timeouts retryable. - orchestrator: extract translateKnownWrapperFailure and apply it on wrapper startup so non-retryable workspace setup failures surface instead of being masked as retryable wrapper start failures. - web: add SetupLogPanel and a setupLog service-state atom, rendered in the chat during the setup_commands preparing step and cleared on ready/failed/stopped.
ccbf2ad to
dacba1d
Compare
Summary
Forward sanitized, redacted setup command stdout/stderr to the client during
workspace preparation instead of a generic "still running" pulse. Output is
stripped of ANSI/control codes and spinners, and secrets (bearer/basic auth,
URL credentials, cookies, KEY=VALUE secret names, secret-bearing CLI flags)
are redacted before reaching the client or failure diagnostics.
redact-outputmodule and a setup output reporter thatbuffers line-by-line; expose the redacted command plus a bounded output tail
on failure. Drop
failFastso setup commands always fail; mark setup commandfailures non-retryable while keeping timeouts retryable.
translateKnownWrapperFailureand apply it onwrapper startup so non-retryable workspace setup failures surface instead of
being masked as retryable wrapper start failures.
SetupLogPaneland asetupLogservice-state atom, rendered inthe chat during the
setup_commandspreparing step and cleared onready/failed/stopped.
Verification
Visual Changes
Reviewer Notes
wrapper/src/redact-output.ts; focus on regexcoverage and false-negatives for bearer/basic auth, URL credentials, cookies,
KEY=VALUE secret names, and
--token/--key/...CLI flags.failFastdropped (setup commands now alwaysfail rather than fast-abort) and setup-command failures are non-retryable,
while timeouts remain retryable.
translateKnownWrapperFailureensures thesesurface as non-retryable instead of being masked as retryable wrapper start
failures.
setupLogservice-state atom lifecycle: rendered only during thesetup_commandspreparing step and cleared on ready/failed/stopped.