Retain actionable Docker build failure diagnostics
Designed the original NemoClaw fix for bounded, multi-stream build diagnostics; NVIDIA carried that implementation into a maintainer-owned replacement and retained explicit commit co-authorship.
NVIDIA/NemoClaw · #11120
Operational diagnostics fix
Long Docker build failures now preserve the final actionable errors from every captured stream instead of hiding them behind earlier successful output.
Problem
NemoClaw truncated oversized Docker build diagnostics from the beginning, so long logs could retain successful setup output while dropping the failing build step. A noisy stream could also consume the available budget and obscure useful context from another stream.
Approach
Sanitizes captured streams, allocates a shared 8,000-character budget across non-empty stderr, stdout, and error output, and retains each stream's tail. The merged replacement also reuses unused capacity and reapplies terminal-control sanitization to the final rendered diagnostic.
Impact and scope
- Keeps the error lines operators need to diagnose failed sandbox image rebuilds.
- Prevents one verbose output stream from hiding independent failure context in another stream.
- Bounds and sanitizes diagnostic output without changing rebuild failure handling or sandbox guarantees.
Validation
- The original authored PR added long single-stream and mixed stdout/stderr regressions and reported 89 focused tests plus the repository publication validator passing.
- NVIDIA's replacement expanded the suite to 94 focused tests; its build, type-check, static-analysis, security, CodeQL, and CLI test checks passed.
- The maintainer explicitly confirmed that #11120 retained the implementation from #10605; the GitHub-verified squash commit records Goutam Adwant as co-author.