Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 1 addition & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 0 additions & 4 deletions scripts/ci/cmux_unit_test_shard.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,18 @@
"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",
"cmuxTests/ClaudeHookLiveDeliveryTargetTests",
"cmuxTests/ClaudeHookPIDAuthenticationTests",
"cmuxTests/CloudMachineDragSourceTests",
"cmuxTests/CloudMachineOrderingTests",
"cmuxTests/CloudNotificationDismissParityTests",
"cmuxTests/CloudWorkspaceRenameSurfaceParityTests",
"cmuxTests/CmuxBundledBinPathIntegrationTests",
"cmuxTests/DeviceDirectoryLifecycleTests",
Expand All @@ -73,7 +70,6 @@
"cmuxTests/FeedCoordinatorTests",
"cmuxTests/FeedWaiterRegistryTests",
"cmuxTests/GhosttyNumericLocaleTests",
"cmuxTests/GhosttyOptionAsAltModsTests",
"cmuxTests/GhosttyTerminalViewVisibilityPolicyTests",
"cmuxTests/GlobalSearchShortcutBehaviorTests",
"cmuxTests/HostSettingsShortcutNotificationTests",
Expand Down
47 changes: 43 additions & 4 deletions tests/test_ci_cmux_unit_test_shard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 / "cmuxTests")
Comment thread
teamleaderleo marked this conversation as resolved.
Resolved
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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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

Expand Down
Loading