diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a46595de0fb4..e0c82209b3eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -990,7 +990,7 @@ jobs: CMUX_APP_HOST_CLI_REGRESSION_SHARD: "4" CMUX_APP_HOST_FOCUSED_REGRESSION_B_SHARD: "5" CMUX_APP_HOST_FOCUSED_REGRESSION_SHARD: "6" - CMUX_APP_HOST_RESERVED_WALL_SECONDS: "1=474 4=235 5=245 6=284" + CMUX_APP_HOST_RESERVED_WALL_SECONDS: "1=474 4=235 5=199 6=284" # Four-way packing now exceeds the app-host's memory budget as the suite # grows: a shard can crash around 1,000 UI tests and poison the remaining # selectors. Six-way packing keeps each broad shard near 13 minutes of @@ -1575,72 +1575,6 @@ jobs: -only-testing:cmuxTests/BrowserSystemProxyMirrorTests \ test-without-building - - name: Run Cloud notification dismiss parity regression - if: ${{ matrix.shard == fromJSON(env.CMUX_APP_HOST_FOCUSED_REGRESSION_B_SHARD) }} - run: | - # Focused gate for https://github.com/manaflow-ai/cmux/issues/13000. - # The tolerant full-suite step accepts ordinary Swift Testing - # failures, so keep the one-read-state contract between the local - # store, the left sidebar, and the Cloud tree on a non-tolerant - # only-testing invocation. - set -euo pipefail - scripts/ci/run-in-console-session.sh \ - scripts/ci/run-app-host-xcodebuild.sh \ - -xctestrun "$CMUX_APP_HOST_XCTESTRUN" \ - -destination "platform=macOS" \ - CMUX_SKIP_ZIG_BUILD=1 \ - -only-testing:cmuxTests/CloudNotificationDismissParityTests \ - test-without-building - - - name: Run agent restore admission regression - if: ${{ matrix.shard == fromJSON(env.CMUX_APP_HOST_FOCUSED_REGRESSION_B_SHARD) }} - run: | - # Focused gate for https://github.com/manaflow-ai/cmux/issues/12158. - # The tolerant full-suite step accepts ordinary Swift Testing - # failures, so keep restore admission under hook-store churn, the - # per-kind store completeness rule, and the surviving-owner notice - # on a non-tolerant only-testing invocation. - set -euo pipefail - scripts/ci/run-in-console-session.sh \ - scripts/ci/run-app-host-xcodebuild.sh \ - -xctestrun "$CMUX_APP_HOST_XCTESTRUN" \ - -destination "platform=macOS" \ - CMUX_SKIP_ZIG_BUILD=1 \ - -only-testing:cmuxTests/AgentRestoreLiveOwnerAdmissionTests \ - test-without-building - - - name: Run Option/Alt sided-modifier regression - if: ${{ matrix.shard == fromJSON(env.CMUX_APP_HOST_FOCUSED_REGRESSION_B_SHARD) }} - run: | - set -euo pipefail - scripts/ci/run-in-console-session.sh \ - scripts/ci/run-app-host-xcodebuild.sh \ - -xctestrun "$CMUX_APP_HOST_XCTESTRUN" \ - -destination "platform=macOS" \ - CMUX_SKIP_ZIG_BUILD=1 \ - -only-testing:cmuxTests/GhosttyOptionAsAltModsTests \ - test-without-building - - - name: Run ssh-session-attach anchor regression - if: ${{ matrix.shard == fromJSON(env.CMUX_APP_HOST_FOCUSED_REGRESSION_B_SHARD) }} - run: | - # Focused gate for https://github.com/manaflow-ai/cmux/issues/7367. - # The full "Run unit tests" step tolerates any xcodebuild failure - # whose last test summary reports "(0 unexpected)", and test - # assertion failures never increment the unexpected count on these - # runners — so a failing regression assertion in the sharded run - # cannot turn the shard red. Keep this targeted only-testing - # invocation as a non-tolerant guard for the ssh-session-attach - # split-anchor regression. - set -euo pipefail - scripts/ci/run-in-console-session.sh \ - scripts/ci/run-app-host-xcodebuild.sh \ - -xctestrun "$CMUX_APP_HOST_XCTESTRUN" \ - -destination "platform=macOS" \ - CMUX_SKIP_ZIG_BUILD=1 \ - -only-testing:cmuxTests/CLISSHSessionAttachAnchorTests \ - test-without-building - - name: Run focused browser regressions if: ${{ matrix.shard == fromJSON(env.CMUX_APP_HOST_FOCUSED_REGRESSION_B_SHARD) }} run: | diff --git a/scripts/ci/cmux_unit_test_shard.py b/scripts/ci/cmux_unit_test_shard.py index 3503245e781d..4bf8305e9bc4 100755 --- a/scripts/ci/cmux_unit_test_shard.py +++ b/scripts/ci/cmux_unit_test_shard.py @@ -42,13 +42,11 @@ "cmuxTests/AgentChatSessionRegistryLifecycleReviewRegressionTests", "cmuxTests/AgentJournalLifecycleCenterTests", "cmuxTests/AgentNotificationRegressionTests", - "cmuxTests/AgentRestoreLiveOwnerAdmissionTests", "cmuxTests/BackgroundPrimeStartableSurfaceTests", "cmuxTests/BrowserOmnibarSuggestionClickRoutingTests", "cmuxTests/BrowserPanelViewIdentityTests", "cmuxTests/BrowserSystemProxyMirrorTests", "cmuxTests/BrowserViewportRuntimeTests", - "cmuxTests/CLISSHSessionAttachAnchorTests", "cmuxTests/CLISendQueuedOutputTests", "cmuxTests/ClaudeBackgroundWorkNotifyTests", "cmuxTests/ClaudeHookLifecycleCleanupTests", @@ -56,7 +54,6 @@ "cmuxTests/ClaudeHookPIDAuthenticationTests", "cmuxTests/CloudMachineDragSourceTests", "cmuxTests/CloudMachineOrderingTests", - "cmuxTests/CloudNotificationDismissParityTests", "cmuxTests/CloudWorkspaceRenameSurfaceParityTests", "cmuxTests/CmuxBundledBinPathIntegrationTests", "cmuxTests/DeviceDirectoryLifecycleTests", @@ -73,7 +70,6 @@ "cmuxTests/FeedCoordinatorTests", "cmuxTests/FeedWaiterRegistryTests", "cmuxTests/GhosttyNumericLocaleTests", - "cmuxTests/GhosttyOptionAsAltModsTests", "cmuxTests/GhosttyTerminalViewVisibilityPolicyTests", "cmuxTests/GlobalSearchShortcutBehaviorTests", "cmuxTests/HostSettingsShortcutNotificationTests", diff --git a/tests/test_ci_cmux_unit_test_shard.py b/tests/test_ci_cmux_unit_test_shard.py index 26e1e2d0ef8d..74cb362bfa3a 100644 --- a/tests/test_ci_cmux_unit_test_shard.py +++ b/tests/test_ci_cmux_unit_test_shard.py @@ -391,6 +391,46 @@ def focused_steps_in_ci_workflow() -> tuple[set[str], set[str], dict[str, str]]: return whole, partial, env +def check_truthful_broad_suites_leave_focused_gates() -> int: + """Suites protected by strict broad accounting should run in the timed batch.""" + import importlib.util + + folded = { + "CloudNotificationDismissParityTests", + "AgentRestoreLiveOwnerAdmissionTests", + "GhosttyOptionAsAltModsTests", + "CLISSHSessionAttachAnchorTests", + } + spec = importlib.util.spec_from_file_location("cmux_unit_test_shard_folded", HELPER) + assert spec is not None and spec.loader is not None + helper = importlib.util.module_from_spec(spec) + sys.modules[spec.name] = helper + spec.loader.exec_module(helper) + + focused = {selector.split("/", 1)[1] for selector in helper.FOCUSED_GATE_SELECTORS} + whole, _, _ = focused_steps_in_ci_workflow() + stale = sorted(folded & (focused | whole)) + if stale: + print(f"FAIL: truthful broad suites still have dedicated focused ownership: {stale}") + return 1 + + discovered = { + selector.identifier.split("/", 2)[1] + for selector in helper.discover_selectors(ROOT) + if selector.identifier.startswith("cmuxTests/") + } + missing = sorted(folded - discovered) + if missing: + print( + "FAIL: folded suites are absent from broad shard discovery: " + f"{missing}" + ) + return 1 + + print("PASS: truthful broad suites are discovered and owned by the measured shard batch") + return 0 + + def check_focused_gates_run_once() -> int: import importlib.util import re @@ -518,12 +558,8 @@ def main() -> int: shard_selectors = output.read_text(encoding="utf-8").splitlines() repo_assigned_selectors.extend(shard_selectors) for focused_selector in ( - "-only-testing:cmuxTests/AgentRestoreLiveOwnerAdmissionTests", "-only-testing:cmuxTests/BrowserSystemProxyMirrorTests", - "-only-testing:cmuxTests/CLISSHSessionAttachAnchorTests", - "-only-testing:cmuxTests/CloudNotificationDismissParityTests", "-only-testing:cmuxTests/GhosttyTerminalViewVisibilityPolicyTests", - "-only-testing:cmuxTests/GhosttyOptionAsAltModsTests", "-only-testing:cmuxTests/GlobalSearchShortcutBehaviorTests", "-only-testing:cmuxTests/KeyboardShortcutSettingsFileStoreNoOpPersistenceTests", "-only-testing:cmuxTests/RemoteTmuxMirrorLayoutIdentityTests", @@ -585,6 +621,9 @@ def main() -> int: if (rc := check_reserved_workers_get_less_of_the_batch()) != 0: return rc + if (rc := check_truthful_broad_suites_leave_focused_gates()) != 0: + return rc + if (rc := check_focused_gates_run_once()) != 0: return rc