Commit Graph

3 Commits

Author SHA1 Message Date
qybaihe d66b9af1f2 feat(sidecar): auto-wire WASM JS-loader hook into known Node ESM loaders + REA catalog hygiene
Extend the 2026-11-16 Node CJS auto-wire so a same-directory Node.js
ESM loader (.mjs or ESM .js) whose static import/export-from specifiers
are Node builtins only also receives the already-landed WASM
bla.sidecar.v1 load-time hook (carrier: "module"). Record
wasm-sidecar-entangle and clear wasm-sidecar-host-verify-only only when
that hook was actually written. Browser fetch-only loaders and ESM
files that statically import user modules or .wasm stay untouched.

Honesty: jsModuleHasHoistedDependencyGraph no longer treats Node
builtin-only imports as a user hoisted graph.

Catalog REA tip 05be423ac inspection/walk ceilings (DWARF, ELF
debug-link/DT_NEEDED, Maven/Gradle, NuGet, Android OTA/boot) as
honesty-only REA_INTERNAL_LIMITS — not densify trip targets.
2026-11-18 02:08:36 +08:00
qybaihe 1eb0978b73 feat(sidecar): auto-wire WASM JS-loader hook into known Node CJS loaders + REA catalog hygiene
When sidecarEntangle is on, protectTarget and hardenProject inject the
already-landed WASM JS-loader hook into a same-directory Node.js CommonJS
loader that already uses fs and WebAssembly.instantiate/compile/
instantiateStreaming and mentions the .wasm basename (known names only:
<stem>.cjs/.js, loader.*, index.*). Browser, ESM, minified, already-
entangled, and unranked app entries such as license.cjs are left
untouched so baked self-seal digests stay valid. Record
wasm-sidecar-entangle and clear wasm-sidecar-host-verify-only only when
that hook was actually written. Default remains OFF.

Catalog REA tip 26d88826c SQLITE_WORKER_HEAP_BYTES (256 MiB) as honesty-
only; no new 1:1 densify counters in the +208 delta.
2026-11-17 02:28:40 +08:00
qybaihe c677256c0f feat(sidecar): optional WASM JS-loader hook for bla.sidecar.v1 strip⇒fail + REA catalog hygiene
Add generateSidecarWasmLoaderSnippet / prependWasmSidecarLoaderHook /
entangleWasmLoaderWithSidecars / computeWasmSidecarCodeIdentity so a host JS
loader can wrap WebAssembly.instantiate, compile, and instantiateStreaming
and fail closed when a protected module's bla.sidecar.v1 custom section is
stripped or sibling sidecars are altered. Unrelated WASM passes through.
The hook is host-opt-in; wasm-sidecar-entangle stays unrecorded and the
wasm-sidecar-host-verify-only honesty gap remains until a protect/harden
path actually injects the hook. sidecarEntangle stays default OFF.

Catalogue REA #11144 / #11181 javascript.member_mutation_alias_states as
REA_INTERNAL_LIMITS (recoverable budget, not a densify trip target).
2026-11-16 02:09:38 +08:00