-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fail a unit shard that loses verdicts to a dead app host (rebase of #8833) #9574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
4d30b90
ci: fail a unit shard that loses verdicts to a dead app host
ejc3 1461ad0
ci: address review on the crash scan and the shard comment
ejc3 37c6fd8
ci: match a crash report on either name field, and fail a missing sna…
ejc3 5142c33
ci: give the self-test's CLI probe a path that is guaranteed absent
ejc3 ad93f9f
ci: record the runner-isolation assumption behind crash attribution
ejc3 ba02fe5
ci: restore dropped shard workflow safeguards
austinywang 91eba87
Merge remote-tracking branch 'origin/main' into fix/unit-shard-loses-…
austinywang 1018b61
ci: reject zero-test Swift Testing summaries
austinywang 793a3ac
ci: stream unit shard log diagnostics
austinywang 9bd3da9
ci: retain crash evidence after host death
austinywang a7fc3cc
Merge remote-tracking branch 'origin/main' into fix/unit-shard-loses-…
austinywang 29cff25
ci: centralize unit shard log analysis
austinywang 3ebd781
ci: fail when unit shard log capture fails
austinywang 95b1c4e
ci: stream crash report discovery
austinywang 7ddae60
Merge remote-tracking branch 'origin/main' into fix/unit-shard-loses-…
austinywang bf06f2f
TabManager: preserve focus-history clock sendability
austinywang f0cdcd0
TabManager: use a sendable focus-history clock default
austinywang f8f5f52
Merge remote-tracking branch 'origin/main' into fix/unit-shard-loses-…
austinywang be8295e
cmuxTests: keep fake Ghostty handle out of native APIs
austinywang cdf178f
cmuxTests: isolate close teardown coordinator
austinywang 45e1089
cmuxTests: scope teardown assertion to its surface
austinywang e4f306d
cmuxTests: bind teardown fixture to workspace layout
austinywang 003eefb
cmuxTests: suspend while teardown task is admitted
austinywang c8c3eec
cmuxTests: scope runtime free seam to the surface
austinywang 904547b
Merge remote-tracking branch 'origin/main' into fix/unit-shard-loses-…
austinywang 05210e9
cmuxTests: skip history for synthetic teardown token
austinywang b4de3cc
cmuxTests: isolate teardown worker fixture from Ghostty
austinywang 52eb6d0
cmuxTests: intercept absolute SSH in reconnect fixtures
austinywang 004f68d
cmuxTests: keep ordinary mirror close headless
austinywang bb2c318
cmuxTests: unmount mirror fixtures before teardown
austinywang f24c1f8
cmuxTests: model SSH control-path probes in reconnect fixtures
austinywang 5b5e8b7
cmuxTests: keep remote mirror routing fixtures headless
austinywang c3b5e59
cmuxTests: intercept headless windows in test target
austinywang 3fb0e2f
cmuxTests: keep socket worker actor-safe
austinywang 35dcb57
Merge remote-tracking branch 'origin/main' into fix/unit-shard-loses-…
austinywang ea3f09f
test: detect embedded unit app host
austinywang eaa8945
cmux: keep app-host unit tests headless
austinywang 448b7a5
test: stabilize post-exec telemetry fixture
austinywang 7c5ba39
ci: close unit shard review gaps
austinywang 6a73d7e
test: align isolated app-host fixtures
austinywang f8db112
ci: support crash timestamps on Python 3.9
austinywang 1231d3d
ci: make crash scanner fixtures timezone independent
austinywang e63036d
test: compare Pi session files by resolved URL
austinywang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import Foundation | ||
|
|
||
| /// Distinguishes product launches from the two XCTest process shapes. | ||
| /// | ||
| /// UI tests launch the production app target and need its normal window bootstrap. | ||
| /// App-host unit tests instead embed an `.xctest` plug-in in the app and need only | ||
| /// headless services until an individual test explicitly creates a window. | ||
| enum MacAppLaunchMode: Equatable, Sendable { | ||
| case normal | ||
| case uiTest | ||
| case unitTestHost | ||
|
|
||
| init( | ||
| environment: [String: String], | ||
| hasEmbeddedUnitTestBundle: Bool | ||
| ) { | ||
| // UI-test markers take precedence because those runs may also expose | ||
| // generic XCTest injection keys while still requiring a real app window. | ||
| if environment.keys.contains(where: { $0.hasPrefix("CMUX_UI_TEST_") }) { | ||
| self = .uiTest | ||
| } else if environment["CMUX_TEST_PROCESS"] == "1" | ||
| || hasEmbeddedUnitTestBundle { | ||
| self = .unitTestHost | ||
| } else { | ||
| self = .normal | ||
| } | ||
| } | ||
|
|
||
| static func current( | ||
| environment: [String: String] = ProcessInfo.processInfo.environment, | ||
| bundle: Bundle = .main, | ||
| fileManager: FileManager = .default | ||
| ) -> Self { | ||
| let hasEmbeddedUnitTestBundle = bundle.builtInPlugInsURL.map { plugInsURL in | ||
| fileManager.fileExists( | ||
| atPath: plugInsURL | ||
| .appendingPathComponent("cmuxTests.xctest", isDirectory: true) | ||
| .path | ||
| ) | ||
| } ?? false | ||
| return Self( | ||
| environment: environment, | ||
| hasEmbeddedUnitTestBundle: hasEmbeddedUnitTestBundle | ||
| ) | ||
| } | ||
|
|
||
| var shouldAutomaticallyCreateMainWindow: Bool { | ||
| switch self { | ||
| case .normal, .uiTest: | ||
| true | ||
| case .unitTestHost: | ||
| false | ||
| } | ||
| } | ||
|
|
||
| var isTestLaunch: Bool { | ||
| self != .normal | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.