Skip to content

ci(mobile): publish a permanent latest-Android-APK download link - #22894

Closed
jasons2000 wants to merge 5 commits into
stablyai:mainfrom
jasons2000:ci/android-latest-apk-link
Closed

jasons2000 wants to merge 5 commits into
stablyai:mainfrom
jasons2000:ci/android-latest-apk-link

Conversation

@jasons2000

@jasons2000 jasons2000 commented Sep 25, 2026 •

Copy link
Copy Markdown

ELI5

The "download the Android app" links in the README, the docs and the desktop app all name one specific version, so they go out of date whenever a new version ships. This adds one permanent link that always gives you the newest Android app.

What Changed

Before: every Android download link points at a fixed version, such as .../mobile-android-v0.0.50/app-release.apk. Someone has to bump them by hand after each release (e.g. #21605, #22740), and they drift. Today the README is on 0.0.50, but the desktop app's pairing screen, Settings → Mobile and the docs site still send people to 0.0.48.

After: all of those links point at .../releases/download/mobile-android-latest/orca-android.apk, which always serves the newest build. The Android install guide no longer names a specific filename.

Mechanism: the Android release workflow gets a second job, android-latest. It runs after the existing android-build job publishes the versioned release, and only when that job published one.

  • It reads every published release (paginated, because this repo has ~960) and picks the highest mobile-android-v*.
  • It downloads that release's APK and publishes it as orca-android.apk on a single mobile-android-latest release. The job creates that release on first run, marked pre-release and --latest=false so it never takes the desktop app's "Latest" badge.
  • It always publishes the newest release's APK, not its own build. So a re-run of an older version, or a queued run GitHub drops, can't leave the link stale or roll it back.
  • The job is in a mobile-android-latest concurrency group, so each run reads the release list after the previous upload has finished. The versioned release job is outside the group and unchanged.
  • To replace an existing file, it uploads the new APK as orca-android.next.apk, deletes the old asset, then renames the new one. The link is unavailable only between the delete and the rename, not for the whole ~134 MB upload, and a failed upload leaves the previous APK serving.
  • Tags are never moved. The mobile-android-latest tag and its source archives stay where they were first created, and the release notes link to the versioned release for source and changelog.

Why

GitHub's built-in releases/latest/download/... link can't be used, because desktop releases hold "latest" in this repo. A dedicated release gives Android its own stable URL. Everything that reads Android releases filters on the mobile-android-v prefix (the notes-base lookup, prepare-android-release.mjs, and the update-check PRs #18089 and #11825), so the extra release is invisible to them.

Alternatives considered:

  • Keep bumping links by hand, or have a bot open the bump PR. Still leaves copies built into the desktop app out of date until the next desktop release.
  • Move the mobile-android-latest tag on every release. Keeps its source archives in sync, but needs a force-push of a tag from CI. Not worth it for a download link.
  • Skip the update unless this run's version is the newest. That was the first version of this PR. It can leave the link stale when GitHub drops a queued run, so every run now publishes the newest release instead.

Linked Issue

Fixes #7583

Visual Proof

N/A. The only user-visible change is where the existing "Download APK" buttons and links go. No layout or copy changes, except that the version number is dropped from link text that can no longer promise a specific version.

Testing

  • Parsed the workflow YAML, checked the job graph (needs, if, concurrency, permissions, job outputs), and ran bash -n on the new job's script.

  • Ran the new job's release lookup read-only against this repo: it pages through 960 non-draft releases and picks mobile-android-v0.0.50. gh release download mobile-android-v0.0.50 --pattern '*.apk' returns exactly one APK (134 MB).

  • pnpm test config/scripts/mobile-release-shell-switch-workflow.test.mjs src/renderer/src/components/mobile/MobileHero.test.tsx: 27 passed.

  • Pre-commit oxlint and oxfmt pass.

  • Not run end to end: the job only runs on a real Android release with contents: write, which I can't trigger from a fork.

  • Tested on Windows.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

No new automated test: the added logic is a shell job inside a release workflow, and the repo has no harness that runs release steps against the GitHub API.

Merge note: the new links return 404 until mobile-android-latest exists. Either merge just before the next Android release, or seed it once now from the current APK:

gh release download mobile-android-v0.0.50 --repo stablyai/orca -p app-release.apk -O orca-android.apk
gh release create mobile-android-latest --repo stablyai/orca --target main --prerelease --latest=false \
  --title "Orca Mobile Android (latest)" \
  --notes "Always the newest Orca Mobile Android APK. It is currently [mobile-android-v0.0.50](https://github.com/stablyai/orca/releases/tag/mobile-android-v0.0.50); use that release for its source and changelog." \
  orca-android.apk

The link changes in mobile-platform-copy.ts and MobileSettingsPane.tsx touch the same lines as #18089, so whichever lands second needs a one-line rebase. The onorca.dev download page lives outside this repo and could also point at the new URL.

AI Disclosure

Drafted with an AI coding assistant (Claude); reviewed by me.

Review

AI code review summary (Claude), covering the areas CONTRIBUTING.md asks for:

  • Cross-platform (macOS, Linux, Windows): the workflow runs on ubuntu-latest only, as before. The desktop change is two URL string constants in the renderer, with no platform-specific code. The permanent URL is the same on every platform.
  • SSH / remote / local: not affected. No runtime, relay or pairing code changes. The desktop app only opens the URL in the system browser, as it did with the versioned link.
  • Agents and integrations: not affected. No agent, terminal, hook or integration code changes.
  • Performance: no runtime cost. In CI, the new job adds one paginated release listing (~10 API calls), one APK download and one upload per Android release.
  • UI: no layout or styling changes. Link targets change, and link text drops the version number where it can no longer promise one.
  • Security: the new job uses the same GITHUB_TOKEN and contents: write scope the build job already has. It republishes an APK already published on a mobile-android-v* release, adds no new trust source and never force-pushes a tag. Separately, the APK is still signed with the public Expo debug key ([Bug]: Android release APKs are signed with the public Expo template debug keystore #21808). This PR neither causes nor fixes that.
  • Backwards compatibility: existing versioned releases and URLs are untouched, and desktop builds already shipped keep working links. The only new external dependency is that mobile-android-latest exists before the new links are used (see the merge note).
  • Bot review: all Pullfrog and CodeRabbit findings were fixed or answered in-thread. Both bots' latest re-reviews report no remaining issues.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security: see Review above. Cross-platform, SSH and backwards compatibility: no runtime code paths change. Old desktop builds keep their old versioned links, which still work.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Every Android release also uploads its APK as orca-android.apk to a fixed
mobile-android-latest release, so the README, docs and desktop app can link
to one URL that never goes stale.

Closes stablyai#7583

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one doc follow-up and a couple of small notes.

Reviewed changes

  • Rolling Android release step — new final step in mobile-android-release.yml that copies the versioned release APK to a dedicated mobile-android-latest prerelease, guarded so only the highest mobile-android-v* version can update it.
  • README (all locales) + docs site — Android download links repointed from version-pinned mobile-android-v0.0.50 / 0.0.48 to the stable mobile-android-latest URL.
  • Desktop in-app links — mobile-platform-copy.ts and MobileSettingsPane.tsx now use the stable URL.

I checked the gh contract this step depends on: gh release list includes prereleases and drafts by default, gh release create --latest=false is valid, and --target accepts a full SHA and is ignored when the tag already exists. The guard also fails closed when the release list can't be read. The workflow logic itself looks sound.

ℹ️ Install guide still names the old APK filename

docs/site/content/docs/android-apk.mdx:9 tells users to open Downloads and tap app-release.apk, but the links this PR changes now deliver orca-android.apk. A user following README → Download APK → Install guide, or the desktop pairing screen → Install guide, is told to look for a file that no longer appears. This is only benign if the external onorca.dev download page keeps serving the versioned asset, which the PR notes may change.

Technical details
# Install guide names a filename the new links no longer produce

## Affected sites
- `docs/site/content/docs/android-apk.mdx:9` — instructs tapping `app-release.apk`.
- `README.md:235` (and locale variants) — links this guide next to the new `orca-android.apk` download URL.
- `src/renderer/src/components/mobile/mobile-platform-copy.ts:10` — `ANDROID_INSTALL_GUIDE_URL` reaches the same guide from the desktop in-app flow.

## Required outcome
The install guide should not direct users to a filename the current download links don't produce. Either update it to `orca-android.apk` (or drop the filename, since the browser names the file), or confirm the onorca.dev page keeps serving the versioned asset and leave it.

## Open questions for the human (optional)
- Does the onorca.dev download page repoint at `mobile-android-latest`, and if so, under which filename? That decides whether this is a fix or a no-op.

ℹ️ Nitpicks

  • The newest-tag probe uses gh release list --limit 200 and then takes the max by version. It fails closed when the current tag falls outside the 200 most recent releases, but it can fail open — overwriting a newer APK with an older one — if a strictly newer mobile-android-v* release has aged out of that window while the current one is inside it. Low probability, and it mirrors the existing previous_tag lookup, so no change required unless you want a tag-namespace query instead.
  • The merge note is accurate: links 404 until mobile-android-latest exists. Merging just before the next Android release, or seeding once with the provided command, avoids a broken window.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Android release workflow selects the highest non-draft mobile-android-v* release and uses its APK to update or create the rolling mobile-android-latest prerelease. The workflow fails if no matching release exists or if the selected release does not contain exactly one APK. Android download links in the application and documentation now point to the rolling release asset. Installation instructions refer to the downloaded Orca APK.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🟡 Moderate · up to e61ff

Android download links will not work until the rolling APK is published. Create and verify that release before the links go live.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (7 skipped: 7 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: publishing a permanent latest Android APK download link through CI.
Description check ✅ Passed The description follows the required template and explains the user impact, workflow mechanism, rationale, linked issue, testing, limitations, review considerations, and checklist status. It explicitl…
Linked Issues check ✅ Passed The PR meets the coding requirements in [#7583]. The workflow exposes the publish condition, selects the newest non-draft mobile-android-v* release across pages, and updates or creates the `mobile-a…
Out of Scope Changes check ✅ Passed The workflow changes directly implement the rolling Android APK pointer required by [#7583]. Pagination, release selection, concurrency, APK validation, staged replacement, and recovery behavior suppo…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (7 skipped: 7 unsupported.)

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 78e7960e-894c-45a6-bb7a-b4373a600fe3

📥 Commits

Reviewing files that changed from the base of the PR and between 646e9a5 and 94ab2a0.

📒 Files selected for processing (11)
  • .github/workflows/mobile-android-release.yml
  • README.md
  • docs/readme/README.es.md
  • docs/readme/README.fr.md
  • docs/readme/README.ja.md
  • docs/readme/README.ko.md
  • docs/readme/README.pt.md
  • docs/readme/README.zh-CN.md
  • docs/site/content/docs/mobile.mdx
  • src/renderer/src/components/mobile/mobile-platform-copy.ts
  • src/renderer/src/components/settings/MobileSettingsPane.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Move the rolling-release update into its own job with a concurrency group so
an older run cannot overwrite a newer APK, page through all releases instead
of the newest 200, fail loudly when the release list cannot be read, and stop
naming a download filename in the Android install guide.
@jasons2000

Copy link
Copy Markdown
Author

Thanks for the reviews. Changes in 45f320b:

@pullfrog

  • Install guide filename: fixed. android-apk.mdx now says "tap the Orca APK you just downloaded". That's correct whether someone arrives from the new permanent link (orca-android.apk) or from the onorca.dev download page (app-release.apk).
  • 200-release window: fixed. The newest-version check now pages through every release. The repo has 960, so a newer Android release could have fallen outside the window.
  • Links 404 until mobile-android-latest exists: unchanged by design. The merge note in the description has the one-time setup commands; otherwise, merge just before the next Android release.

@coderabbitai summary items

  • Race between release runs: fixed. The rolling upload is now its own serialized job (see the resolved thread).
  • Docstring coverage: left as is. The "functions" flagged are two URL string constants in mobile-platform-copy.ts and MobileSettingsPane.tsx. Only the value changed, and neither file documents its constants.

@pullfrog

pullfrog Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Re-reviewed 45f320b and verified each item against the code:

  • Install guide filename — fixed. docs/site/content/docs/android-apk.mdx:9 no longer names a file; it says "tap the Orca APK you just downloaded", which works for both the mobile-android-latest asset and the onorca.dev page.
  • Release window — fixed, and stronger than asked. gh api --paginate "repos/$GITHUB_REPOSITORY/releases?per_page=100" scans every release, the || true now covers only the tag filter, and an empty result exits non-zero instead of silently skipping.
  • Race between release runs — fixed. The rolling upload moved to a separate android-latest job (needs: android-build) with concurrency: { group: mobile-android-latest, cancel-in-progress: false }, so versioned releases stay parallel. The artifact name matches the upload (orca-mobile-apk), and the job outputs it depends on (tag, publish_release) are genuinely emitted by mobile/scripts/prepare-android-release.mjs:91-94, so the new if: gate works.
  • Docstring coverage — correctly dismissed. The two flagged "functions" are URL string constants in mobile-platform-copy.ts and MobileSettingsPane.tsx; neither file documents its constants, and only the value changed.

No code changes needed. The only outstanding item is intentional: the new links 404 until the mobile-android-latest release exists, and the merge note documents the one-time seeding commands.

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

🟡 Minor · Retain all pending rolling updates. · mobile-android-release.yml:170-217

.github/workflows/mobile-android-release.yml:170-217
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Retain all pending rolling updates.

The default concurrency queue keeps only one pending job. If v3 publishes while the v1 rolling job runs, then v2 publishes later, the v2 job replaces the pending v3 job. The v2 job sees v3 as newest and exits, so v3 never updates mobile-android-latest.

Enable the larger queue for this concurrency group.

Suggested fix
     concurrency:
       group: mobile-android-latest
       cancel-in-progress: false
+      queue: max
🟡 Minor · Create mobile-android-latest before exposing this URL. · README.md:235

README.md:235
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Create mobile-android-latest before exposing this URL.

The Android release workflow does not run on a merge. It runs on an mobile-android-v* tag or manual dispatch, and it creates mobile-android-latest only after the Android build publishes. If that rolling release does not exist when this merge exposes the README link, GitHub returns 404 for the APK. The changed site, localized README, and app links use the same tag and asset, so delaying only documentation deployment does not prevent the failure. Create the rolling release before merging, or before exposing any of these links.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: e89a7742-7206-4767-a4b9-8fc40f196ba9

📥 Commits

Reviewing files that changed from the base of the PR and between 94ab2a0 and 45f320b.

📒 Files selected for processing (2)
  • .github/workflows/mobile-android-release.yml
  • docs/site/content/docs/android-apk.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/mobile-android-release.yml

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one minor action-version alignment note.

Reviewed changes

  • Rolling update split into its own job — android-latest now needs: android-build, downloads the orca-mobile-apk artifact, and owns the concurrency: { group: mobile-android-latest, cancel-in-progress: false } lock and contents: write, so versioned releases stay parallel and only the rolling upload is serialized.
  • Job outputs added — android-build exports tag and publish_release so the new job can gate on the resolved version.
  • Newest-tag probe paginates — replaced gh release list --limit 200 with gh api --paginate .../releases?per_page=100, and an empty result is now exit 1 rather than a silent skip.
  • Install guide filename dropped — android-apk.mdx no longer tells users to tap app-release.apk.

I verified the artifact name/path pairing, the paginated query under set -euo pipefail, that the rolling tag is excluded by the ^mobile-android-v filter, and that config/scripts/mobile-release-shell-switch-workflow.test.mjs still passes (12 tests). The guard plus job-level concurrency is sound: the versioned release is created before the dependent job runs, and serialization prevents an older run from clobbering a newer APK.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
for name in mobile-android-release.yml android-apk.mdx mobile-platform-copy.ts MobileSettingsPane.tsx; do
  echo "=== Locate $name ==="
  fd -a -F "$name" . || true
done
echo '=== Workflow content ==='
sed -n '1,300p' .github/workflows/mobile-android-release.yml
echo '=== Install guide content ==='
cat docs/site/content/docs/android-apk.mdx
echo '=== Mobile copy outline and content ==='
ast-grep outline src/renderer/src/components/mobile/mobile-platform-copy.ts --items all || true
cat src/renderer/src/components/mobile/mobile-platform-copy.ts
echo '=== Settings pane outline and content ==='
ast-grep outline src/renderer/src/components/settings/MobileSettingsPane.tsx --items all || true
cat src/renderer/src/components/settings/MobileSettingsPane.tsx

Length of output: 18476


@jasons2000, thanks for the update. I checked the files. The install guide no longer names a downloaded APK file. The rolling-release job now serializes uploads and checks the paginated release list before updating the APK.

You are right about docstring coverage. The changed URLs are constants, not functions that need new docstrings. I withdraw that summary item. The permanent links still need mobile-android-latest to be created before they work, as your merge note explains.

One small cleanup remains: the comment beside ORCA_ANDROID_APK_URL in MobileSettingsPane.tsx still calls the APK asset “pinned.” The URL now points to the rolling release.


✏️ Learnings added
Learnt from: jasons2000
URL: https://github.com/stablyai/orca/pull/22894

Timestamp: 2026-09-25T16:49:44.433Z
Learning: In `src/renderer/src/components/mobile/mobile-platform-copy.ts` and `src/renderer/src/components/settings/MobileSettingsPane.tsx`, the Android download URLs are string constants. Changing only their values does not create a function-docstring requirement; these files do not document their URL constants.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

You are interacting with an AI system.

Each rolling-update run now downloads the APK from the newest mobile-android-v*
release instead of using its own build, so a re-run of an older version or a
queued run GitHub drops can no longer leave the permanent link stale. This
also removes the cross-job artifact download.
@jasons2000

Copy link
Copy Markdown
Author

@coderabbitai re the outside-diff note "Retain all pending rolling updates": fixed in d57a313, a different way from queue: max. Each android-latest run now publishes the APK from the newest published mobile-android-v* release, not its own build. In your scenario, v2's job replaces v3's pending job, reads the release list, finds v3 and publishes v3's APK. So a dropped or reordered run can no longer leave the link stale, and correctness no longer depends on how GitHub queues jobs. The concurrency group stays, so each run reads the list only after the previous upload has finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: f287f734-d2e3-412a-9463-3f29c84d7e47

📥 Commits

Reviewing files that changed from the base of the PR and between 45f320b and d57a313.

📒 Files selected for processing (1)
  • .github/workflows/mobile-android-release.yml

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Rolling job now sources the APK from the release itself — android-latest dropped the cross-job orca-mobile-apk artifact download and now runs gh release download for the APK on the newest mobile-android-v* release.
  • Per-run "is this newest?" skip removed — every rolling run publishes whichever mobile-android-v* release is highest at execution time, making the job idempotent so a re-run or a GitHub-dropped pending run can no longer downgrade or stale the rolling link.
  • tag job output removed — the rolling job no longer reads needs.android-build.outputs.tag; publish_release remains the gate.

I re-checked the pieces the new step depends on: gh release download --dir creates its target directory (the same invocation is used unchaperoned in packaged-browser-e2e.yml) so removing download-artifact@v4 leaves no missing-directory gap; the ^mobile-android-v filter still excludes mobile-android-latest; --pattern '*.apk' pulls only assets and fails closed on no match; and no remaining code or docs reference needs.android-build.outputs.tag or the artifact name. The idempotent design also closes the concurrency-queue hole flagged earlier — the last rolling job to execute always re-queries the release list, so the newest version is the one published.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
file=.github/workflows/mobile-android-release.yml
ast-grep outline "$file" || true
rg -n -C 8 'android-latest:|concurrency:|mobile-android-v|release download|release upload|--latest=false|--prerelease|publish_release|gh api|gh release' "$file"

Length of output: 8655


@jasons2000, I checked .github/workflows/mobile-android-release.yml. Each android-latest job now selects the newest published mobile-android-v* release and uploads that release’s APK. The concurrency group serializes those jobs. A dropped pending job therefore does not require queue: max to keep the rolling APK current. This addresses my “Retain all pending rolling updates” concern. Thanks for explaining the change.


✏️ Learnings added
Learnt from: jasons2000
URL: https://github.com/stablyai/orca/pull/22894

Timestamp: 2026-09-25T19:10:00.530Z
Learning: In `.github/workflows/mobile-android-release.yml`, each serialized `android-latest` job selects the newest published `mobile-android-v*` GitHub Release and uploads that release’s APK to `mobile-android-latest`, rather than uploading its own build. This design keeps the rolling APK current when GitHub drops or reorders pending jobs; it does not require retaining every pending job.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

Upload the new APK under a staging name, then delete the old asset and rename
the staged one, so the permanent link no longer 404s for the whole upload or
after a failed one.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Staged the rolling APK before replacing it — on an existing mobile-android-latest release, the step now copies the newest APK to $RUNNER_TEMP/orca-android.next.apk, uploads that with --clobber, deletes the previous orca-android.apk by asset ID, and renames the staged asset into place, so the permanent URL stays live for the whole upload instead of being deleted up front.
  • Added a post-upload guard — the step fails if the staged asset is missing after upload, and only deletes the current asset when one exists.

I traced the swap: --clobber deletes only same-name assets, so the staged upload cannot touch orca-android.apk; the asset_id helper exact-matches on name, so the renamed asset is the one just uploaded; and the create path still produces an asset literally named orca-android.apk. There is no non-error path that leaves the wrong or a stale asset behind.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Resolve README conflicts: keep main's removal of the TestFlight link and
point the Android links at the permanent mobile-android-latest asset.
@jasons2000

Copy link
Copy Markdown
Author

@Jinwoo-H @brennanb2025, a gentle nudge on this one. I've merged main to clear the README conflicts (keeping the TestFlight removal from #23660), and all review-bot threads are resolved. Once merged, the README, docs and in-app links point at one permanent URL that the release workflow updates, so manual link-bump PRs like #19117 and #21605 are no longer needed. Happy to change anything.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: a253cc8d-c513-41fe-85bf-75d79c71d1ff

📥 Commits

Reviewing files that changed from the base of the PR and between 49c3dc1 and e61fff7.

📒 Files selected for processing (7)
  • README.md
  • docs/readme/README.es.md
  • docs/readme/README.fr.md
  • docs/readme/README.ja.md
  • docs/readme/README.ko.md
  • docs/readme/README.pt.md
  • docs/readme/README.zh-CN.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • docs/readme/README.ja.md
  • docs/readme/README.es.md
  • docs/readme/README.zh-CN.md
  • README.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread docs/readme/README.fr.md
Surveillez et pilotez vos agents depuis votre téléphone — soyez notifié quand un agent termine, et envoyez des instructions de suivi où que vous soyez.

[App Store iOS](https://apps.apple.com/us/app/orca-ide/id6766130217) · [APK Android 0.0.50](https://github.com/stablyai/orca/releases/download/mobile-android-v0.0.50/app-release.apk) · [Docs →](https://www.onorca.dev/docs/mobile)
[App Store iOS](https://apps.apple.com/us/app/orca-ide/id6766130217) · [APK Android](https://github.com/stablyai/orca/releases/download/mobile-android-latest/orca-android.apk) · [Docs →](https://www.onorca.dev/docs/mobile)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

git diff 3c1af16e8b989a99940bbfba527771d305b1be54 e61fff753b0368d1ca87e3ddbf227a0a33553e33 -- .github/workflows/mobile-android-release.yml docs/readme/README.fr.md | head -230

Repository: stablyai/orca

Length of output: 6163


🏁 Script executed:

set -e
printf '%s\n' '--- workflow head ---'
git show e61fff753b0368d1ca87e3ddbf227a0a33553e33:.github/workflows/mobile-android-release.yml | nl -ba | sed -n '1,270p'
printf '%s\n' '--- related references in head tree ---'
git grep -n -E 'mobile-android-latest|publish_release|mobile-android-v' e61fff753b0368d1ca87e3ddbf227a0a33553e33 -- .github docs README.md 2>/dev/null | head -240 || true
printf '%s\n' '--- repository refs containing rolling tag ---'
git ls-remote --tags https://github.com/stablyai/orca.git 'refs/tags/mobile-android-latest' 'refs/tags/mobile-android-v*' 2>/dev/null | tail -30 || true
printf '%s\n' '--- GitHub release evidence ---'
curl -LfsS --max-time 20 -H 'Accept: application/vnd.github+json' 'https://api.github.com/repos/stablyai/orca/releases?per_page=100' \
  | python3 -c 'import json,sys; rows=json.load(sys.stdin); print(json.dumps([{"tag_name":r.get("tag_name"),"draft":r.get("draft"),"prerelease":r.get("prerelease"),"assets":[a.get("name") for a in r.get("assets",[])]} for r in rows if r.get("tag_name","").startswith("mobile-android")], indent=2))'

Repository: stablyai/orca

Length of output: 20929


🏁 Script executed:

set -e
git show e61fff753b0368d1ca87e3ddbf227a0a33553e33:.github/workflows/mobile-android-release.yml | nl -ba | sed -n '1,270p'

Repository: stablyai/orca

Length of output: 12255


Bootstrap mobile-android-latest before publishing these links.

The workflow runs only for a mobile-android-v* tag push or manual dispatch. A README update does not trigger it. The inspected release inventory contains mobile-android-v0.0.50 with app-release.apk, but no mobile-android-latest release. Therefore these links can return 404 until the rolling release is created. Run the workflow manually with publish_github_release=true and confirm that orca-android.apk exists before publishing the README changes.

🧰 Tools
🪛 LanguageTool

[typographical] ~43-~43: Grupperingssymboler: ']' ser ut att saknas
Context: ...bile-android-latest/orca-android.apk) · [Docs →](https://www.onorca.dev/docs/mobi...

(UNPAIRED_BRACKETS)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Merged main (3c1af16e8b) into the branch and resolved the README conflicts by keeping main's removal of the TestFlight link while retaining the permanent mobile-android-latest Android links in README.md and all seven localized READMEs.
  • Confirmed the merge resolution is clean: git diff 3c1af16e8b..e61fff7 -- README.md docs/readme/ contains only the Android-link change, so the branch tracks main everywhere else, and no conflict markers remain.
  • No authored change to the workflow or renderer files in this delta; they are byte-identical to the previously reviewed 49c3dc1 state.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 3/5

[High risk] Build pipeline now manages a rolling release artifact.

The PR should not merge until the new URL is populated before use and the asset swap can recover from a failed rename.

Findings

  1. P1 Download links start at 404 ▶
  2. P1 Failed rename breaks downloads ▶

Summary

This PR adds a rolling Android APK release and points README, documentation, and desktop download links at its stable asset URL.

  • The URL needs a release-policy-compatible bootstrap before the links go live.
  • A failed asset rename after deletion can leave that URL unavailable until another successful run.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Versioned Android release] --> B[android-latest job]
  B --> C[Find highest versioned tag]
  C --> D[Upload staged APK]
  D --> E[Delete current APK]
  E --> F[Rename staged APK]
  F --> G[Stable download URL]
Loading

Reviews (1) · Last reviewed commit: "Merge main into ci/android-latest-apk-li..."

Comment on lines +245 to +252
gh release create "$latest_tag" \
--repo "$GITHUB_REPOSITORY" \
--target "$GITHUB_SHA" \
--title "Orca Mobile Android (latest)" \
--prerelease \
--latest=false \
--notes "$notes" \
"$stable_apk"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Download links start at 404 The README, docs, and desktop app switch to mobile-android-latest/orca-android.apk immediately, but this job creates that release only after a later Android release runs. Until then, users cannot download the APK from those links. The proposed manual seed is not a reliable workaround: the repository's release policy deletes a manually published mobile-android-latest release because its tag is outside the allowed patterns. Create and verify the asset through a policy-compatible path before switching the links.

Comment on lines +237 to +242
if [ -n "$current_id" ]; then
gh api -X DELETE "repos/$GITHUB_REPOSITORY/releases/assets/$current_id"
fi
# A failure here leaves only the staged asset; re-running the job completes the swap.
gh api -X PATCH "repos/$GITHUB_REPOSITORY/releases/assets/$staged_id" \
-f name=orca-android.apk --silent

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Failed rename breaks downloads If deleting the current APK succeeds but the following rename request fails, the job stops with only orca-android.next.apk on the release. The permanent orca-android.apk URL then returns 404 until someone reruns the job or another Android release succeeds. Retry the rename or restore the previous asset on failure.

@nwparker

nwparker commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for this! A stable Android link landed in #28143 (5a77f06): https://www.onorca.dev/download/android always redirects to the newest APK, and the README, docs and Settings pane use it, with the redirect bumped on each release. Closing as superseded.

This pull request was closed.
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.

[Feature]: Publish a rolling "android-latest" release for a stable APK download URL

2 participants