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.
Prove that deleting a sidecar after ESM-native entanglement still
prints imported module side effects before integrity binding mismatch,
that a CommonJS require graph does not, and that verifyTarget only
annotates esm-import-hoist-before-hooks for the hoisted ESM case.
Intact artifacts stay functionally equivalent (RESULT 5).
ESM static import/export-from bindings are instantiated before any
statement in the entry, including a prepended strip⇒fail IIFE. The
entry body still fail-closes, but imported module side effects already
ran — that is not process-start coverage for the hoisted graph.
Add jsModuleHasHoistedDependencyGraph (ignoring the BLA createRequire
preamble), defenseScore gap esm-import-hoist-before-hooks (soft-cap 93),
and wire it through verifyTarget when sidecar or self-seal is on.
package.json requires `^22.23.4 || >=24.0.0` and STATE.md documents the final
gate matrix as Node 22.23.4 plus Node 24.22.1, but the CI matrix asked for the
floating `22` alias, so the leg could silently resolve below the supported
floor and never proved the minimum we declare. Pin it to 22.23.4 and describe
the matrix accurately in STATE.md.
buildSarifReport already turns audit findings into SARIF 2.1.0, but the
packaging gates — the surface a release pipeline actually blocks on — could only
print text or --json, so their findings never showed up in GitHub code scanning
annotations.
buildPackagingGatesSarif maps each gate to one rule, refusing findings to
error, informational findings to note, and emits paths with forward slashes.
`bla lint --sarif` prints it and keeps the existing exit code (2 on refusal).
vitest.config.ts defines statements 85 / branches 76 / functions 94 / lines 85
over src/**, but no job ever passed --coverage, so the floors could not fail a
build. The primary leg (ubuntu, Node 24) now runs the suite with coverage; the
other legs keep the plain run so total CI time stays roughly flat.
Measured on this revision: statements 86.17%, branches 77.81%, functions 94.6%,
lines 86.17% — above every floor. A targeted run against a small subset fails
the thresholds as expected, so the gate is live rather than decorative.
With failBuildOnError false (the default) a chunk whose transform throws is
passed through untouched, and the only evidence was a console.warn per chunk
that is easy to lose in a large build log. A partial shield is exactly the kind
of implicit claim the rest of BLA refuses to leave unsaid.
Rollup/Vite and esbuild now print one summary from their build-end hook, and the
webpack plugin prints it at the end of the asset stage, listing every chunk that
shipped unprotected. Default behaviour for successful builds is unchanged (no
summary, same pass-through for bad chunks).
Also corrects the documented Vite option name (`honeySourceMap`, not
`enableHoneySourceMaps`) in the same guide.
validateMcpToolCall checked array items but never their count, and accepted
1.5 for count arguments, so a single tools/call could hand the engine an
unbounded list or a fractional cap. String lists (wasm_preserve_exports,
domains) are now capped at 1024 items and count fields (max_artifacts,
max_files, max_total_bytes, max_targets, offset) declare integer: true, which
the validator enforces with the existing -32602 contract.
Fractional drift thresholds stay accepted: same_threshold / different_threshold
are drift scores, not counts, and rejecting them would refuse a legitimate call.
bla_harden, bla_defend and bla_protect already refuse to rewrite existing files
until confirm_overwrite is true. bla_encrypt_strings and bla_bind_scope instead
wrote in place unconditionally, so an MCP client could clobber a user's
panel.html / license.cjs / entry without a confirmation step.
Both tools now resolve their planned outputs with a zero-write dry run, refuse
with the existing confirmation_required payload, and attach the same
writeReceipt contract once a write actually happens. Dry runs and runs that
write nothing stay confirmation-free.
Everything the report layer prints about a run comes from the tree it is
protecting, so a file name carrying `ESC]` or a raw C1 control character could
retarget the terminal that reports on it. `sanitizeTerminalText` now lives in
`src/core/terminal-text.ts`, the reporter imports and re-exports it, and every
formatter that renders artifact-derived text uses it — including
`formatPackagingGatesReport`, which is the formatter behind `bla lint` and was
the remaining hole.
Cut 3.4.1 for the optional WASM JS-loader sidecarEntangle hook and the
REA #11144 / #11181 catalog hygiene (JavaScript member-mutation work
allowance).
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).
AGENTS.md is the map an agent reads before touching this repo, and two
bullets had drifted again after the inventory sync in #198: the formats
bullet omitted dex-layout.ts and the deception bullet omitted
hypothesis-revision-decoy.ts.
Name both files and add a guard test that compares each bullet against
its directory, so the next shield lands with its inventory entry.
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.
* feat(doctor): probe model/BEAM/EVM shields and surface SQLite for subsystem parity
* fix(doctor): print the real readiness verdict, engine states and issues
README.md, STATE.md and the localized README each published a different
aggregate (639.5x vs 612.5x) and every per-target row in both benchmark tables
was stale. Refresh both tables and the aggregate line from a live run, and add
a guard that keeps the three surfaces equal and within 10% of the computed
showcase aggregate.
The guide had drifted from the code: it claimed 19 artifact formats where
detector.ts routes 26 (ArtifactFormat), listed 13 of the 27 files under
src/shields/formats/, omitted weave/, runtime/self-seal.ts and
javascript/node-runtime-carrier.ts, summarised src/engine/ as five files of
23, and listed 7 of the 31 MCP tools.
The 14-target showcase called protectTarget() without a seed, so every run
minted a fresh project seed via generateProjectSeed() (crypto.randomBytes) and
emitted different decoys. The aggregate token/cost multiplier therefore changed
run to run (observed 1065.9x-1068.7x on the same commit), which made the
published figures impossible to reproduce or guard.
runShowcaseBenchmark() now takes an optional seed and defaults to a fixed
showcase seed; the CLI passes --seed through, which it previously accepted and
silently ignored.