Skip to content

Desktop harness: homeMode snapshot, fault suite, Sentry breadcrumb heartbeat - #9217

Merged
Git-on-my-level merged 4 commits into
mainfrom
test/desktop-harness-and-telemetry
Jul 7, 2026
Merged

Git-on-my-level merged 4 commits into
mainfrom
test/desktop-harness-and-telemetry

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Expose redesigned Home homeMode (hub/chat/connect) in the automation bridge snapshot and add tier-2 home-stage.yaml flow with stage transition assertions.
  • Add --fault-suite to desktop-core-harness.sh (starts omi-fault-inject + omi-fault bundle) and chat-fault-5xx.yaml to verify chat surfaces an error on backend HTTP 5xx.
  • Fix Move Desktop Session Heartbeat out of unresolved Sentry issues #9191 by replacing SentrySDK.capture(message: "Session Heartbeat") with breadcrumb telemetry plus a Swift regression guard.

Closes #9191
Closes #9216

Test plan

  • xcrun swift build -c debug --package-path desktop/macos/Desktop
  • xcrun swift test --package-path desktop/macos/Desktop --filter SentryHeartbeatTelemetryTests
  • python3 desktop/macos/scripts/desktop-flow-lint.py
  • ./desktop/macos/scripts/desktop-core-harness.sh --tier 2 --bundle omi-core-e2e --port <PORT> (includes home-stage.yaml)
  • ./desktop/macos/scripts/desktop-core-harness.sh --fault-suite --port <PORT> (macOS; launches omi-fault bundle)

Made with Cursor

Review in cubic

…artbeat.

Expose redesigned Home stage mode in the automation bridge, add tier-2 home-stage and fault-suite chat-5xx flows, and replace Session Heartbeat Sentry issues with breadcrumbs (#9191, #9216).

Verification: xcrun swift build -c debug --package-path desktop/macos; xcrun swift test --filter SentryHeartbeatTelemetryTests; python3 desktop/macos/scripts/desktop-flow-lint.py
Co-authored-by: Cursor <[email protected]>

@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.

5 issues found across 13 files

Confidence score: 2/5

  • In desktop/macos/scripts/desktop-core-harness.sh, the --fault-suite readiness check can attach to any bridge returning /health { ok: true }, so fault scenarios may run against the wrong app and produce misleading pass/fail results—tighten the probe to verify it connected to the intended desktop instance before merging.
  • In desktop/macos/scripts/desktop-core-harness.sh, stop_fault_stack tears down the app bundle but can leave the background ./run.sh wrapper alive, which can hold run-sh locks and block later desktop launches in CI or local runs—ensure the wrapper process is explicitly terminated during cleanup.
  • desktop/macos/Desktop/Sources/SentryHeartbeatTelemetry.swift is placed directly under Desktop/Sources/, which is likely to fail the source-root layout check and stop CI—move it into an allowed feature folder (for example Telemetry/ or Sentry/) before merge.
  • In desktop/macos/Desktop/Sources/MainWindow/DesktopHomeView.swift, the new Dashboard snapshot can still emit homeMode: nil on first report, which blurs Dashboard vs legacy state and can skew downstream telemetry/routing behavior—default missing prior mode to hub to keep bridge semantics consistent.

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

Re-trigger cubic

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17d8376494

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…eaks

- Move SentryHeartbeatTelemetry.swift from Sources root into Telemetry/ to
  satisfy the sources-root layout check (baseline 77 -> 78 root files)
- stop_fault_stack now kills+waits FAULT_RUN_PID before pkill, preventing a
  leaked run.sh wrapper from holding the run-sh lock after --fault-suite
- start_fault_stack readiness now verifies /health bundleIdentifier matches
  com.omi.omi-fault, preventing fault flows from running against a stale dev
  stack already bound to $PORT
- DesktopHomeView: fallback homeMode to "hub" when on Dashboard with no prior
  mode, so the automation snapshot contract is stable before reportHomeAutomationMode
- Rephrase changelog entry to user-facing sentence without trailing punctuation
- Add e2e flow coverage entries for OmiApp.swift and Telemetry/ heartbeat file
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor summary — PR #9217

All actionable review feedback (Cubic + Codex) has been addressed in commit 399c4cc10:

Thread Issue Resolution
Sources-root layout (Cubic P2 / Codex P1) SentryHeartbeatTelemetry.swift added directly under Desktop/Sources/ Moved to Desktop/Sources/Telemetry/. check-sources-root-layout.py passes at baseline 77.
Fault-stack run.sh leak (Cubic P2 / Codex P2) stop_fault_stack only killed the .app bundle, leaving FAULT_RUN_PID (./run.sh) alive and holding the run.sh lock stop_fault_stack now kills and waits on FAULT_RUN_PID before killing the app bundle.
Wrong fault bundle on shared port (Cubic P1 / Codex P2) Readiness check accepted any /health { ok: true }, risking the fault flow running against a stale dev stack Added verify_fault_bundle_health() which requires the /health bundleIdentifier to equal com.omi.<fault-bundle> before accepting readiness.
homeMode: nil first report (Cubic P2) Dashboard snapshot could expose nil before reportHomeAutomationMode() runs Falls back to "hub" when priorHomeMode is nil.
Changelog fragment wording (Cubic P3) Entry read as internal-facing release notes Rephrased to a user-facing sentence without trailing punctuation.

Verification:

  • git diff --check — no whitespace errors.
  • check-sources-root-layout.py — OK at baseline 77.
  • check-desktop-changelog.py --base origin/main --head HEAD — fragment found.
  • xcrun swiftc -parse on all 6 changed non-test Swift files — clean.
  • xcrun swift test --package-path desktop/macos/Desktop --filter SentryHeartbeatTelemetryTests — 2 tests passed, 0 failures.
  • Lint & Format Check (CI) — pass. Cubic reviewer — pass.

No new actionable review threads appeared after the fix commit. All 8 original review threads are now resolved.

…addition

The onAppear block now calls reportHomeAutomationMode() between
syncCaptureState() and the refreshHomeStatusData Task, which the
source-structure assertion must reflect.
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor summary — PR #9217 (follow-up)

Continuation from context 6d8000beb2. The prior run-summary covered the review-fix commit 399c4cc10. This run added one more commit to fix a CI test failure:

  • 9a121d6a3 — Updated DashboardCaptureStateTests.testHomeStatusRefreshUsesSharedActivationThrottle to reflect reportHomeAutomationMode() being called between syncCaptureState() and refreshHomeStatusData in the Dashboard .onAppear block.

Final CI status: all checks pass — Desktop Swift Build & Tests, Lint & Format Check, Desktop Backend Contracts, cubic reviewer. All 8 review threads resolved. No new review threads after the final push.

Resolve harness-smoke.yaml covers conflict by keeping PR telemetry
coverage (OmiApp, SentryHeartbeatTelemetry) and main ViewExporter
injection coverage.

Co-authored-by: Cursor <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 76d79e8 into main Jul 7, 2026
6 checks passed
@Git-on-my-level
Git-on-my-level deleted the test/desktop-harness-and-telemetry branch July 7, 2026 20:59
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.

Add tier-2 E2E flow for redesigned Home stage Move Desktop Session Heartbeat out of unresolved Sentry issues

1 participant