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.
Cut 3.4.2 for the WASM JS-loader hook auto-wire (record
wasm-sidecar-entangle / clear wasm-sidecar-host-verify-only only when a
same-directory Node CJS loader was actually injected) and the REA
26d88826c catalog hygiene (SQLITE_WORKER_HEAP_BYTES). Also includes the
post-3.4.1 main work already on de982cb.
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.
Update Skill B, DESIGN, STATE, CHANGELOG [Unreleased], MCP
sidecar_entangle descriptions, and CLI help so ESM-native preambles
are not described as full process-start strip⇒fail. Keep the
CJS-into-ESM functional-equivalence rule; document the hoist gap.
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).
Cut 3.3.2 for the SQLite schema-comment sidecarEntangle increment and
the REA #4445 / #9756 catalog hygiene (NativeAOT work-budget scaling
and Android split-fact report allowances).
When sidecarEntangle is opted in, plant an unused bla_sidecar_v1 VIEW
(SELECT '<json>' AS "bla.sidecar.v1" WHERE 0) binding sibling sidecars
(generate/bind/entangle/verifySqliteSidecarSchemaComment). User tables,
rows, query results, WAL/FK, and application_id/user_version stay
unchanged. Host-verify only — do not record sqlite-sidecar-entangle
until a load-time hook lands; defenseScore annotates
sqlite-sidecar-host-verify-only (soft-cap 93). Default remains OFF.
Also catalogues REA #4445 NativeAOT work-budget scaling
(NATIVE_AOT_BASE_WORK_UNITS + 8 units/byte; a relaxation, not a new
densify target) and REA #9756 ANDROID_NATIVE_SPLIT_TYPES / _TYPE_CHARS
(report allowance only).
Cut 3.3.1 for the DEX string-pool sidecarEntangle increment, the
REA #10227 DEX_ARRAY_DIMENSIONS catalog, and the already-landed
post-3.3.0 work (MBA substitutions, hypothesis-revision decoys,
release-hygiene gate, verify-sidecar CLI, technical SEO).
When sidecarEntangle is opted in, plant an unreferenced sort-last
bla.sidecar.v1= binding string in the official DEX string pool
(generate/bind/entangle/verifyDexSidecarStringPoolNote). Existing string
indices and instruction bytes stay unchanged; Adler32/SHA-1 are recomputed;
protectAndroidDexBuffer trailers are preserved. Host-verify only — do not
record dex-sidecar-entangle until a load-time hook lands; defenseScore
annotates dex-sidecar-host-verify-only (soft-cap 93). Default remains OFF.
Also catalogues REA_INTERNAL_LIMITS.DEX_ARRAY_DIMENSIONS = 255 (REA #10227
dexTypes admission). Honesty catalog only; not a densify trip target.
* fix(js): treat top-level await and import.meta as an ES module carrier
A .js entry with module-only syntax but no static import/export (top-level
await, import.meta) was classified as a script carrier. Node evaluates such a
file as an ES module (syntax detection), so with sidecarEntangle the CommonJS
strip=>fail preamble hit an undefined require() and the INTACT protected
artifact died with "integrity binding mismatch".
Use Babel's unambiguous program.sourceType as an additional module signal in
both the shield's effective carrier and detectJsCarrierForSource, so the
existing #162 refusal fires instead of shipping a broken entry.
Red 2026-11-13.
* fix(js): honor package.json "type": "module" before binding a sidecar preamble
A .js entry with no import/export syntax under a "type": "module" package is
still an ES module at runtime. The carrier check only looked at syntax and the
.mjs/.cjs extension, so sidecarEntangle prepended the CommonJS strip=>fail
preamble and the intact hardened entry threw "integrity binding mismatch"
(protect and harden alike; reproduced with `bla harden --sidecar-entangle`).
Add resolveNodePackageModuleType / refineJsCarrierForRuntimePaths (nearest
package.json wins, as in Node) and apply it to the output and input locations
in protectTarget and the harden post-pass, so the #162 refusal fires and the
artifact keeps running. Without sidecarEntangle nothing changes.
Red 2026-11-13.
* docs(mcp,cli): state that sidecar_entangle refuses ES module JS entries
The sidecar_entangle MCP parameter (bla_harden / bla_protect / bla_defend) and the --sidecar-entangle CLI help now say the JS preamble is CommonJS and which entry shapes count as ES modules, so an agent can disable the option or pick a CommonJS entry instead of hitting the refusal blind.
* docs(skill): runtime carrier decides whether a sidecar preamble is safe
Skill B principle (CommonJS preamble on a runtime ES module breaks the intact artifact; refuse instead), design-doc follow-up entry, and CHANGELOG [Unreleased] note for the 2026-11-13 red finding. ESM-native preamble left as TBD.
Extend opt-in sidecarEntangle to GGUF via a bla.sidecar.v1 STRING metadata KV
(generateSidecarGgufMetadataNote / bindGguf / entangleGguf / verifyGguf), with
alignment-safe rebuildGguf so tensor bytes stay bit-exact. Host-verify only
(loaders ignore unknown STRING keys); do not record gguf-sidecar-entangle until
a load-time hook lands; defenseScore gap gguf-sidecar-host-verify-only.
Also fix protectGgufBuffer which previously corrupted tensor data by splicing
KV bytes without re-padding the aligned data section. Default OFF.
* fix(crackme-v9): seal.json absence throws integrity check failed
loadSeal() used to let ENOENT from missing seal.json soft-fold through
verifyLicenseGate into [license] DENIED (same as a wrong key). Pin failures
must fail-closed: throw integrity check failed: seal.json missing so delete
matches digest-mismatch hard-fail. Published hardened still needs rebuild.
* test(crackme-v9): assert seal.json delete hard-fails on cleartext and fixture
Covers the ENOENT≡digest-mismatch invariant through materializeTarget and
full 4-stage fixture harden. Release hardened fixture still predates the
host fix until CRACKME_V9_* rebuild.
* docs(skill,state): pinned digests fail-closed on absence (v9 red 2026-11-10)
Skill B: EXPECTED_*_SHA256 pins must hard-fail on ENOENT, never soft DENIED.
STATE/CHANGELOG/DESIGN record the exposure, source fix, and published
hardened residual until release-secret rebuild.
* fix(sidecar): do not claim pyc-sidecar-entangle for a host-only trailer
The TYPE_ASCII marshal note is ignored by importlib, so strip or sibling
delete still execute. Recording pyc-sidecar-entangle (and clearing the
strip⇒fail defenseScore gap) was paper coverage. Keep planting the note
and host verifyPycSidecarMarshalNote; annotate pyc-sidecar-host-verify-only
until an import-time hook lands.
* test(sidecar): assert .pyc marshal notes stay host-verify only
protectTarget must not list pyc-sidecar-entangle; importlib still returns
the same RESULT after trailer strip or sidecar delete, while the host
verifier fails closed. defenseScore keeps cap 93 via the new gap when
the host-only note is enabled.
* docs(skill,state): sidecar vectors require a process-start hook
Skill B: only record a countered strip⇒fail sidecar vector when the
entry hook hard-fails at process start or import. Host-only verifiers
(such as verifyPycSidecarMarshalNote) are binding notes, not coverage.
CHANGELOG/STATE/DESIGN record the 2026-11-12 honesty residual.
Complete opt-in ASAR sidecar entanglement with an in-archive Electron main
JS preamble (generateSidecarAsarMainJsPreamble / selectAsarMainJsMember /
entangleAsarMainJsWithSidecars) that re-measures decoy members via
fs-patched readFileSync. Digest labels stay asar-root-relative for parity
with .bla/sidecar.v1.json; protect + harden wire when sidecarEntangle is
on (default OFF). REA +12 since e9b6c87c1 had no new 1:1 densify budgets.
- Replace substring marker checks and hardcoded decoy counts in src/engine/auditor.ts, src/shields/formats/mobile-game.ts, and src/shields/formats/native.ts with structural Babel AST verification and container header/checksum checks across JS/TS, Python, Android DEX (file_size + Adler32), Unity IL2CPP, ZIP/APK, SourceMap, Apple Plist, .NET Managed, JVM .class, and Native binaries.
- Upgrade Windows PE32/PE32+ hardening in src/shields/formats/native.ts to inject a mapped .enclave COFF section (0x40000060) and section-alignment slack with 16-byte aligned x86-64 ABI function islands, MSVC C++ RTTI descriptors, CodeView RSDS PDB debug records, and Win32 Crypto/BCrypt/NCrypt/WinHTTP symbols while updating NumberOfSections, SizeOfImage, and CheckSum (closes#157).
- Remove self-sabotaging decorative-deception-signal and none-client-side-only strings from emitted runtime-shield JS code while preserving TypeScript classification metadata.
- Entangle all injected JS decoy/tarpit functions into the opaque-predicate seedVarName initializer by default so stripping decoys breaks execution without requiring --self-seal.
- Upgrade all 14 showcase benchmark targets in src/engine/benchmark.ts to run real before/after VM execution, SQL query parity, Float32 tensor weight equality, or container payload preservation checks.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Plant a bla.sidecar.v1 custom-section note with the sidecars-mode binding
digest + path labels (no export/behavior change). Host-side
verifyWasmSidecarCustomSection re-hashes siblings for strip/alter fail.
Wire protectTarget (.wasm) and harden WASM-only post-pass when
sidecarEntangle is on (default OFF). DESIGN/STATE/CHANGELOG updated.
Bust require.cache via realpathSync and re-verify strip/alter with a
fresh node process so /var→/private/var tmpdir aliases cannot leave a
stale module cached (CI macos failure on #93). Document #95 missing-
sibling hard-fail in STATE/CHANGELOG Unreleased.
AbortSignal + onProgress between artifacts; cancelled reports set
cancelled:true and list already-written paths (no silent half-harden).
MCP notifications/progress via progressToken; notifications/cancelled
aborts in-flight harden on a stdio fast-path (not behind the serial queue).
Skill section B: entry counts as self-covered only when its runtime check
hard-fails on its own bytes; check integrityCoverageSelfVerified; keep
host-trust values inside covered artifacts. STATE/CHANGELOG/design note
record the 2026-11-05 CrackMe v8 round (NO PRIZE, REA unverified).
Graduate the standing red/blue entitlement design into the public CrackMe.
Rebuild with bla harden bankrupt + --self-seal (no --allow-*): SHA-256(key)
mask KDF, commitment outside XOR, seed-derived rounds/pad3, arity-2 /
export-order / unlock body-index hygiene. Meridian v7 stays historical
(cleartext private; cannot honestly re-harden without the maintainer store).
Bump package/identity/lock to 2.0.0; CHANGELOG + STATE + Skill v2.0.0
document packaging-gates, MCP write-safety, and R1–R12 refuse/recipe/honesty
vs 1.x. Release notes in docs/releases/v2.0.0.md.
Restructure Skill principles into A refuse gates, B product recipes
(SHA-256 KDF, commitment-outside-XOR, host FLAG+cert), C engine hygiene,
D white-box residual. Extend format-wasm appendix through R12; refresh
cli-and-mcp + CHANGELOG/STATE. No new refuse lint for P2 WASM RE.
CHANGELOG, cli-and-mcp, and skill/format appendices point at the new
lint tools, allow switches, panel rewrite, and self_seal recommendation.
Honest residual: full WASM data-section encryption remains a follow-up.
Red/Blue round-2 broke the hardened product gate by inverting a public
ARX revision from plaintext seal.json (round-1 WASM ABI + lane vectors held).
Skill v1.5.3 + format-javascript appendix record the footgun; product seal
encrypt remains P1.