fix(os): package elizaOS live runtime plugins#7800
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
…runtime-followup-20260519051650
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Without `await`, the async rejection from `requestSlotRestore` propagates out of `restoreConversationKv` as a raw rejected Promise instead of being caught and swallowed as `false`. The catch was dead for async errors. Adds a direct stress-test case that exercises the 500-on-restore path through `DflashLlamaServer.restoreConversationKv` and asserts the result resolves to `false`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Summary
Fixes the current elizaOS Live packaged-runtime blocker found during QEMU validation: the app window opened, but the backend timed out because
@elizaos/plugin-app-managerand@elizaos/plugin-registrywere staged as package folders without runtimedist/index.jsfiles.This PR:
just milady-appplugin-registryexternalized fromplugin-app-managerValidation
packages/os/linux/variants/milady-tails/scripts/static-smoke.shpassedpackages/os/linux/variants/milady-tails/scripts/security-smoke.shpassed with expected warnings for missing production update keyring and SBOM/provenance artifacts/api/auth/statusreturned local unauthenticated status from the staged runtimeout/binary.isofb706edd7016b415e53fc263c37d09ed26d7f0d8d3bced250bde5b1b3ea9bec8/opt/milady/Resources/app/eliza-dist/node_modules/@elizaos/plugin-app-manager/dist/index.js/opt/milady/Resources/app/eliza-dist/node_modules/@elizaos/plugin-registry/dist/index.jsBackend Timeoutscreen did not recuraa82b25248clarifies validated-artifact versus exact-release-commit status; it does not change ISO contentsRemaining honest gaps
This is demo-ready for VM review, not a production release claim. Still pending: repeat USB flash/readback for this exact artifact, real hardware boot, real USB Persistent Storage create/unlock/delete, Privacy Mode network proof for embedded web/OAuth surfaces, production update keyring, SBOM/provenance artifacts, and production updater rollout hardening.
Review follow-up
Updated 2026-05-19 after merging latest
origin/developthroughd683f4bffa:plugin-registrynow uses the package's ownbuild:jspath during live runtime staging, matching its workspace build contract instead of the directbun buildshortcut.runAcpxfailure path, so the event payload and error text cannot drift.Additional validation after this update:
Results:
Greptile Summary
This PR fixes the elizaOS Live packaged-runtime blocker where
@elizaos/plugin-app-managerand@elizaos/plugin-registrywere staged without builtdist/index.jsfiles, causing backend timeouts on QEMU boot. It also refactors the ACP CLI-missing detection into a shared helper and fixes a missingawaitindflash-server.tsthat made therestoreConversationKvcatch block dead code for async errors.package-buildandbun-runtime-indexbuild modes to themilady-appJustfile target;plugin-registrygoes through its ownbuild:jsscript (package-jsmode) whileplugin-app-manageruses a directbun buildinvocation with all first-party deps externalized.missingCliMessage()andemitMissingCli()helpers sorunAcpx(all platforms) andassertTransportAvailable(Android throw path) share one error message and event payload, eliminating drift between the two guards.persistConversationKv/restoreConversationKvchanged fromPromise<void>toPromise<boolean>across the interface,BackendDispatcher,DflashLlamaServer, andFfiStreamingBackend; a new stress test verifies therestoreConversationKvcatch block fires correctly on a 500 response.Confidence Score: 5/5
All three previously flagged issues have been addressed and are backed by targeted new tests; the changes are well-scoped with no apparent correctness regressions.
The
return awaitfix indflash-server.tsis validated by the new stress test. The ACP refactoring consolidates two code paths into one shared helper without changing observable behaviour on either Android or non-Android. The build pipeline change is straightforward:plugin-registrycorrectly delegates to its ownbun run build:jsscript, andplugin-app-manageruses abun buildinvocation with all first-party deps externalized.No files require special attention; the most structurally complex change (
acp-service.ts) is well-covered by the updated unit test.Important Files Changed
missingCliMessage,emitMissingCli);runAcpxnow short-circuits with code 127 on all platforms when the CLI path doesn't exist, whileassertTransportAvailablestill throws on Android.persistConversationKv/restoreConversationKvchanged fromPromise<void>toPromise<boolean>;restoreConversationKvnow correctly usesreturn awaitso thecatchblock catches async errors fromrequestSlotRestore.BackendDispatcherupdated toPromise<boolean>return type; dispatcher delegates with barereturn(noawait) which is safe here since there is no enclosing try/catch.persistConversationKv/restoreConversationKvtoPromise<boolean>; synchronous FFI calls are now followed byreturn true, with early-return guards returningfalse.package-buildandbun-runtime-indexbuild modes with dependency guards; registersplugin-registry(viapackage-js) andplugin-app-manager(viabun-runtime-index) for live-runtime staging.@elizaos/plugin-app-managerand@elizaos/plugin-registryto the list of plugins whosedist/index.jsis verified before ISO promotion.@elizaos/plugin-registryto the externals list so it is not bundled into the plugin-app-manager artifact.restoreConversationKvresolves tofalse(rather than leaking a rejected Promise) when the server returns a 500 on the slot-restore POST.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[milady-app Just target] --> B{ensure_plugin_runtime_dist} B --> C[plugin-health\npackage-js] B --> D[plugin-calendly\ntsup-index] B --> E[plugin-registry\npackage-js] B --> F[plugin-app-manager\nbun-runtime-index] E --> G[bun run build:js\ntsup shared config] F --> H[bun build src/index.ts\nexternal: plugin-registry, core, etc.] I[static-smoke.sh] --> J{check dist/index.js} J --> K[plugin-app-manager ✓] J --> L[plugin-calendly ✓] J --> M[plugin-health ✓] J --> N[plugin-registry ✓] O[runAcpx] --> P{missingCliMessage?} P -- yes --> Q[return code 127\nemit error event] P -- no --> R[spawn CLI process] S[assertTransportAvailable\nAndroid only] --> T{missingCliMessage?} T -- yes --> U[emitMissingCli + throw] T -- no --> V[continue]Reviews (5): Last reviewed commit: "fix(local-inference): await slot restore..." | Re-trigger Greptile