Skip to content

chore: prepare Defi 0.4.0 release - #122

Merged
qeude merged 2 commits into
mainfrom
release/0.4.0
Oct 7, 2026
Merged

qeude merged 2 commits into
mainfrom
release/0.4.0

Conversation

@qeude

@qeude qeude commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prepare Defi 0.4.0 (build 8) and make four native focus tests independent of whichever user applications happen to be open.

- arbitrary desktop windows
+ two owned native applications with explicit initial focus
+ normal-level AXRaise contract fixture and native keyboard assertions

Compile the fixture before reserving the desktop. Keep bounded cleanup and native focus, suppression, event, stacking, and keyboard assertions. Production focus code is unchanged.

Evidence

  • Before: Full desktop run: four failed tests. Direct AXRaise returned success without changing third-party native ordering.
  • After: Local build, non-desktop Swift tests, workflow tests, and signed staging pass. Final desktop run: Executed 50 tests, with 5 tests skipped and 0 failures. Accessibility available; session restoration passed; one daemon remained and no fixture children survived.
  • Removing foreground raise requests in a temporary mutation failed the native stacking assertion; restoring them passed.
  • Five multi-monitor tests remain unexecuted because only one display is connected. The verifier correctly reports incomplete coverage. The explicit AXRaise fixture does not prove inactive ordering for third-party/default AppKit windows. Earlier Computer Use verified Settings version/search; navigation validation was inconclusive.

Merge Danger

Door: Two-way for test infrastructure and version metadata; publication is a separate action.

Blast Radius: Verification. Desktop fixture build and lifecycle affect native test execution; production focus behavior is unchanged.

View guided diff Turn on auto-fix

Note

Prepare Defi 0.4.0 release with deterministic desktop focus test fixtures

  • Bumps the bundle short version from 0.3.0 to 0.4.0 and the build number from 7 to 8 in Defi-Info.plist
  • Adds a desktop focus fixture executable in DesktopFocusFixture.swift that runs as a regular AppKit app with an editable focused field and a synchronous ExplicitAXRaiseWindow.accessibilityPerformRaise override
  • Adds DesktopFocusFixturePair.swift to launch, validate, and tear down two fixture apps, with bounded child-process cleanup escalating to SIGKILL
  • Rewrites the four desktop end-to-end tests in DesktopE2ETests.swift to use the fixture pair instead of arbitrary discovered desktop windows
  • Updates verify.py to prepare desktop tests via test_desktop.sh, which compiles the fixture and now has a build-only mode that skips the desktop lock
  • Risk: Behavioral Change: desktop test preparation in verify.py now goes through script/test_desktop.sh, and run-built-tests fails if the fixture binary is missing; see test_workflow.py for the updated expectations

Macroscope summarized 90d09d3.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread Tests/DefiMacOSTests/DesktopE2ETests.swift
@qeude

qeude commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

PASS+NOTES. Independent review found no actionable defect in the base-to-head diff.

  • Base 74adc43c2bc39047abd9a29dfcb92615faf0d65e.
  • Head 90d09d3f9664ea04ebf5bb64ae182a9effde90ce.
  • Stable git patch-id ec977ad68436120e75dd72ae155ee85973ea4d3c.

Independently ran the four focused native tests via script/test_desktop.sh. All four passed, with zero failures and zero skips. Accessibility was available. The tests cover keyboard activation after completed focus, native focus events, rapid latest-wins focus, and floating-over-tiled order with global keyboard delivery. The rapid test explicitly establishes tiled native focus and the frontmost PID before the burst ends at floating, resolving the prior false-positive concern. The 18 verification workflow tests also passed.

Compared the parent target-selection code with the recorded failure logs. Those tests selected arbitrary user windows. The replacement fixtures are separate regular native applications with distinct bundle IDs and PIDs, normal-level windows, and bounded teardown. No production focus source changed. The documented explicit public AXRaise implementation proves Defi's raise-request integration. Third-party and default AppKit inactive ordering remain outside this evidence.

The current source-content digest matches the recorded local staging and full desktop runs. The full desktop record has 45 passes, zero failures, and five multi-monitor skips, with Accessibility available and session restoration passed. Multi-monitor qualification remains incomplete.

After my focused run, exactly one installed defi-daemon remained and no fixture children remained. Both commands exited successfully. Logs are dist/release-0.4.0/pr122-independent-native.log and dist/release-0.4.0/pr122-independent-workflow.log.

Independent review agent; same model family under the personal profile. CI watching and landing remain with the root agent.

@qeude
qeude merged commit 6309943 into main Oct 7, 2026
7 of 8 checks passed
@qeude
qeude deleted the release/0.4.0 branch October 7, 2026 21:40
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Updates test fixtures and build scripts for a release.

The PR appears safe to merge, with a non-blocking improvement to stop keyboard injection when the final focus checks fail.

Findings

  1. P2 Test types despite lost focus ▶
Summary

Prepares Defi 0.4.0, build 8. Four native focus tests now use two owned applications instead of whichever applications are open.

  • Builds the fixture before reserving the desktop.
  • Adds explicit starting focus, stacking checks, and keyboard delivery checks.
  • Non-blocking feedback: stop before keyboard injection when the final focus checks fail.

Acknowledged scope limits: qeude states that the explicit fixture does not prove inactive ordering for third-party/default AppKit windows, and five multi-monitor tests remain unexecuted because only one display is connected.

Reviews (1) · Last reviewed commit: "chore: prepare Defi 0.4.0 release" · Reviewed by Greptile

Comment on lines 1053 to +1055
XCTAssertTrue(focusedWindow.map { CFEqual($0, tiledElement) } == true)
XCTAssertEqual(NSWorkspace.shared.frontmostApplication?.processIdentifier, processID,
"The tiled fixture must retain real keyboard focus")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Test types despite lost focus

In testTiledFocusKeepsFloatingWindowAboveIt, the final focus assertions record failures but do not stop the test. If the user switches applications after the earlier guarded check, the test still posts a global a key into their application. Make these final checks throw or return before posting the key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant