Skip to content

base red: release-config test builds compile UiLayerPreviewTests - #30055

Merged
cmux-bot[bot] merged 4 commits into
feat-cmux-nextfrom
fix/base-red-uilayer-preview-release
Nov 1, 2026
Merged

cmux-bot[bot] merged 4 commits into
feat-cmux-nextfrom
fix/base-red-uilayer-preview-release

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

swift build --build-tests -c release of Packages/macOS/CmuxNext has failed since fe5fcb8 (#24978):

Tests/CmuxNextUiLayerPreviewTests/UiLayerPreviewTests.swift:6:20: error: cannot find 'UiLayerPreviewData' in scope

CmuxNextUiLayerPreview defines CMUX_UI_LAYER_PREVIEW only .when(configuration: .debug), and all of its source is inside #if CMUX_UI_LAYER_PREVIEW. In Release the library is empty, but its test target had no define and no guard. This stops every Release-config Swift suite step on the fleet (package-test-lane.sh suite with CMUX_SWIFT_SUITE_CONFIGURATION=release), for example jobs a836ea817d9250a196502b2b and 9d819957423526c18421578e.

Fix: the test target gets the same define with the same condition (one shared uiLayerPreviewDefine, so the two cannot drift), and the test file is inside #if CMUX_UI_LAYER_PREVIEW. In Release the test target builds with no tests. In Debug the test runs as before.

Why not move UiLayerPreviewData out of the guard: #24978 makes the preview leaf Debug-only on purpose. docs/cmux-next/native-ui-host.md says it "is compiled only in the Debug configuration ... not included in release app builds", and architecture-layers.json lists it as Debug-only. Its only consumer is the Debug Prototypes/UiLayerHost.

Changelog

none

Evidence

  • Red at base 2a822f8157d4: 7441c6241e1956e7e3c69ef2 (release-config suite build, KeepAwakePolicyTests, CMUX_SWIFT_SUITE_CONFIGURATION=release).
  • Green at head: f430149443470620d2a286e6 (same step).
  • Head compile-check (--app --package CmuxNext --recipe-version 2): ec318721bca96a6782e73a9d.

Observed / Not run

Observed: the base error in job a836ea817d9250a196502b2b's full log (line 3939, the error above); prepush-gate.py passed (no new violations). lint-ios-package-conventions.sh --namespace-fix reports one base error in a file this PR does not touch (CmuxNextAgentPane/AgentPaneHandoffPrompt.swift:11, namespace-type).
Not run: the Debug-config UiLayerPreviewTests run. It compiled at the head in job ec318721bca96a6782e73a9d; the test body did not change, only the guard was added around it.

No capture: build configuration and test guard only, no UI change.

`swift build --build-tests -c release` of Packages/macOS/CmuxNext failed with
"UiLayerPreviewTests.swift:6:20: cannot find 'UiLayerPreviewData' in scope"
since fe5fcb8 (#24978). The CmuxNextUiLayerPreview library defines
CMUX_UI_LAYER_PREVIEW only in Debug and its whole source is inside that
guard, so in Release the library is empty, while its test target had no
define and no guard. Every Release-config Swift suite step on the fleet
(package-test-lane.sh suite with CMUX_SWIFT_SUITE_CONFIGURATION=release)
stopped at this build error, e.g. jobs a836ea817d9250a196502b2b and
9d819957423526c18421578e.

Why the guard and not moving UiLayerPreviewData out of it: #24978 makes the
preview leaf Debug-only on purpose (docs/cmux-next/native-ui-host.md: "is
compiled only in the Debug configuration ... not included in release app
builds"; architecture-layers.json notes it as Debug-only). Its only consumer
is the Debug Prototypes/UiLayerHost. Shipping its data type in Release would
undo that for no user. So the test target now takes the same define with the
same condition (one shared uiLayerPreviewDefine, so the two cannot drift),
and the test file sits inside #if CMUX_UI_LAYER_PREVIEW: in Release the test
target builds with no tests; in Debug the test runs as before.

Red: the existing Release suite builds above fail at base 2a822f8.
Green: fleet Release-config suite build at this head (job IDs in the PR).
@lawrencecchen lawrencecchen added the risk:low Risk tier (docs/ci/risk-tiers.md) label Nov 1, 2026
@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 264ca3b: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr30055 -f ref=fix/base-red-uilayer-preview-release -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: red check: No fleet host names in gallery fixtures is not red on the base dfc2b58; do not merge until green; see lane-rules

Shipped in:

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Nov 1, 2026
@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (independent review subagent): SHIP at 264ca3b
reviewer-session: 68051ac5-a5e2-4056-81d0-a0d8efc9dbde
author-session: 4b6c20a4-1d7d-411c-ae1a-b1f27e82b482
R9: pass
perf claim: none

Verdict

SHIP. The change fixes the root cause of the Release-config test build red. I found no correctness defect.

Correctness

  • Root cause: CmuxNextUiLayerPreview gets CMUX_UI_LAYER_PREVIEW only .when(configuration: .debug), and its one source file (UiLayerPreviewView.swift) is wholly inside #if CMUX_UI_LAYER_PREVIEW (lines 1-118). In -c release the module is empty, and CmuxNextUiLayerPreviewTests had no define and no guard, so UiLayerPreviewData was not in scope. The PR gives the test target the same define from one shared uiLayerPreviewDefine constant and wraps the whole test file in the same #if. The library and its tests now cannot disagree on the condition.
  • Release: package-test-lane.sh run_suite adds -Xswiftc -enable-testing -Xswiftc -DDEBUG -Xswiftc -Xllvm -Xswiftc -sil-disable-pass=copy-propagation for release. It does not define CMUX_UI_LAYER_PREVIEW, and -DDEBUG does not matter here. So in Release the test module compiles to an empty module, and the @testable import is also inside the guard. The red log shows those exact flags (job a836ea817d9250a196502b2b, line 1148: swift build --build-tests -c release ... -Xswiftc -DDEBUG ..., and line 3939 shows the error).
  • Debug: the define is set for both targets, so the test compiles and runs as before. The head compile-check log shows this: job ec318721bca96a6782e73a9d, "Building for debugging...", lines 1383-1384 "Emitting module CmuxNextUiLayerPreviewTests" / "Compiling CmuxNextUiLayerPreviewTests UiLayerPreviewTests.swift", then "Build complete! (239.91s)". CmuxNext, app and cmux-tui all report ok (248.6 s / 85.3 s / 67.8 s).
  • Other consumers:
    • Prototypes/UiLayerHost is a Debug-only swift run host. It gets the library product only and does not change.
    • ci-target-graph.json records dependencies only, not swiftSettings, so it needs no regeneration.
    • cmux-next.yml:2740 already sends CmuxNextUiLayerPreview to the Mac canary and does not change.
    • architecture-layers.json and docs/cmux-next/native-ui-host.md (line 28) say Debug-only. The PR agrees with them.
    • No caller passes a UiLayerPreviewTests suite filter. If one did in Release, require_swift_test_execution.py would report "no result" and not a false pass. That is why R9 passes.
  • Alternative (move UiLayerPreviewData out of the guard): this would also compile. But it would put a public type into a Release module that is Debug-only by design and has no Release consumer, and it would leave the test target out of step with the library define. The shared-define approach fixes the actual mismatch, so I agree with the PR's choice.
  • Repo rules: no CI gate, job or budget added. The #if/#endif wrap triggers none of the SwiftFormat rules in scripts/cmux-next/lint/swiftformat.conf. risk:normal is the correct tier (build configuration only, no user-visible change). "No capture" is correct.

Findings (non-blocking)

  1. The PR body Evidence section still has the placeholders JOB_RED and JOB_GREEN, and the commit message says "job IDs in the PR". Replace them with the queued Release suite jobs: base 7441c6241e1956e7e3c69ef2, head f430149443470620d2a286e6. Also, the "Not run: the Debug-config UiLayerPreviewTests run" line can say that the Debug test build compiled the test at the head (ec318721bca96a6782e73a9d, log lines 1383-1384). The test was compiled but not run.
  2. Coverage gap: when I reviewed, the Release-config green at the head was not yet observed. Jobs 7441c6241e1956e7e3c69ef2 (base) and f430149443470620d2a286e6 (head) were both queued. The fix is a whole-file #if with the same condition as the library, so I expect it to be green. But this is a reading of the code, not an observed result.

Evidence read

  • git diff 2a822f8157d4 264ca3b34122 and the commit message.
  • Packages/macOS/CmuxNext/Sources/CmuxNextUiLayerPreview/UiLayerPreviewView.swift (the guard covers the full file).
  • scripts/ci/package-test-lane.sh run_suite (lines 783-871), plus the suite-filter parsing.
  • Prototypes/UiLayerHost/Package.swift, launch.sh, ci-target-graph.json, .github/workflows/cmux-next.yml:2740, plans/cmux-next/architecture-layers.json, docs/cmux-next/native-ui-host.md.
  • cmux-ci status / cmux-ci log ec318721bca96a6782e73a9d (done, ok). cmux-ci log --full a836ea817d9250a196502b2b (red, release flags, line 3939). cmux-ci status 7441c6241e1956e7e3c69ef2 / f430149443470620d2a286e6 (both queued).
  • I did no local compile, as the repo rule requires.

@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp1kfpsnfm/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpd37jjc2k/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)/
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@cmux-bot cmux-bot Bot removed the stack-blocker label Nov 1, 2026
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 06:11 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 06:11 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 06:13 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 10:47 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 10:47 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 10:48 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 17:07 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 17:07 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 1, 2026 17:07 Inactive
@cmux-bot
cmux-bot Bot merged commit 9c2d696 into feat-cmux-next Nov 1, 2026
150 of 155 checks passed
@cmux-bot
cmux-bot Bot deleted the fix/base-red-uilayer-preview-release branch November 1, 2026 18:01

This branch was previously deployed

1 inactive deployment
ci-routing-agent — e5b605cb Deployed Nov 1, 2026 by cmux-bot[bot] via wait for same-key tree publisher #96960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant