Repository navigation
Conversation
`Desktop Swift Static & Test Contracts` has been red on every desktop PR since 15a51fb — 77 assertion failures — so no desktop change could reach main. main reads green only because the lane is path-filtered: it skips the test job on every commit that does not touch desktop/macos/**. 75 of the 77 are one cause. `InkGlassHitRegionReporter` mounts a zero-drawing AppKit marker so a transparent window can tell visible content from air. `ImageRenderer` cannot rasterise an `NSViewRepresentable` and substitutes an opaque placeholder for it, so every pixel-truth test of a surface that mounts one measured the placeholder covering the marker's whole host: the modal dim read as painting to the window's edge — which on this window is the user's wallpaper — and the glass panel's rounded corner read as filled. Mount the marker at zero opacity. The placeholder then contributes no pixels, while the AppKit view stays mounted, unhidden and registered: SwiftUI applies opacity to the host layer, not to the view's own `alphaValue`, which is what `InkGlassHitRegions.containsPoint` reads. Both halves are pinned by `InkGlassHitRegionReporterTests`, because dropping the reporter would satisfy the paint half and silently return the shell to passing clicks through its own modals. The remaining 2, in `testLaterShorterRetryWindowDoesNotShortenActiveCooldown` (ff97490), were never reachable: the test issued its two 429s sequentially, but an armed cooldown short-circuits the network before the second request is built, so the shorter `Retry-After` was never parsed and the request count could not reach the 2 it asserted. The two attempts now overlap on a rendezvous — the only way a second window is ever observed — so the max-deadline preservation it is named for is actually exercised. Verification: `swift test` — the 5 affected suites go 77 failures -> 26/26 passing, and `ShellClickThroughPolicyTests` plus the new registration test confirm a surface mounting the marker still owns the pointer. Failure-Class: none
…ture fence `ChatCitationTests.testRewindCitationFocusIsOneShotAndPreservesExactScreenshotID` has failed on every CI run of the desktop lane since it landed in #11519, while passing locally — the fourth failure keeping the lane red, and not one of the three #11563 reproduced. `RewindCitationFocusState.request` refuses an id when `RewindCaptureOwnerSnapshot.capture()` is nil, and the only thing that makes it nil is `RewindCaptureOwnerGeneration`'s suspended flag. That flag is process-global and outlives whichever suite suspended it, so the id never landed and the failure was reported against the citation contract rather than against the leak. Class execution order is not stable across machines, which is the whole of the local/CI divergence. Start the test from a clean fence and assert an owner exists, so it fails on the handoff it is named for or not at all. Verification: reproduced CI's precondition locally with a suite that leaks the fence ahead of it — the test fails exactly as CI reports (consume() -> nil) without this change and passes with it. All six affected suites: 44/44 pass. Failure-Class: none
There was a problem hiding this comment.
2 issues found across 4 files
Confidence score: 4/5
- In
desktop/macos/Desktop/Tests/InkGlassHitRegionReporterTests.swift, theguardonrenderer.cgImagecan exit before any assertion runs, so the test can pass without actually validating the zero-opacity contract; this weakens regression protection for rendering behavior — force a test failure on the nil path (or construct deterministic image input) so the assertion is always exercised. - In
desktop/macos/Desktop/Tests/ProactiveLaneClientTests.swift,RequestRendezvousonly supports the configured arrival count and extraarrive()calls block indefinitely, so the guarded bug path causes a hang instead of a clear failure; this risks stuck CI and obscures root cause — add an explicit timeout/failure path or make rendezvous over-arrival fail fast.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="desktop/macos/Desktop/Tests/InkGlassHitRegionReporterTests.swift">
<violation number="1" location="desktop/macos/Desktop/Tests/InkGlassHitRegionReporterTests.swift:30">
P2: When `renderer.cgImage` returns nil, this `guard` returns without running the assertion, so the test passes even though the zero-opacity behavior it is meant to lock in was never verified. That failure path is realistic here — the PR itself is predicated on `ImageRenderer` failing to rasterize `NSViewRepresentable` content — so in heads/CI environments where the render yields no image, this regression guard silently stops being enforced while still reporting green. Fail loudly instead of silently returning.</violation>
</file>
<file name="desktop/macos/Desktop/Tests/ProactiveLaneClientTests.swift">
<violation number="1" location="desktop/macos/Desktop/Tests/ProactiveLaneClientTests.swift:296">
P2: When the bug this test guards is present, the test hangs forever instead of failing cleanly. `RequestRendezvous` is valid for exactly `count` (2) arrivals; any subsequent `arrive()` blocks on `withCheckedContinuation` and is never resumed. The shared `authorization` closure is reused by the final `completeExtraction` after `clock.advance(by: 70)`. That call only avoids a third `arrive()` because `checkQuotaCooldown` throws first when the longer 300s deadline is preserved. If the shorter 60s deadline wrongly wins (the regression under test), the cooldown expires at T+60, the gate lets the call through, `authorization()` calls `arrive()` as a third arrival, and the test hangs until CI timeouts instead of reaching `XCTFail("expected quota cooldown — longer deadline must be preserved")`. Make the rendezvous single-shot/consumable so the exact failure this test targets reports a normal assertion failure rather than an indefinite hang.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| .frame(width: size.width, height: size.height)) | ||
| renderer.scale = 1 | ||
|
|
||
| guard let image = renderer.cgImage else { return } |
There was a problem hiding this comment.
P2: When renderer.cgImage returns nil, this guard returns without running the assertion, so the test passes even though the zero-opacity behavior it is meant to lock in was never verified. That failure path is realistic here — the PR itself is predicated on ImageRenderer failing to rasterize NSViewRepresentable content — so in heads/CI environments where the render yields no image, this regression guard silently stops being enforced while still reporting green. Fail loudly instead of silently returning.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Tests/InkGlassHitRegionReporterTests.swift, line 30:
<comment>When `renderer.cgImage` returns nil, this `guard` returns without running the assertion, so the test passes even though the zero-opacity behavior it is meant to lock in was never verified. That failure path is realistic here — the PR itself is predicated on `ImageRenderer` failing to rasterize `NSViewRepresentable` content — so in heads/CI environments where the render yields no image, this regression guard silently stops being enforced while still reporting green. Fail loudly instead of silently returning.</comment>
<file context>
@@ -0,0 +1,73 @@
+ .frame(width: size.width, height: size.height))
+ renderer.scale = 1
+
+ guard let image = renderer.cgImage else { return }
+ let width = image.width
+ let height = image.height
</file context>
| guard let image = renderer.cgImage else { return } | |
| guard let image = renderer.cgImage else { | |
| return XCTFail("ImageRenderer produced no image; the paint assertion was never exercised") | |
| } |
| baseURL: { "https://proactive.test" }, | ||
| authorization: { "Bearer test" }, | ||
| authorization: { | ||
| await bothPastTheGate.arrive() |
There was a problem hiding this comment.
P2: When the bug this test guards is present, the test hangs forever instead of failing cleanly. RequestRendezvous is valid for exactly count (2) arrivals; any subsequent arrive() blocks on withCheckedContinuation and is never resumed. The shared authorization closure is reused by the final completeExtraction after clock.advance(by: 70). That call only avoids a third arrive() because checkQuotaCooldown throws first when the longer 300s deadline is preserved. If the shorter 60s deadline wrongly wins (the regression under test), the cooldown expires at T+60, the gate lets the call through, authorization() calls arrive() as a third arrival, and the test hangs until CI timeouts instead of reaching XCTFail("expected quota cooldown — longer deadline must be preserved"). Make the rendezvous single-shot/consumable so the exact failure this test targets reports a normal assertion failure rather than an indefinite hang.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Tests/ProactiveLaneClientTests.swift, line 296:
<comment>When the bug this test guards is present, the test hangs forever instead of failing cleanly. `RequestRendezvous` is valid for exactly `count` (2) arrivals; any subsequent `arrive()` blocks on `withCheckedContinuation` and is never resumed. The shared `authorization` closure is reused by the final `completeExtraction` after `clock.advance(by: 70)`. That call only avoids a third `arrive()` because `checkQuotaCooldown` throws first when the longer 300s deadline is preserved. If the shorter 60s deadline wrongly wins (the regression under test), the cooldown expires at T+60, the gate lets the call through, `authorization()` calls `arrive()` as a third arrival, and the test hangs until CI timeouts instead of reaching `XCTFail("expected quota cooldown — longer deadline must be preserved")`. Make the rendezvous single-shot/consumable so the exact failure this test targets reports a normal assertion failure rather than an indefinite hang.</comment>
<file context>
@@ -275,32 +275,48 @@ final class ProactiveLaneClientTests: XCTestCase {
baseURL: { "https://proactive.test" },
- authorization: { "Bearer test" },
+ authorization: {
+ await bothPastTheGate.arrive()
+ return "Bearer test"
+ },
</file context>
…aked capture fence" This reverts commit a259413.
|
Closing this rather than leaving it open: it is verified but not mergeable, and the branch What CI proved. Run 31792619068 on this branch took Why it cannot merge. I tried one fix for it and CI disproved the hypothesis, so I reverted it (8e73f6a) rather than leave a wrong explanation in the tree. What is now known:
Its owner should either make it establish the owner identity it needs or delete it — a test that has never passed in CI is not guarding anything. 🤖 hourly desktop watchdog |
|
Hey @kodjima33 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Bug
Desktop Swift Static & Test Contractshas been red on every desktop PR since15a51fb985(2026-08-14 02:10 EDT), so no desktop change could reachmainand the release train had no qualification signal.mainreads green only because the lane is path-filtered:Detect Desktop Swift Changesskips the test job on every commit that does not touchdesktop/macos/**, so the red only appears on desktop PRs. Filed as #11563.The failing set, identical across CI runs 31778872737 and 31779149249:
ShellModalScrimTestsGlassSurfaceReviewRegressionTestsProactiveLaneClientTestsChatCitationTestsRoot causes
1. 75 of the 77 — the hit-region marker paints.
InkGlassHitRegionReportermounts a zero-drawing AppKit marker so a transparent window can tell visible content from air.ImageRenderercannot rasterise anNSViewRepresentableand substitutes an opaque placeholder for it, so every pixel-truth test of a surface that mounts one measured the placeholder covering the marker's whole host: the modal dim read as painting to the window's edge — which on this window is the user's wallpaper — and the glass panel's rounded corner read as filled. Measured directly:Color.clear.background(InkGlassHitRegionReporter())rendered at 40×40 came back fully opaque (centre RGBA255,56,60,255), whereColor.clearalone is0,0,0,0.2.
testLaterShorterRetryWindowDoesNotShortenActiveCooldown(ff974901b6) was never reachable. It issued its two 429s sequentially, but an armed cooldown short-circuits the network before the second request is built (astestExtractionSkipsNetworkDuringQuotaCooldownThenResumesAfterDeadlineasserts), so the shorterRetry-Afterwas never parsed andrequestCountcould not reach the 2 it asserted.3.
testRewindCitationFocusIsOneShotAndPreservesExactScreenshotIDdepended on a leaked global.RewindCitationFocusState.requestrefuses an id whenRewindCaptureOwnerSnapshot.capture()is nil, and the only thing that makes it nil isRewindCaptureOwnerGeneration's suspended flag — which is process-global and outlives whichever suite suspended it. Class execution order is not stable across machines, which is the whole of the local/CI divergence: this one passes locally and has failed on CI since #11519.Fix
alphaValue, which is whatInkGlassHitRegions.containsPointreads. NewInkGlassHitRegionReporterTestspins both halves — dropping the reporter would satisfy the paint half and silently return the shell to passing clicks through its own modals.Retry-Afterfor one operation is ever observed, so the max-deadline preservation the test is named for is actually exercised.No production behaviour changes: the only non-test edit is where the marker's opacity is applied.
What I tested
ShellModalScrimTests,GlassSurfaceReviewRegressionTests,ProactiveLaneClientTests,ChatCitationTests,InkGlassHitRegionReporterTests,ShellClickThroughPolicyTests) — was 77 failures.mainsources (KnowledgeGraphPaginationTests.testCatalogOnlyCanonicalAtlasIsRenderableAndActivationCached, verified by reverting only this diff, and aMemoryDetailPanelTestsSQLite disk-I/O flake that passes in isolation). Neither fails on CI.consume()returns nil exactly as CI reports without this change, and 42 with it.ShellClickThroughPolicyTestsplus the new registration test confirm a surface mounting the marker still owns the pointer.make preflightand the macOS-scoped manifest checks (swift-format lint, SwiftLint 1258 files / 0 violations) pass.Labelled
no-changelog-needed: nothing here changes what a user sees.Fixes #11563.
Failure-Class: none
🤖 automated by hourly watchdog — tested and merged