Context
Follow-up of #16364 (the two-path install tier, PR #16389). The tier split prunes the Brain set from package-lock.json, so npm install --no-save better-sqlite3@12.11.1 … resolves the Brain transitive closure against live registry state — the same Git SHA can install different Brain graphs on different days. The three roots are exact-pinned in package.brain.json (that much landed in #16364); the ~108-entry closure (@huggingface/transformers, sharp, onnxruntime, prebuild-install chain, …) still floats.
Live latest-open sweep 2026-08-02 (20 newest): no equivalent found.
The Problem
Before the split, every dependency resolved through one committed lock: SHA → identical graph, which is what Vega's plane-rebuild receipts and CI reproducibility stand on. Post-split that invariant covers only the base tier. The Brain tier's closure floats — bounded (stable libraries) but real, and exactly the class that turns a plane receipt into a non-reproduction.
The Fix (shape, open to the implementer)
Give the Brain tier a commit-stable closure consumed by every arming path (installBrain.mjs, ai/deploy/Dockerfile, harness pack staging). Candidate shapes:
- A second lockfile (
package-lock.brain.json) generated by composing package.json + package.brain.json in a scratch manifest and refreshing it on Brain-set changes — the installer then installs from the frozen graph (e.g. materialize the composed manifest+lock in a temp overlay and npm ci it into root node_modules, or extract the resolved closure and npm install --no-save the exact list).
- A recorded-exact snapshot: the installer resolves once and commits the full exact specifier list it installed (weaker: pins versions installed then, not resolution now).
- Something npm-native the implementer defends.
Guard rails: the generation path must not use npm install --package-lock-only against the repo lock (whole-file reformat churn — the #16364 lesson); the refresh belongs in a lint/CI check that fails when package.brain.json and its lock disagree.
Acceptance Criteria
Related
- #16364 — the tier (parent)
- #16204 — the census (evidence base)
Origin Session ID: 69b4b2b4-9f78-40aa-a653-6bd93ddde065
Retrieval Hint: query_raw_memories("brain lockfile deterministic closure install tier float")
Context
Follow-up of #16364 (the two-path install tier, PR #16389). The tier split prunes the Brain set from
package-lock.json, sonpm install --no-save better-sqlite3@12.11.1 …resolves the Brain transitive closure against live registry state — the same Git SHA can install different Brain graphs on different days. The three roots are exact-pinned inpackage.brain.json(that much landed in #16364); the ~108-entry closure (@huggingface/transformers,sharp,onnxruntime,prebuild-installchain, …) still floats.Live latest-open sweep 2026-08-02 (20 newest): no equivalent found.
The Problem
Before the split, every dependency resolved through one committed lock: SHA → identical graph, which is what Vega's plane-rebuild receipts and CI reproducibility stand on. Post-split that invariant covers only the base tier. The Brain tier's closure floats — bounded (stable libraries) but real, and exactly the class that turns a plane receipt into a non-reproduction.
The Fix (shape, open to the implementer)
Give the Brain tier a commit-stable closure consumed by every arming path (
installBrain.mjs,ai/deploy/Dockerfile, harness pack staging). Candidate shapes:package-lock.brain.json) generated by composingpackage.json+package.brain.jsonin a scratch manifest and refreshing it on Brain-set changes — the installer then installs from the frozen graph (e.g. materialize the composed manifest+lock in a temp overlay andnpm ciit into rootnode_modules, or extract the resolved closure andnpm install --no-savethe exact list).Guard rails: the generation path must not use
npm install --package-lock-onlyagainst the repo lock (whole-file reformat churn — the #16364 lesson); the refresh belongs in a lint/CI check that fails whenpackage.brain.jsonand its lock disagree.Acceptance Criteria
npm lsclosure hashes).installBrain.mjsandai/deploy/Dockerfileconsume the same frozen closure.package.brain.jsonand the committed closure drift.GETTING_STARTED.mdBrain-path note + the installer JSDoc) name the determinism contract.Related
Origin Session ID: 69b4b2b4-9f78-40aa-a653-6bd93ddde065
Retrieval Hint:
query_raw_memories("brain lockfile deterministic closure install tier float")