Skip to content

Harden APK build pipeline and Android download landing flow - #1

Draft
ALaustrup wants to merge 12 commits into
mainfrom
cursor/apk-first-hardening-2ca5
Draft

Harden APK build pipeline and Android download landing flow#1
ALaustrup wants to merge 12 commits into
mainfrom
cursor/apk-first-hardening-2ca5

Conversation

@ALaustrup

@ALaustrup ALaustrup commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

This PR implements the APK-first path so users can reliably download/install ASTRA MATRIX from the landing page while keeping runtime behavior resilient when optional online integrations are unavailable.

What changed

  • Hardened runtime service loading for mobile environments:

    • src/core/services/GitHubService.js
      • Moved octokit/simple-git loading behind runtime-evaluated requires.
      • Added safe offline behavior when token/runtime support is absent.
    • src/core/services/Web3Service.js
      • Removed static ethers import and switched to runtime-evaluated require.
    • src/ai/NarrativeService.js
      • Added native-runtime guard and runtime-evaluated loading for Gemini SDK.
      • Added robust offline narrative fallback behavior.
    • src/core/SceneEngine.js
      • Removed dummy GitHub auth path and now uses process.env.GITHUB_TOKEN when available.
  • Build and release scripts:

    • package.json
      • start now launches Expo app (expo start).
      • Added start:cli, web, build:web, build:apk, build:apk:production.
    • eas.json
      • Ensured both preview/production profiles produce APK (buildType: apk).
  • CI workflow fixes:

    • .github/workflows/build-apk.yml
      • Corrected repository root paths.
      • Uses npm ci + npm run build:apk.
      • Includes PR trigger on main.
  • Expo config updates:

    • app.json
      • Added owner: psybrninja.
      • Added extra.eas.projectId for non-interactive EAS linkage.
  • Replaced placeholder app assets with proper dimensions:

    • assets/icon.png (1024x1024)
    • assets/adaptive-icon.png (1024x1024)
    • assets/splash.png (1242x2436)
    • assets/favicon.png (48x48)
  • Landing page distribution hardening:

    • public/index.html
      • Android-focused install UX.
      • Dynamic metadata rendering from /download/latest.json.
      • Displays version/build date/size/SHA256.
      • Disables download when no APK is published.
    • public/download/latest.json
      • Release metadata source file.
    • scripts/publish-apk-release.sh
      • One-command APK publish + checksum metadata generation.
    • vercel.json
      • Static public output, APK headers, metadata caching, and download route handling.
    • DEPLOY_APK.md
      • End-to-end APK publish and validation runbook.

Current CI status

  • Expo auth/token issue is resolved (EXPO_TOKEN accepted).
  • EAS project linkage issue is resolved (owner + projectId + non-interactive flow now valid).
  • CI now consistently reaches remote EAS Android build execution.
  • Current remaining blocker is a remote EAS Android bundle phase failure with message:
    • Unknown error. See logs of the Bundle JavaScript build phase for more information.
  • Recent EAS build links from CI logs:
    • https://expo.dev/accounts/psybrninja/projects/app-369/builds/7e062190-6197-42f7-88cd-8cdae506d8ad
    • https://expo.dev/accounts/psybrninja/projects/app-369/builds/6906c2d2-9c54-4fcd-83a2-b9f3bd58033b
    • https://expo.dev/accounts/psybrninja/projects/app-369/builds/93718335-ef7b-4014-8bd2-7f0b70066201

Remaining step to publish real APK

A successful EAS Android build artifact is still required before running:

scripts/publish-apk-release.sh /path/to/real.apk <version> <build_date_utc> "<release_notes>"

Then commit/push updated files:

  • public/download/astra-matrix-latest.apk
  • public/download/latest.json
Open in Web Open in Cursor 

Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
@vercel

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app-369 Ready Ready Preview, Comment May 5, 2026 8:02am

Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
Co-authored-by: Andrew | Godmode <ALaustrup@users.noreply.github.com>
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.

2 participants