Skip to content

fix(desktop): WiFi SD-card sync uploads WAL via syncToCloud - #9253

Merged
kodjima33 merged 3 commits into
mainfrom
fix/wifi-sync-cloud-upload
Jul 8, 2026
Merged

kodjima33 merged 3 commits into
mainfrom
fix/wifi-sync-cloud-upload

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Merge order & dependencies

PR Dependencies
9250 None — merge first (unblocks CI)
9252 None — parallel with #9253, #9254
9253 None — parallel with #9252, #9254
9254 None — parallel with #9252, #9253; #9255 should merge after this
9255 Merge after #9254 (registers teardown tests). Merge after #9250 recommended.
9256 Independent code PR; PR6b prod deploy after merge. Related #9255 not blocking.
9257 Draft. Merge after #9255 (workflow contract CI).
9258 Draft. Independent; merge after wave 1.
9260 Draft. Independent; merge after wave 1.
9261 Draft. Merge after wave 1; PR10c proxy routing follow-up optional.

Summary

  • Call await walService.syncToCloud() in WifiSyncService.finishSync() before cleanup(), matching StorageSyncService parity.
  • Add Swift parity tests and e2e SKILL documentation for WAL verification after SD download.

Related: #5267

Test plan

cd desktop/macos && xcrun swift test --filter 'WALServiceUpload|WifiSync|SdCardSyncParity'

Local note: swift test blocked here by AudioKit macOS platform mismatch in this worktree; CI desktop-swift-ci should run the filter suite.

Merge with a regular merge (no squash).

Closes #9236

Made with Cursor

Review in 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: 85e773ad9b

ℹ️ 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".

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

3 issues found across 5 files

Confidence score: 3/5

  • In desktop/macos/Desktop/Sources/WAL/WifiSyncService.swift, awaiting activeWalService.syncToCloud() before cleanup() can trigger cloud upload while still on the device SoftAP (192.168.4.1), where internet access is typically unavailable; merging as-is risks failed or stalled uploads after download. Reorder the flow so network cleanup/disconnect happens before cloud sync (or defer cloud sync until normal connectivity is restored) before merging.
  • In desktop/macos/Desktop/Tests/SdCardSyncParityTests.swift (assertSyncToCloudAfterDownload), using first-match body.range(of:) for ordering is brittle because syncToCloud() also appears in a nearby comment, so the test can pass/fail for the wrong reason. Tighten the assertion to match the actual call site (or use more specific markers) to prevent false confidence in sync ordering.
  • In desktop/macos/e2e/SKILL.md, duplicate/out-of-order section numbering (2d before 2c, and another 2d) can break navigation and make the new SD-card WAL instructions harder to follow. Renumber headings to restore a unique, monotonic structure before merge.

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

Re-trigger cubic

Comment thread desktop/macos/e2e/SKILL.md Resolved
Git-on-my-level and others added 2 commits July 8, 2026 15:25
WifiSyncService.finishSync now calls syncToCloud before cleanup, matching
StorageSyncService so downloaded recordings are not left in local miss state.

Closes #9236

Related #5267

Verification:
cd desktop/macos/Desktop && xcrun swift test --filter 'WALServiceUpload|WifiSync|SdCardSyncParity'
→ 7 tests, 0 failures

Co-authored-by: Cursor <[email protected]>
Add automation-bridge WAL snapshot step to e2e SKILL.md so agents can
confirm pending_count drops after WiFi/BLE SD-card sync without parsing logs.

Co-authored-by: Cursor <[email protected]>
@Git-on-my-level
Git-on-my-level force-pushed the fix/wifi-sync-cloud-upload branch from 85e773a to cac5a99 Compare July 8, 2026 08:26
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor follow-up for PR #9253:

  • Moved the WiFi SD-card WAL cloud upload to run after cleanup(), so the device SoftAP is torn down and normal internet routing can return before syncToCloud() runs.
  • Tightened SdCardSyncParityTests to search for exact upload call sites instead of comment text, and to assert BLE uploads before teardown while WiFi uploads after teardown.
  • Fixed the e2e SKILL section numbering and added WifiSyncService.swift to the capture lifecycle flow coverage map.

Verification:

  • git diff --check
  • python3 desktop/macos/scripts/check-e2e-flow-coverage.py --strict --base origin/main
  • python3 .github/scripts/check-desktop-changelog.py --base origin/main --head HEAD
  • cd desktop/macos/Desktop && xcrun swift test --filter 'WifiSync|SdCardSyncParity' — 3 tests passed locally.
  • GitHub checks re-scanned after push: Desktop Swift Build & Tests, desktop-core-e2e-t0, contracts, Hygiene, and Cubic all passed; no unresolved trusted bot review threads remain.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

owner-override desktop bug fix: WifiSync uploads WAL via syncToCloud before cleanup (#5267), CI green

@kodjima33
kodjima33 merged commit 8e9fa24 into main Jul 8, 2026
19 of 20 checks passed
@kodjima33
kodjima33 deleted the fix/wifi-sync-cloud-upload branch July 8, 2026 14:34
Git-on-my-level added a commit that referenced this pull request Jul 9, 2026
## Merge order & dependencies

| PR | Dependencies |
|----|--------------|
| 9250 | None — **merge first** (unblocks CI) |
| 9252 | None — parallel with #9253, #9254 |
| 9253 | None — parallel with #9252, #9254 |
| 9254 | None — parallel with #9252, #9253; **#9255 should merge after
this** |
| 9255 | Merge after #9254 (registers teardown tests). Merge after #9250
recommended. |
| 9256 | Independent code PR; **PR6b prod deploy** after merge. Related
#9255 not blocking. |
| 9257 | **Draft.** Merge after #9255 (workflow contract CI). |
| 9258 | **Draft.** Independent; merge after wave 1. |
| 9260 | **Draft.** Independent; merge after wave 1. |
| 9261 | **Draft.** Merge after wave 1; **PR10c** proxy routing
follow-up optional. |


## Summary
- Register `listen_pusher_pipeline` in `workflow_contracts.json`
including PR4 teardown test.
- Run `check_workflow_contracts.py` from pre-push and
`backend-checks.yml` static-contracts; extend detect-changes.

Related: #9194

## Test plan
```bash
cd backend && .venv/bin/python scripts/check_workflow_contracts.py
cd backend && .venv/bin/python -m pytest tests/unit/test_workflow_contracts.py -v
# 5 passed
```

Merge with a **regular merge** (no squash).

Closes #9238

Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9255?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Git-on-my-level added a commit that referenced this pull request Jul 9, 2026
## Merge order & dependencies

| PR | Dependencies |
|----|--------------|
| 9250 | None — **merge first** (unblocks CI) |
| 9252 | None — parallel with #9253, #9254 |
| 9253 | None — parallel with #9252, #9254 |
| 9254 | None — parallel with #9252, #9253; **#9255 should merge after
this** |
| 9255 | Merge after #9254 (registers teardown tests). Merge after #9250
recommended. |
| 9256 | Independent code PR; **PR6b prod deploy** after merge. Related
#9255 not blocking. |
| 9257 | **Draft.** Merge after #9255 (workflow contract CI). |
| 9258 | **Draft.** Independent; merge after wave 1. |
| 9260 | **Draft.** Independent; merge after wave 1. |
| 9261 | **Draft.** Merge after wave 1; **PR10c** proxy routing
follow-up optional. |


## Summary
- Wire `MCP_OAUTH_CLIENTS_JSON` / `MCP_OAUTH_CLAUDE_*` into
`runtime_env.yaml`, Helm secrets, and prod backend-listen values.
- Extend `smoke_mcp_chatgpt_review.py` authorize checks, add
`check_mcp_oauth_deploy_contract.py`, and gate `pre-deploy-check.sh`.
- Remove stale `("oauth_client_id", "omi")` automation fallback in
`MemoryExportService.swift`.

**Deploy follow-up (PR6b):** run backend-listen prod deploy +
`smoke_mcp` after merge (requires deploy credentials; not done in this
PR).

## Test plan
```bash
cd backend && .venv/bin/python scripts/check_mcp_oauth_deploy_contract.py
cd backend && .venv/bin/python -m pytest tests/unit/test_mcp_oauth.py -v -k claude
# 1 passed
```

Merge with a **regular merge** (no squash).

Closes #9149
Closes #8537

Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9256?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
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.

Desktop: WiFi SD-card sync never calls syncToCloud after download

2 participants