Skip to content

fix: refresh app discovery in resident desktop services - #46

Merged
bigduu merged 1 commit into
masterfrom
nova/fix/44-live-app-discovery
Sep 5, 2026
Merged

bigduu merged 1 commit into
masterfrom
nova/fix/44-live-app-discovery

Conversation

@bigduu

@bigduu bigduu commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

A resident Nova.app cached its initial NSWorkspace.runningApplications inventory because the main thread was occupied by Tokio and never serviced AppKit notifications. Apps opened afterward returned no_match, including Electron apps with valid process-owned CDP endpoints.

Keep desktop bootstrap and permission diagnostics on the process main thread, then run only the long-lived desktop server future on Tokio while the main thread services CoreFoundation's default/common mode. Pure mcp, --connect and DevTools-launcher paths still return before desktop bootstrap. The public discovery contract and ownership/deadline checks are unchanged.

Closes #44. This is the bounded resident-inventory fix; menu/status UI, connector EOF #40, attachment #41 and packaging #45 remain separate.

Test Plan

  • New true-main-thread resident regression covers inventory seed, app launch/exit/relaunch with fresh process identity, no endpoint and a random-port protocol simulator; no TCC bootstrap. Also covers completion/error/panic and rejection of a non-main-thread caller. Disabling the loop in the test's negative control reproduces no_match.
  • Independent packaged-app acceptance uses real Electron 44.2.0 / Chromium 152. Baseline b79893b misses all four later launches; the new candidate finds all four and removes each on exit in one resident PID and one MCP connection. Both internally enabled random CDP endpoints pass metadata handshakes. The test copy allows a second instance solely to run beside the installed baseline; production multi-instance policy is unchanged.
  • Passed: 122 library tests, 3 CLI tests, 3 managed-MCP tests, 2 launcher tests and the new resident regression; strict macOS and Windows ARM all-target Clippy, formatting, locked full metadata and diff checks. Windows was compile-checked, not desktop-tested.
  • CI runs the remaining affected repository gates, including real CLI/app-service transport tests in its isolated environment. No system permission was granted or reset for local acceptance.

Screenshots

No UI change. Acceptance checks structured app/process/endpoint responses and resident process identity; screenshots do not demonstrate inventory freshness.

@bigduu bigduu added the review:needed Waiting for review label Sep 5, 2026
@bigduu

bigduu commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Independent agent review completed for head e6d09f0d00227b091d0e92fccfaf82efc8756341 (tree c5128f395f9c1ff338e9d7e353e93a5fe740f382). Reviewer: bodhi_nova_boundary, separate from the implementation agent.

The reviewer read all six changed files and traced startup, diagnostics/capture-daemon, pure connector, macOS event loop and non-macOS runtime paths. No blocking finding or scope expansion was identified. The review also checked the positive resident regression, the disabled-loop negative control and independent real Electron package evidence: one resident Nova PID and one MCP connection across two closed-CDP and two internally random-CDP launches/exits, with fresh process identities and a final ping from the same service. AX was not granted for discovery.

All six CI jobs passed for this exact head in run 33962041915; no unresolved review thread or requested change remains. Production multi-instance policy, permission checks, discovery ownership/bounds and public method shape are unchanged. Approval recommendation: merge the bounded #44 fix. This records an independent agent review rather than a GitHub human approval.

@bigduu bigduu added review:agent Agent review complete; human final review may proceed and removed review:needed Waiting for review labels Sep 5, 2026
@bigduu
bigduu merged commit 4aebba0 into master Sep 5, 2026
6 checks passed
@bigduu
bigduu deleted the nova/fix/44-live-app-discovery branch September 5, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:agent Agent review complete; human final review may proceed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[nova] fix: refresh app discovery while Nova.app remains running

1 participant