fix(ci): end the compile stall, the package test deadlock and the unreachable cell viewer that keep main red - #3126
Merged
Merged
Conversation
# Conflicts: # Packages/TableProCore/Tests/TableProMSSQLCoreTests/MSSQLFreeTDSConfigFileTests.swift
…scroll view so accessibility can reach them
… open and mount overlays only in a scroll view
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
macOS Tests has been red on main since 2026-09-23. Several separate defects, each hiding the next. This PR fixes them and nothing else, so main can go green before the gate is made required.
1. Build for testing stalls until the 60-minute job timeout
Every main run since 9fc22b3 was killed at 60 minutes with no output for the last 40 or more.
LinkedFileVersionHistoryProvider.prepareDiscarduseddirectoryandindexPathin a closure, then declared locals with the same names on the next lines. Xcode 27 resolves the closure's names to the properties. Swift 6.3 (Xcode 26.4.1, which CI pins, and 26.6) never finishes the SIL mandatory diagnostic passes on this function (DeadEndBlocksAnalysis,computeDominatedBoundaryBlocksin a sample of the stuckswift-frontend).fatalError()in turn. Only stubbingprepareDiscardcompiled (13 s); every other variant timed out at 240 s (run 36038027990).2. Package Tests hangs until the 20-minute job timeout
MSSQLFreeTDSConfigFileTestsblocked Swift Testing's cooperative threads with untimedDispatchSemaphore.wait()while the work it waited for ran onDispatchQueue.global(). A blocked cooperative thread still counts against the global queue's per-CPU width. On a 3-vCPU runner, three such tests left the global queue no thread, and the whole run deadlocked.semaphore_wait_trapat the three waits.async. The holder and waiter run on their ownThreads, as the driver runs them on its own serial queue, and the test body awaits a latch instead of blocking.3. Unit tests failing on main
DataFileFindBar's options menu named itself with.accessibilityLabel, which leaves a SwiftUIMenunameless (MenuDisclosureIndicatorTests). It now carries the name in itsLabel, like the other icon-only menus.PreferenceKeysGuardTestsreadDynamoDBRequestJSON.values(forKey:)as UserDefaults keys.valuesjoins the calls the scan already knows are not preferences.AccessibleControlNameTestsrequired.accessibilityLabelin the same file, which contradicted the menu guard. It now counts aLabel { Text(...) }as the name, the form the menu guard requires.4. UI shard 1 failing on every run
RecentTabSwitchingUITestsheld Control withXCUIElement.perform(withKeyModifiers:), but the Tab inside reached the app without the modifier, so the held half failed in both attempts on 11 consecutive runs. The two taps stay, and they cover the menu key equivalent and the recency order end to end. The held gesture, the list and Escape are covered by 13 cases inRecentTabSwitcherControllerTests.5. Package tests that measured time instead of cause
With the deadlock gone, this PR's first run reached
ConnectionManagerTests:524and failed it on a loaded runner: a cancelled connect gave up in 1.41 s against anelapsed < 1sbound. Every Package Tests failure in the last week was an assertion of this kind.ConnectionManagerTests:524: the teardown stays blocked for its whole 30 s limit, so settling withCancellationErrorinside the wait already proves the connect gave up. The elapsed bound goes and the wait is 10 s.ConnectionManagerTests:412: the timer that unblocks a broken teardown now records that it fired, and the test asserts it did not, instead of timing the disconnect.SourceEditorBindingSyncTests: awaits the debounced writeback task (writebackTaskis readable from tests now) instead of sleeping 300 ms.SSHChannelRelayTests.drainsInOnePollRound: the read count already proves one poll round; the elapsed check is dropped.6. UI shard 2: the inline cell viewer could not be found
QueryErrorBannerUITests.testAFailedRunAllFromAnOpenCellViewerKeepsNoHeadingFromThePreviousRun(added in #3121) failed on the first run and the retry, at "Return on the read-only cell must open its viewer". The CI screen recording shows the viewer open over the cell with3in it, so the app opened it andwindow.textViewscould not reach it.NSTableView. A table publishes only its rows, columns and header to accessibility, never an arbitrary subview, so the open overlay had a parent but no path down to it from the window. XCUITest walks that path, and so does VoiceOver, so both missed the editor and the viewer. Measured in-process with the real AX API: the grid'sAXTablehad 4 children and noAXTextAreaanywhere in the window. Appending the overlay to the table'saccessibilityChildren()does not work: AppKit then fails the table's wholeAXChildrenwithkAXErrorFailure, and the grid disappears from the tree.NSScrollView, directly above the clip view. That keeps it above every row and below the header, the scrollers and the pinned row gutter, and the scroll area now publishes it asAXScrollArea > AXTextArea. The raise-to-front code for the old placement is gone. A table outside a scroll view opens no overlay.CellOverlayAccessibilityTests(8 cases) covers both overlays: reachable from the window, mounted outside the table, stacked above the rows, over its cell, clipped by the grid, gone after dismiss, and the hit-test result published. With the overlay mounted back in the table, 7 of them fail.Verification
swift test --build-system native --package-path Packages/TableProCore: 1,114 Swift Testing cases passed; the MSSQL suite took 0.36 s.swift test --build-system native --package-path Packages/TableProEditor: 171 XCTest cases passed. One Swift Testing case,GutterNumberOffsetTests.windowGutterKeepsItsMargin, fails on a dark-mode Mac and passes on CI; it reads pixel brightness and is not touched here.TableProTestsrun on this branch: 23,529 cases, 1 failure,WorkspaceRailCellRenderingTests, which also depends on the Mac's appearance and passes on CI.verify.sh test AccessibleControlNameTests MenuDisclosureIndicatorTests PreferenceKeysGuardTests GitIntegrationTests: 21 of 21 passed.swiftlint lint --stricton every changed file: 0 violations.Sections 1 to 5 change nothing a user sees, so the only CHANGELOG entry is the accessibility fix in section 6.
Update for 0999140: run 36097535460 passed every job,
macOS Tests Gateincluded.UI tests 2/3ran the viewer case above (15 s) and 79 cases with 0 failures. Locally, 116 grid and overlay cases passed and SwiftLint--strictreported 0 violations on the changed files.