Skip to content

feat(pvm): run App Manifest v2 runtimes in Dotli - #185

Open
replghost wants to merge 56 commits into
mainfrom
feat/pvm-wasm
Open

feat(pvm): run App Manifest v2 runtimes in Dotli#185
replghost wants to merge 56 commits into
mainfrom
feat/pvm-wasm

Conversation

@replghost

@replghost replghost commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What

  • load signed PolkaVM App v2 archives in the sandbox.
  • run framebuffer, Tri2D, and WebGPU profiles through the host runtime bridge.
  • consume truapi-pvm-host@e892cd9d and standalone runtime v0.1.5@81a484a1 through the reviewed bridge.
  • synchronize and verify browser assets from the bridge exporter with one source-bound lock.
  • route baseline TrUAPI request/response frames between PVM workers and Dotli’s canonical product MessagePort.
  • refresh translated/interpreter WebGPU capabilities after resize so stale surface generations recover.
  • resolve optional motion input as unavailable when a browser host has no active sensor source; pointer input remains the fallback.
  • keep the runtime namespace outside product-controlled service-worker routes.
  • add configurable seven-app smoke coverage.

Verification

  • sandbox tests: 21 passed, including canonical MessagePort negotiation.
  • sandbox lint and TypeScript checks: passed.
  • production sandbox build: passed with bridge-owned runtime 0.1.5 assets.
  • bridge asset synchronization and checksum gate: passed.
  • focused PVM functional suite: passed.
  • App Kit pvm-truapi-playground CAR: compiler/Tri2D rendering passed and canonical TrUAPI handshake request/response counters both advanced.
  • Chinpokomon App v2: compiler/WebGPU rendering, window resize, and subsequent input passed.
  • canonical seven-app Dotli compiler matrix: passed.

@github-actions

Copy link
Copy Markdown
Contributor

⚡ Performance Report

⚠️ No baseline found on main. This PR's results are recorded but cannot be compared.
Merge to main to establish a baseline.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Chunks over 500 KB:

File Raw Brotli Gzip
host/assets/paseo.smol-DboPaEh1.json 1.84 MB 941.7 KB 1019.4 KB
host/assets/paseo-people-next.smol.json 3.36 MB 1.68 MB 1.82 MB
host/assets/smoldot.js 3.05 MB 2.27 MB (-23 B) 2.28 MB
host/assets/smoldot_worker.js 3.02 MB 2.26 MB 2.27 MB
host/assets/truapi_server_bg.wasm 7.18 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm 7.18 MB 5.29 MB 5.56 MB
sandbox/pvm-runtime/pvm-browser-runtime.wasm 878.8 KB 134.6 KB 183.7 KB
Total 27.81 MB (+1.07 MB) 18.25 MB (+200.8 KB) (-34%) 19.13 MB (+256.1 KB)
All files
File Raw Brotli Gzip
host/.well-known/apple-app-site-association 1.0 KB 1.0 KB 1.0 KB
host/.well-known/assetlinks.json 2.1 KB 343 B 427 B
host/assets/bridge.js 70.7 KB (+394 B) 19.4 KB (+91 B) 22.3 KB (+95 B)
host/assets/browser.js 22.9 KB 7.5 KB (-19 B) 8.6 KB (+1 B)
host/assets/client.js 100.1 KB 29.4 KB (-10 B) 32.4 KB (-4 B)
host/assets/dist.js 39.0 KB (-8 B) 12.8 KB (-62 B) 14.5 KB (-60 B)
host/assets/dotli-debug-bus.js 710 B 710 B 710 B
host/assets/get-sync-provider.js 2.8 KB 1.1 KB (+3 B) 1.2 KB
host/assets/hex.js 154 B 154 B 154 B
host/assets/index.js 231.5 KB (+6.2 KB) 57.8 KB (+1.5 KB) 69.4 KB (+2.0 KB)
host/assets/index.css 55.1 KB 8.6 KB 9.8 KB
host/assets/manifest.js 19.6 KB (-3.0 KB) 6.5 KB (-739 B) 7.2 KB (-820 B)
host/assets/panel.js 76.4 KB (+128 B) 20.6 KB (+51 B) 23.3 KB (+10 B)
host/assets/paseo.smol-DboPaEh1.json 1.84 MB 941.7 KB 1019.4 KB
host/assets/paseo-people-next.smol.json 3.36 MB 1.68 MB 1.82 MB
host/assets/paseo.smol.json 23.4 KB 5.4 KB 6.2 KB
host/assets/previewnet.smol.json 43.8 KB 11.2 KB 9.5 KB
host/assets/resolve.js 156 B 156 B 156 B
host/assets/rpc-resolve.js 2.5 KB 1.0 KB (-13 B) 1.2 KB (-2 B)
host/assets/smoldot.js 3.05 MB 2.27 MB (-23 B) 2.28 MB
host/assets/smoldot_worker.js 3.02 MB 2.26 MB 2.27 MB
host/assets/spans.js 2.6 KB 1.1 KB 1.3 KB
host/assets/src.js 1.8 KB 846 B (-12 B) 946 B (+1 B)
host/assets/styles.css 15.3 KB 3.3 KB 3.8 KB
host/assets/truapi_server_bg.wasm 7.18 MB 5.29 MB 5.56 MB
host/assets/wasm/web/README.md 11.9 KB 11.9 KB 11.9 KB
host/assets/wasm/web/package.json 371 B 371 B 371 B
host/assets/wasm/web/truapi_server.d.ts 11.7 KB 11.7 KB 11.7 KB
host/assets/wasm/web/truapi_server.js 48.8 KB 7.8 KB 9.1 KB
host/assets/wasm/web/truapi_server_bg.wasm 7.18 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm.d.ts 4.0 KB 4.0 KB 4.0 KB
host/assets/web.js 17.9 KB (+2 B) 4.5 KB (-2 B) 5.0 KB (-15 B)
host/assets/worker-runtime.js 28.7 KB (+28.6 KB) 6.8 KB (+6.7 KB) 7.7 KB (+7.6 KB)
host/assets/worker-runtime.js 106 B 106 B 106 B
host/assets/ws.js 23.1 KB 7.5 KB (-4 B) 8.2 KB (+1 B)
host/dotli.png 11.5 KB 11.5 KB 11.5 KB
host/favicon.svg 1.8 KB 1.8 KB 1.8 KB
host/host-sw.js 2.7 KB 1.1 KB (+11 B) 1.3 KB (-3 B)
host/icon-192.png 12.5 KB 12.5 KB 12.5 KB
host/icon-512.png 42.8 KB 42.8 KB 42.8 KB
host/index.html 29.1 KB 5.4 KB (+8 B) 6.7 KB (+2 B)
host/manifest.webmanifest 441 B 441 B 441 B
host/workbox.js 14.8 KB 4.6 KB 5.1 KB
sandbox/app-sw.js 9.7 KB (+52 B) 3.2 KB (+22 B) 3.6 KB (+23 B)
sandbox/assets/bitswap-bridge.js 840 B 840 B 840 B
sandbox/assets/fetch.js 3.4 KB 1.2 KB (+1 B) 1.4 KB (+3 B)
sandbox/assets/index.js 155.8 KB (+35.4 KB) 44.4 KB (+10.2 KB) 52.0 KB (+11.7 KB)
sandbox/assets/index.css 55.1 KB 8.6 KB 9.8 KB
sandbox/favicon.svg 1.8 KB 1.8 KB 1.8 KB
sandbox/index.html 1.7 KB 582 B (-2 B) 786 B (-1 B)
sandbox/pvm-runtime/LICENSE-MPL-2.0 16.3 KB 16.3 KB 16.3 KB
sandbox/pvm-runtime/PolkaVM-LICENSE-APACHE 10.6 KB 10.6 KB 10.6 KB
sandbox/pvm-runtime/PolkaVM-LICENSE-MIT 1023 B 1023 B 1023 B
sandbox/pvm-runtime/SOURCE 388 B 388 B 388 B
sandbox/pvm-runtime/pvm-browser-runtime.wasm 878.8 KB 134.6 KB 183.7 KB
sandbox/pvm-runtime/pvm-gpu-worker.js 55.4 KB 9.7 KB 11.1 KB
sandbox/pvm-runtime/pvm-wasm-worker.js 65.2 KB 10.5 KB 12.4 KB
Total 27.81 MB (+1.07 MB) 18.25 MB (+200.8 KB) (-34%) 19.13 MB (+256.1 KB)

Commit: 5e68f47

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

E2E Product suite failed on f270f1f84864f14f50987f57895d362082b642ba — 35 passed, 10 failed, 17 skipped.

Failed tests:

  • Get Product Account
  • Product Signer
  • Product Account Alias
  • Get User Identity
  • Bulletin Allowance
  • Smart-Contract Allowance
  • All Allowances
  • As a product user, I can navigate within the current product
  • Query Balance
  • Sign Raw Message

Logs: https://github.com/paritytech/dotli-community/actions/runs/33448919250
Artifacts: e2e-product-results (uploaded above) — open the failed test's trace.zip with npx playwright show-trace.

@replghost

replghost commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

@justraman the PVM change is green across formatting, build, unit, functional, and the canonical seven-app Dotli matrix. The broad host-playground E2E remains red on the same account, allowance, and navigation failures as current main (the latest main Tests runs also fail); it does not exercise this PVM path. Could you review the runtime adapter so this can follow host-rust-core#540?

@replghost

Copy link
Copy Markdown
Collaborator Author

Live doom.paseo clarification:

  • The deterministic DOTLI_DOOM_V2_CAR test is a separate fixture test and was skipped locally because no CAR/manifest file paths were supplied.
  • The focused compiler and forced-interpreter PVM browser tests pass.
  • I ran tests/performance/pvm-doom.spec.ts against the live Paseo products. Doom, Quake, and Duke all timed out before the product iframe mounted; the host remained at its loading surface, so this did not reach PVM execution.
  • https://doom.paseo.li currently resolves a published CID, but the deployed host sends sandbox contract v=3 without executableManifest; the sandbox then reports Archive missing index.html. Reloading the available service-worker update still produced the same v3 contract.

Therefore doom.paseo is published/live, but it is not yet a passing live Dotli PVM acceptance result. The PR's deterministic PVM path is green; live acceptance still needs a deployed/current host-sandbox pair or a repaired local live resolver.

@replghost

Copy link
Copy Markdown
Collaborator Author

Warm-cache reload is now fixed in 1a8aa4d839bdf6f5a74a125eae24578d8f043914.

Root causes:

  1. performance Playwright reused any process already listening on port 5173, so local runs could silently test a stale build;
  2. a same-iframe reload posted a second truapi-ready, but the Host had removed its probe listener after the first handshake and the original MessagePort could not be transferred again;
  3. runtime readiness did not wait for the translated-byte IndexedDB write to settle.

Changes:

  • isolated performance server via PERF_PORT and reuseExistingServer: false;
  • retain the modern Host handshake listener and replace the product-side provider with a fresh MessageChannel on every subsequent truapi-ready;
  • wait for the bounded translation-cache write before exposing runtime readiness;
  • behavioral unit coverage for the second port handoff.

Verification on an isolated current branch build:

  • live doom.paseo manifest resolution: passed;
  • live Quake translated runtime: passed;
  • live Duke bounded hostcall/audio runtime: passed;
  • live Doom cold compiler/playability and warm same-iframe cache hit: passed;
  • full live PVM performance file: 4/4 passed;
  • UI tests: 217 passed;
  • sandbox tests: 17 passed.

@replghost
replghost deployed to westendli.dev August 31, 2026 19:42 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant