test(desktop): guard the chat streaming render test to debug builds - #13123
test(desktop): guard the chat streaming render test to debug builds#13123aryanorastar wants to merge 1 commit into
Conversation
ChatStreamingRenderProbe is defined entirely inside `#if DEBUG` — its own doc comment states it is compiled out of release builds — but the test added alongside it references the type ten times without that guard, so a release build cannot compile the file: ChatStreamingRenderBudgetTests.swift:254: error: cannot find type 'ChatStreamingRenderProbe' in scope Main does not catch this: the Desktop Swift lanes are skipped on push runs, and the step that compiles tests in release mode is gated on should_notification_release_regression, so only a PR touching notification paths reaches it. The lane is therefore broken for those PRs while main stays green. The guard mirrors the probe's own file-level `#if DEBUG`; the large line count is the re-indent that indentConditionalCompilationBlocks requires, and `git diff -w` is four added lines. Failure-Class: none Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Verified the diagnosis end to end — this fixes a real, latent release-lane break.
Debug test runs are unaffected — the guard is active there, so the budget test still runs in the normal lane. One possible follow-up for maintainers (not a request): the release test-module compile is only exercised on notification-path PRs today, so this class of break can recur silently; a broader release-mode Automated maintainer review on behalf of the Omi maintainers — leaving formal approval and merge to a human maintainer. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
What changed
ChatStreamingRenderBudgetTests.swiftis now#if DEBUG-guarded, matching the probe it measures.Why
#13053 added
ChatStreamingRenderProbe.swiftentirely inside#if DEBUG— its own doc comment says so:The test landed in the same commit without that guard, and references the type ten times. In a release build the type does not exist, so the file cannot compile:
Why nobody has seen it
Two filters hide it.
Desktop Swift CIis path-gated and its lanes are skipped on main's push runs — a current main run showsDesktop Swift Release Compile :: skipped. And the step that compiles tests in release,Test UserNotifications callback regression in release mode, is gated onshould_notification_release_regression, so it only runs on a PR touching notification paths.So main stays green while the release lane is broken for every PR that selects that step. It first fired on #11864, whose only change was to notification files.
Verification
swift build -c release --build-testson this branch: zero errors mentioningChatStreamingRenderProbeorChatStreamingRenderBudgetTests, where CI reported nine on the unguarded file. (My local invocation stops later on an unrelated@testable import OmiWAL/ModuleNotTestablelimitation that CI's own harness does not hit.)lint --strict: clean.git diff -wis four added lines — the guard,#endif, and a two-line comment. Everything else in the diff is the re-indent thatindentConditionalCompilationBlocks: truerequires, the same shapeChatStreamingRenderProbe.swiftalready uses.Scope
Test-only, debug-only. No production code, no behavior change in any configuration: the file was already absent from release builds in every sense except that it failed to compile.
Failure-Class: none