Skip to content

fix(rendering): honor suppressWarnings in settled build output#470

Merged
cameroncooke merged 1 commit into
getsentry:mainfrom
JoshKappler:fix/suppress-warnings-in-domain-result-text
Jul 12, 2026
Merged

fix(rendering): honor suppressWarnings in settled build output#470
cameroncooke merged 1 commit into
getsentry:mainfrom
JoshKappler:fix/suppress-warnings-in-domain-result-text

Conversation

@JoshKappler

Copy link
Copy Markdown
Contributor

suppressWarnings was only applied to the streaming compiler-warning fragments. The settled text rendered from the domain result calls createStandardDiagnosticSections directly, 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 renderDomainResultTextItems and one regression test at the renderCliTextTranscript level, 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 suppressWarnings never reaches the renderer, since bootstrapRuntime only hydrates config sessionDefaults when runtime is mcp. Changing that would affect every session default in the CLI, so I left it out of this fix.

Fixes #447.

Comment thread src/utils/renderers/domain-result-text.ts
@cameroncooke

Copy link
Copy Markdown
Collaborator

@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.
@JoshKappler JoshKappler force-pushed the fix/suppress-warnings-in-domain-result-text branch from 85ba996 to 5dc0759 Compare July 12, 2026 15:12
@JoshKappler

Copy link
Copy Markdown
Contributor Author

Fixed the CI failure, that one was mine. The test built a BuildResultDomainResult with artifacts: {}, which stopped compiling once BuildResultArtifacts became AtLeastOne<...>. Rebased on main and gave it a real artifact.

On the snapshot test: I can't generate the fixture. The harness spawns build/cli.js against real xcodebuild/simctl and I'm on Windows, so I have no way to produce or verify that output. It's also more than a fixture drop, since none of the current build fixtures contain warnings, so the scenario needs a target that actually emits one, plus the flag threaded in through XCODEBUILDMCP_SUPPRESS_WARNINGS on the harness env.

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 test:snapshot:update to generate the fixtures. If you'd rather keep fixture generation maintainer-side, the renderer unit tests here cover the settled-output path.

@pkg-pr-new

pkg-pr-new Bot commented Jul 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@470

commit: 5dc0759

@cameroncooke cameroncooke merged commit 5797bae into getsentry:main Jul 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: suppressWarnings doesn't work

2 participants