fix(rendering): honor suppressWarnings in settled build output#470
Conversation
|
@JoshKappler thanks for this I think it would be worth creating a snapshot test and fixture for this scenario? |
suppressWarnings was only applied to streaming compiler-warning fragments. The settled text rendered from the domain result called createStandardDiagnosticSections directly, which always emitted the Warnings section, so warnings still reached the final MCP tool response and filled agent context. Thread the flag from the renderer into the build, build-run, and test diagnostic paths. Errors are still rendered when it is set. Other result kinds are unchanged, since the option covers warnings from the build tools. Fixes getsentry#447.
85ba996 to
5dc0759
Compare
|
Fixed the CI failure, that one was mine. The test built a BuildResultDomainResult with On the snapshot test: I can't generate the fixture. The harness spawns If you want it in this PR, I'll add a warning-emitting target and the suite entries for both the suppressed and unsuppressed cases, and you or CI can run |
commit: |
suppressWarningswas only applied to the streaming compiler-warning fragments. The settled text rendered from the domain result callscreateStandardDiagnosticSectionsdirectly, which always emitted the Warnings section, so warnings still reached the final MCP tool response.This threads the flag into the build, build-run, and test diagnostic paths. Errors still render when it is set, and other result kinds are unchanged since the option covers warnings from the build tools.
Tested with two unit tests on
renderDomainResultTextItemsand one regression test at therenderCliTextTranscriptlevel, which is the surface the issue reports. That regression test fails on main and passes here.tsc --noEmit, eslint, and prettier are clean.The issue also notes that in the CLI runtime
suppressWarningsnever reaches the renderer, sincebootstrapRuntimeonly hydrates configsessionDefaultswhen runtime ismcp. Changing that would affect every session default in the CLI, so I left it out of this fix.Fixes #447.