Skip to content

Point production OTA clients to v2 manifest#3244

Open
PhilippeFerreiraDeSousa wants to merge 5 commits into
devfrom
codex/dev-ota-v2-url
Open

Point production OTA clients to v2 manifest#3244
PhilippeFerreiraDeSousa wants to merge 5 commits into
devfrom
codex/dev-ota-v2-url

Conversation

@PhilippeFerreiraDeSousa

@PhilippeFerreiraDeSousa PhilippeFerreiraDeSousa commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Point ASG-side production OTA defaults to https://ota.mentraglass.com/prod_live_version_v2.json.
  • Point MentraOS production OTA checks and Bluetooth SDK legacy fallback checks to the same v2 manifest.
  • Add asg_client/ota_website/prod_live_version_v2.json as the forward production manifest path, based on the current dev production manifest without the legacy com.augmentos.otaupdater app entry.

Why

The original production manifest must remain available as the legacy rescue path for older ASG clients that may be stuck on corrupted artifact cache state and ignore ota_start.ota_version_url. New MentraOS and SDK checks should look at the v2 manifest, which can advance beyond the rescue manifest. If old glasses need an update, ota_start will still use their compiled rescue manifest first; once the upgraded ASG client is installed, follow-up checks continue on v2.

Validation

  • git diff --check origin/dev...HEAD
  • jq empty asg_client/ota_website/prod_live_version.json asg_client/ota_website/prod_live_version_v2.json
  • rg "https://ota\.mentraglass\.com/prod_live_version\.json|prod_live_version\.json" . -g '!**/build/**' -g '!**/node_modules/**' -g '!**/.git/**' returns no matches
  • cd asg_client && ./gradlew :app:compileDebugJavaWithJavac
  • cd mobile && bun install && bun compile
  • cd mobile && ../scripts/check-android-compile.sh bluetooth-sdk

SwiftPM note: cd mobile/modules/bluetooth-sdk && swift build is blocked locally by DeviceManager.swift importing UIKit with this toolchain (no such module 'UIKit') before this URL-only change is exercised.


Note

High Risk
Changes which OTA manifest production glasses and apps use; misrouting could show wrong updates or block rescue paths, though legacy builds are explicitly pinned to the old manifest.

Overview
Production OTA defaults now use prod_live_version_v2.json instead of prod_live_version.json, while the original manifest stays in place as the legacy rescue channel for ASG builds that ignore phone-supplied ota_start.ota_version_url.

ASG-side compiled defaults (OtaConstants, OTA updater, recovery worker) and restore-stock.sh fetch v2. A new asg_client/ota_website/prod_live_version_v2.json is the forward production manifest (no legacy com.augmentos.otaupdater app entry).

MentraOS mobile sets production checks to v2 via OTA_VERSION_URL_PROD and adds OTA_VERSION_URL_LEGACY_PROD. For glasses build < 39, getAsgOtaVersionUrl always uses the legacy manifest so availability checks match what those devices actually install from.

Bluetooth SDK (Android/iOS) mirrors that rule: legacy builds resolve OTA checks to LEGACY_PROD_OTA_VERSION_URL instead of the glasses-advertised URL or the v2 default.

Reviewed by Cursor Bugbot for commit 994c434. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

📋 PR Review Helper

📱 Mobile App Build

Ready to test! (commit 994c434)

📥 Download APK

🕶️ ASG Client Build

Ready to test! (commit 994c434)

📥 Download ASG APK


🔀 Test Locally

gh pr checkout 3244

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploying mentra-live-ota-site with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90874dd
Status: ✅  Deploy successful!
Preview URL: https://2e942f9f.mentra-live-ota-site.pages.dev
Branch Preview URL: https://codex-dev-ota-v2-url.mentra-live-ota-site.pages.dev

View logs

@zacharytyhacz

Copy link
Copy Markdown

Exciting!

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

PR Agent Orchestrator State

{
  "cycle": 2,
  "fixRound": 0,
  "totalReviewerRuns": 2,
  "consecutiveNoNewReviews": 2,
  "openFindings": [],
  "resolvedFindings": [],
  "nitFindings": [],
  "phase": "discovery",
  "status": "in_progress",
  "lastPair": [],
  "stagnationFixRounds": 0,
  "lastOpenCount": 0,
  "fingerprintReopenCounts": {},
  "mutedFingerprints": []
}

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

🤖 PR Agent Review — cycle 2

✅ No blocking findings · 0 blocking · 0 nits
Reviewers this cycle: none

No model reviews ran this cycle.

Updated automatically by the PR Agent Orchestrator each review cycle. Nits do not block merge.

@nic-olo

nic-olo commented Jun 26, 2026

Copy link
Copy Markdown
Member

why are you removing the recovery worker? It has not impact on the OTA

@nic-olo

nic-olo commented Jun 26, 2026

Copy link
Copy Markdown
Member

"Remove the unused standalone asg_client/ota_updater project; live ASG compatibility cleanup for already-installed com.augmentos.otaupdater packages is intentionally left in place."

This is wrong no production mentra live has com.augmentos.otaupdater installed

@nic-olo

nic-olo commented Jun 26, 2026

Copy link
Copy Markdown
Member

The rest of the changes LGTM

@PhilippeFerreiraDeSousa

PhilippeFerreiraDeSousa commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

"Remove the unused standalone asg_client/ota_updater project; live ASG compatibility cleanup for already-installed com.augmentos.otaupdater packages is intentionally left in place."

This is wrong no production mentra live has com.augmentos.otaupdater installed

So why is it in the prod OTA manifests? https://ota.mentraglass.com/prod_live_version.json

@aisraelov

Copy link
Copy Markdown
Member

@PhilippeFerreiraDeSousa Long ago we planned to have a separate dedicated ota updater app. We decided not to do it- too much complication and the (assumed) benefits turned out to be not true. It being in the manifest is just something we never deleted.

@aisraelov aisraelov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

approved

# Conflicts:
#	mobile/src/services/asg/asgOtaVersionUrl.ts
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mentra-store-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90874dd
Status: ✅  Deploy successful!
Preview URL: https://60e31d85.augmentos-appstore-2.pages.dev
Branch Preview URL: https://codex-dev-ota-v2-url.augmentos-appstore-2.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying dev-augmentos-console with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90874dd
Status: ✅  Deploy successful!
Preview URL: https://bf1080d5.dev-augmentos-console.pages.dev
Branch Preview URL: https://codex-dev-ota-v2-url.dev-augmentos-console.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying prod-augmentos-account with  Cloudflare Pages  Cloudflare Pages

Latest commit: 90874dd
Status: ✅  Deploy successful!
Preview URL: https://22a1eb5a.augmentos-e84.pages.dev
Branch Preview URL: https://codex-dev-ota-v2-url.augmentos-e84.pages.dev

View logs

@PhilippeFerreiraDeSousa PhilippeFerreiraDeSousa marked this pull request as ready for review June 26, 2026 20:39

@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: 90874dd276

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

// Keep prod as the legacy-device fallback for SDK checks. Pre-override ASG
// builds ignore ota_start.ota_version_url and use their compiled rescue
// manifest, then continue future updates on v2 after the rescue update.
const val PROD_OTA_VERSION_URL = "https://ota.mentraglass.com/prod_live_version_v2.json"

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 Badge Route SDK legacy checks to v2 despite advertised URLs

When a pre-39 ASG build still advertises the old production URL, this new fallback constant is bypassed: MentraBluetoothSdk.resolveOtaVersionUrl() returns status.otaVersionUrl whenever it is nonblank before consulting OtaManifestDefaults.PROD_OTA_VERSION_URL (and the Swift resolver has the same branch). That means SDK checkForOtaUpdate() remains pinned to prod_live_version.json for the legacy devices this migration is meant to rescue, so any ASG/firmware update published only on prod_live_version_v2.json will never be offered to SDK apps. The legacy resolver should force v2 or rewrite the old prod URL rather than only changing the blank-URL fallback.

Useful? React with 👍 / 👎.

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.

4 participants