Skip to content

Commit c38d8fa

Browse files
committed
fix(ci): align app-core mobile runtime tests
1 parent a0c1a89 commit c38d8fa

3 files changed

Lines changed: 39 additions & 16 deletions

File tree

packages/app-core/scripts/build-llama-cpp-dflash-targets.test.mjs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ import { it as test } from "vitest";
33

44
import { formatHelpText, parseArgs } from "./build-llama-cpp-dflash.mjs";
55

6-
test("help advertises linux aarch64 CUDA fused but not mobile fused targets", () => {
6+
test("help advertises linux aarch64 CUDA and iOS fused but not Android fused targets", () => {
77
const helpText = formatHelpText();
88
assert.match(helpText, /linux-aarch64-cuda-fused/);
9+
assert.match(helpText, /ios-arm64-metal-fused/);
10+
assert.match(helpText, /ios-arm64-simulator-metal-fused/);
911
assert.doesNotMatch(helpText, /android-arm64-cpu-fused/);
1012
assert.doesNotMatch(helpText, /android-x86_64-cpu-fused/);
11-
assert.doesNotMatch(helpText, /ios-arm64-metal-fused/);
1213
});
1314

14-
test("mobile fused targets fail closed with explicit diagnostics", () => {
15+
test("Android fused targets fail closed with explicit diagnostics while iOS fused is accepted", () => {
1516
const cases = [
1617
["android-arm64-cpu-fused", /Android fused FFI is not wired/],
1718
["android-arm64-vulkan-fused", /Android fused FFI is not wired/],
@@ -23,15 +24,24 @@ test("mobile fused targets fail closed with explicit diagnostics", () => {
2324
"android-x86_64-vulkan-fused",
2425
/Android x86_64 fused FFI is not a dflash target/,
2526
],
26-
["ios-arm64-metal-fused", /iOS fused FFI is not wired or verifier-covered/],
2727
];
2828

2929
for (const [target, pattern] of cases) {
30-
assert.throws(() => parseArgs(["--target", target, "--dry-run"]), (err) => {
31-
const message = err instanceof Error ? err.message : String(err);
32-
assert.match(message, pattern, message);
33-
assert.match(message, new RegExp(target), message);
34-
return true;
35-
});
30+
assert.throws(
31+
() => parseArgs(["--target", target, "--dry-run"]),
32+
(err) => {
33+
const message = err instanceof Error ? err.message : String(err);
34+
assert.match(message, pattern, message);
35+
assert.match(message, new RegExp(target), message);
36+
return true;
37+
},
38+
);
3639
}
40+
41+
assert.doesNotThrow(() =>
42+
parseArgs(["--target", "ios-arm64-metal-fused", "--dry-run"]),
43+
);
44+
assert.doesNotThrow(() =>
45+
parseArgs(["--target", "ios-arm64-simulator-metal-fused", "--dry-run"]),
46+
);
3747
});

packages/app-core/vitest.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ const pluginWorkflowSrc = path.join(
9696
"plugins/plugin-workflow/src",
9797
);
9898
const pluginX402Src = path.join(monorepoRoot, "plugins/plugin-x402/src");
99+
const pluginWorkerRuntimeSrc = path.join(
100+
monorepoRoot,
101+
"packages/plugin-worker-runtime/src",
102+
);
99103
// Resolve react/react-dom from the location of this config file so the alias
100104
// works whether react is hoisted to the monorepo root or installed locally.
101105
// createRequire resolves through the normal Node resolution algorithm (walks up
@@ -448,6 +452,14 @@ export default defineConfig({
448452
find: /^@elizaos\/plugin-x402$/,
449453
replacement: path.join(pluginX402Src, "index.ts"),
450454
},
455+
{
456+
find: /^@elizaos\/plugin-worker-runtime$/,
457+
replacement: path.join(pluginWorkerRuntimeSrc, "index.ts"),
458+
},
459+
{
460+
find: /^@elizaos\/plugin-worker-runtime\/(.+)$/,
461+
replacement: path.join(pluginWorkerRuntimeSrc, "$1"),
462+
},
451463
{
452464
find: /^@elizaos\/plugin-browser$/,
453465
replacement: path.join(pluginBrowserBridgeSrc, "index.ts"),

packages/docs/apps/mobile.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ Use `bun run build:android:cloud` from the repository root for a Play-store
8989
style release AAB thin client; `android-cloud-debug` is only for debug APK
9090
iteration. Use `bun run build:android:system` for the privileged AOSP APK. The
9191
legacy `packages/app` `build:android` script is sideload-only and embeds the
92-
on-device agent runtime. The cloud target strips the local agent, privileged
93-
default-role surfaces, staged runtime assets, native runtime plugin references,
94-
`ElizaAgentService`, `assets/agent`, disguised `libeliza_` native runtime
95-
libraries, `MANAGE_APP_OPS_MODES`, `PACKAGE_USAGE_STATS`,
96-
`MANAGE_VIRTUAL_MACHINE`, and other system-only permissions, then audits the
97-
source tree and artifact.
92+
on-device agent runtime. App-store/cloud builds do not run a local Bun backend;
93+
they connect through cloud or remote capability routes. The cloud target strips
94+
the local agent, privileged default-role surfaces, staged runtime assets, native
95+
runtime plugin references, `ElizaAgentService`, `assets/agent`, disguised
96+
`libeliza_` native runtime libraries, `MANAGE_APP_OPS_MODES`,
97+
`PACKAGE_USAGE_STATS`, `MANAGE_VIRTUAL_MACHINE`, and other system-only
98+
permissions, then audits the source tree and artifact.
9899

99100
The `android-cloud` target strips `ElizaAgentService`, system-only permissions
100101
such as `MANAGE_APP_OPS_MODES`, `PACKAGE_USAGE_STATS`, and

0 commit comments

Comments
 (0)