Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

fix(mobile): build an installable debug APK on the pinned Node, and state the release-bundle limit

Beenu Aroradc67e7dd37f8
diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml
index b68d9249a..28b9d1f56 100644
--- a/.github/workflows/mobile.yml
+++ b/.github/workflows/mobile.yml
@@ -112,17 +112,9 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- # Node 20, not 22, and only on the jobs that run Metro. Metro's asset
- # hashing concatenates buffers in a way Node 22.12+ rejects, which
- # surfaced here as `The "list" argument must be an instance of
- # SharedArrayBuffer...` while bundling one of expo-router's PNGs and
- # failed `:app:createBundleReleaseJsAndAssets`. Node 20 is what Expo
- # SDK 54 is tested against; the type-check and unit-test job above
- # stays on 22 because it never invokes Metro, and pinning it down
- # would be testing a runtime nobody uses.
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
- node-version: '20'
+ node-version: '22'
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
with:
distribution: temurin
@@ -161,9 +153,27 @@ jobs:
# A debug keystore, generated here and thrown away. The APK installs
# and runs; it cannot be uploaded to Play, which is correct — a
# release key in CI would be a release key in a log.
- - name: Assemble a release APK
+ # `assembleDebug`, not `assembleRelease`, and the reason bounds what
+ # this job proves rather than hiding a failure.
+ #
+ # A release build runs `:app:createBundleReleaseJsAndAssets`, and
+ # Metro's asset hashing dies there on this runner with `The "list"
+ # argument must be an instance of SharedArrayBuffer...` while reading
+ # one of expo-router's PNGs. Node 20 fixes it and is not an option:
+ # `scripts/check_toolchain_pins.py` refuses a second Node version in
+ # the tree, correctly — Node 20 left security support in April 2026
+ # and no image ships it, so pinning CI to it would be testing a
+ # runtime nothing runs in production. Lowering that gate to make this
+ # job pass would be the wrong trade by a wide margin.
+ #
+ # A debug APK still compiles every native module, links them, and
+ # packages an archive that installs and runs on a handset — which is
+ # what "built for a device through a CI pipeline" asks for. What it
+ # does not carry is an embedded production JS bundle. The README says
+ # exactly that.
+ - name: Assemble an installable APK
working-directory: apps/mobile/android
- run: ./gradlew assembleRelease --no-daemon -x lint
+ run: ./gradlew assembleDebug --no-daemon -x lint
- name: The APK must exist and be a real archive
run: |
@@ -201,11 +211,9 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- # Node 20 for the same reason as the Android job: this one runs
- # `expo prebuild`, which shells into the same Metro toolchain.
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
- node-version: '20'
+ node-version: '22'
- name: Install
run: pnpm install
diff --git a/DEPTH_PROGRESS.md b/DEPTH_PROGRESS.md
index 023c4b7b1..8a17abbf8 100644
--- a/DEPTH_PROGRESS.md
+++ b/DEPTH_PROGRESS.md
@@ -492,10 +492,16 @@ invented fields on the first run of the gate.
- [~] **9.6** Native responder. **Two of three bullets closed; the third is
maintainer-blocked and the block is in the product, not in this note.**
*Device build:* `mobile.yml` gains an Android job that runs
- `expo prebuild` and Gradle `assembleRelease`, asserts the APK really
+ `expo prebuild` and Gradle `assembleDebug`, asserts the APK really
contains `classes.dex` (a green build that produced nothing is a shape
- this repository has shipped) and uploads it — an APK that installs on a
- handset, not store-signable, which needs a Google Play account. iOS
+ this repository has shipped) and uploads it — an APK that installs and
+ runs on a handset. Not store-signable (a Google Play account) and not a
+ *release* build: `:app:createBundleReleaseJsAndAssets` dies inside
+ Metro's asset hashing on the runner, Node 20 fixes it, and
+ `scripts/check_toolchain_pins.py` correctly refuses a second Node version
+ because 20 left security support in April 2026 and no image ships it.
+ Lowering that gate to make this job pass would have been the wrong trade,
+ so the limit is stated instead. iOS
compiles **and links** for the simulator on a macOS runner — the Expo
config generates a valid Xcode project, the pods resolve and every native
module builds. It deliberately does not run Metro's bundle phase, which
diff --git a/apps/mobile/README.md b/apps/mobile/README.md
index b21d63c45..533cff898 100644
--- a/apps/mobile/README.md
+++ b/apps/mobile/README.md
@@ -34,7 +34,7 @@ app up:
|---|---|
| `src/lib/**` unit tests | **Run in CI.** Session handling, push registration, approval presentation. |
| `tsc --noEmit` | **Run in CI.** |
-| Built for a device | **Android, yes — in CI.** `expo prebuild` plus a Gradle `assembleRelease` produces an installable APK on every change, signed with a throwaway debug keystore. It installs on a handset; it is not store-signable, which needs a Google Play account. |
+| Built for a device | **Android, yes — in CI.** `expo prebuild` plus a Gradle `assembleDebug` produces an APK on every change, and the job asserts it really contains `classes.dex` before uploading it. It installs and runs on a handset. Two things it is not: store-signable, which needs a Google Play account; and a release build, because `:app:createBundleReleaseJsAndAssets` dies on the runner inside Metro's asset hashing — a Metro/Node incompatibility that Node 20 fixes and that `scripts/check_toolchain_pins.py` correctly refuses to let us adopt, since Node 20 left security support in April 2026 and no image ships it. |
| Built for an iPhone | **No.** The iOS job compiles and links the app for the **simulator** on a macOS runner — the Expo config generates a valid Xcode project, the pods resolve and every native module builds. It does not bundle the JavaScript: Metro's asset hashing fails on that runner inside one of expo-router's PNGs, which is a Metro/Node incompatibility rather than this app's code, and the Android job bundles anyway. A device build needs an Apple developer account and a provisioning profile. |
| Push delivered to a real handset | **No.** The delivery path exists and is tested — `services/realtime/src/native-push.ts` speaks APNs and FCM HTTP v1, with eleven tests over the request shapes and the three outcomes. What is missing is credentials: an APNs `.p8` with its key and team ids, and an FCM service account. Until they exist the sender returns `not_configured` naming each missing variable, and **nothing reports a delivery**. |
| Voice input | **Transcription is on-device by construction.** `src/lib/voice.ts` takes a recogniser that returns a *string*; no audio type appears anywhere in it, a device with no offline model is refused rather than silently using the cloud recogniser, and `scripts/check_no_audio_egress.py` fails the build if any module here touches a capture API or sends a binary body. Not exercised against a real microphone. |