Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: correct the measured parity counts and the last stale consumer lists

Adam Eivy211033e5171d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 2490f7f4d0..3ecf77d37c 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -24,7 +24,7 @@
- **The `ignore-scripts` supply-chain guard was silently inactive for every workspace install, including CI.** The repo-root `.npmrc` has pinned `ignore-scripts=true` for a while, but npm resolves the project `.npmrc` from the *local prefix* and never walks up the directory tree — so it never applied to `cd client && npm install`, `cd server && npm install`, or `npm ci --prefix server` / `--prefix client`, which is exactly what CI runs and what the documented per-workspace test workflow uses. In those paths every dependency kept an install-time code-execution slot: the same slot the August 2026 keyv/cacheable (Shai-Hulud) worm used, via a `preinstall` hook, to harvest credentials before any application code ran. `client/`, `server/`, `autofixer/`, and `browser/` now each carry their own `.npmrc`, so the guard holds in every workspace install path — whether entered by `cd`ing in or via `--prefix`.
- Closing the hole made the trusted-rebuild allowlist load-bearing for the first time, and it had drifted across its five copies (the root `setup` script, `scripts/ensure-deps.js`, `update.sh`, `update.ps1`, `setup.ps1`): the `esbuild` entries were dead — vite 8 dropped that dependency — while `onnxruntime-node` and `protobufjs` were missing entirely, so CI ran install hooks that the local setup skipped. All four now read one allowlist from `scripts/trusted-rebuilds.js`, and CI rebuilds it explicitly after installing server dependencies so `node-pty`'s native binding is still present for the smoke-boot. `scripts/trusted-rebuilds.test.js` fails if any workspace `.npmrc` loses the setting, or if a dependency shows up with an install hook nobody has decided about — the second case being how a missing native build otherwise surfaces much later as a confusing runtime crash.
+ Closing the hole made the trusted-rebuild allowlist load-bearing for the first time, and it had drifted across its five copies (the root `setup` script, `scripts/ensure-deps.js`, `update.sh`, `update.ps1`, `setup.ps1`): the `esbuild` entries were dead — vite 8 dropped that dependency — while `onnxruntime-node` and `protobufjs` were missing entirely, so CI ran install hooks that the local setup skipped. All five now read one allowlist from `scripts/trusted-rebuilds.js`, and CI rebuilds it explicitly after installing server dependencies so `node-pty`'s native binding is still present for the smoke-boot. `scripts/trusted-rebuilds.test.js` fails if any workspace `.npmrc` loses the setting, or if a dependency shows up with an install hook nobody has decided about — the second case being how a missing native build otherwise surfaces much later as a confusing runtime crash.
- **Release notes told fresh-clone users to run `npm install`, which cannot produce a working install.** The fallback release-notes template in `.github/workflows/release.yml` printed a `git clone` + `npm install` + `pm2 start` sequence, but a bare root `npm install` skips the client, server, and Autofixer workspaces, never initializes the bundled submodules, and does no data/database provisioning. It now points at `npm run install:all`, matching the README.
diff --git a/client/biome.jsonc b/client/biome.jsonc
index f0bf4ee30d..bdd58ae70b 100644
--- a/client/biome.jsonc
+++ b/client/biome.jsonc
@@ -58,11 +58,17 @@
// `recommended` preset is much broader; adopting it is a separate policy
// decision, not part of this migration.
//
- // KNOWN PARITY GAPS — this is a near-port, not a total one. Measured, not assumed:
- // * `no-cond-assign` and `no-empty` have only *broader* Biome analogues
- // (`noAssignInExpressions` ~400 hits, `noEmptyBlockStatements` ~705 hits on
- // today's src — mostly `while ((m = re.exec(s)))` and `() => {}` mocks), so
- // enabling them as-is would be a lint-policy change, not a port. Left off.
+ // KNOWN PARITY GAPS — this is a near-port, not a total one. Counts below are
+ // measured with `--max-diagnostics=none --reporter=json`, excluding
+ // `suppressions/unused` noise; Biome's default reporter caps at 20, so a bare
+ // `biome lint` undercounts and must not be used to re-derive these.
+ // * `no-empty` -> `noEmptyBlockStatements`: **705** violations today, nearly all
+ // `() => {}` test mocks and intentionally-empty catches. Enabling it is a
+ // lint-policy change, not a port. Left off.
+ // * `no-cond-assign` -> `noAssignInExpressions`: **22** violations, essentially
+ // all the idiomatic `while ((m = re.exec(s)))` loop. Small enough to be a
+ // reasonable follow-up (rewrite the 22 sites, then enable), but it is a source
+ // change unrelated to a dependency swap, so it is deliberately not bundled here.
// * No Biome equivalent exists for `no-invalid-regexp`, `no-useless-assignment`,
// `no-unexpected-multiline`, `no-delete-var`, or `no-empty-static-block`.
// Most are parse-level or moot in ESM.
diff --git a/scripts/ensure-deps.js b/scripts/ensure-deps.js
index fb8871a7c4..e48edd00ea 100644
--- a/scripts/ensure-deps.js
+++ b/scripts/ensure-deps.js
@@ -98,7 +98,8 @@ function cleanWorkspaceDeps(dir) {
}
// The trusted install-script allowlist lives in scripts/trusted-rebuilds.js —
-// shared with the root `setup` script and CI so the list has exactly one home.
+// shared with the root `setup` script, setup.ps1, update.sh, update.ps1 and CI so
+// the list has exactly one home.
// Every workspace pins `ignore-scripts=true` in its own .npmrc, so a plain
// `npm install` leaves these native deps unbuilt and the server crashes on a
// missing node-pty binding. Run after every (re)install — not just the
diff --git a/scripts/trusted-rebuilds.test.js b/scripts/trusted-rebuilds.test.js
index 2e6348d434..df0baa9873 100644
--- a/scripts/trusted-rebuilds.test.js
+++ b/scripts/trusted-rebuilds.test.js
@@ -171,8 +171,14 @@ describe('trusted rebuild allowlist', () => {
// The lockfile-driven twin of the test below. This one runs in EVERY CI job for
// EVERY workspace, installed or not, which is what closes the silent-skip hole.
it.each(WORKSPACES)('%s: every lockfile-declared install hook is accounted for', (label) => {
+ // Decide "no lockfile" from the file itself, not from the helper's `null` — the
+ // helper also returns `null` when the lockfile is unreadable or unparseable, so
+ // trusting its `null` would silently skip exactly the broken cases. This is the
+ // same vacuity trap called out for the node_modules twin below; do not collapse
+ // it back into `if (declared === null) return`.
+ if (!existsSync(join(workspaceDir(label), 'package-lock.json'))) return; // browser/ has no deps
const declared = lockfileInstallScriptPackages(label);
- if (declared === null) return; // no lockfile (browser/ has no dependencies)
+ expect(declared, `${label}/package-lock.json exists but could not be parsed`).not.toBeNull();
const allowed = new Set([
...(TRUSTED_REBUILDS[label] ?? []).flatMap((group) => group.pkgs),
...(DELIBERATELY_UNBUILT[label] ?? [])
diff --git a/update.ps1 b/update.ps1
index fa9252a801..1adee99c22 100644
--- a/update.ps1
+++ b/update.ps1
@@ -263,8 +263,9 @@ Safe-Install -Dir "autofixer" -Label "autofixer"
# Run trusted install scripts skipped by ignore-scripts=true in each workspace's
# .npmrc. The allowlist lives in scripts/trusted-rebuilds.js — a single home
-# shared with `npm run setup`, scripts/ensure-deps.js and CI, so a package can
-# never be granted an install-time execution slot in one path but not another.
+# shared with `npm run setup`, scripts/ensure-deps.js, setup.ps1, update.sh and CI,
+# so a package can never be granted an install-time execution slot in one path but
+# not another.
# Only the server needs rebuilds; client/autofixer have no install-script deps
# (vite 8 dropped the esbuild binary dependency that used to be the reason).
Write-SafeHost "🔧 Rebuilding trusted native dependencies..." -ForegroundColor Yellow
diff --git a/update.sh b/update.sh
index 2fabccca73..dcd849e5db 100755
--- a/update.sh
+++ b/update.sh
@@ -189,8 +189,9 @@ safe_install autofixer
# Run trusted install scripts skipped by ignore-scripts=true in each workspace's
# .npmrc. The allowlist lives in scripts/trusted-rebuilds.js — a single home
-# shared with `npm run setup`, scripts/ensure-deps.js and CI, so a package can
-# never be granted an install-time execution slot in one path but not another.
+# shared with `npm run setup`, scripts/ensure-deps.js, setup.ps1, update.ps1 and CI,
+# so a package can never be granted an install-time execution slot in one path but
+# not another.
# Only the server needs rebuilds; client/autofixer have no install-script deps
# (vite 8 dropped the esbuild binary dependency that used to be the reason).
log "🔧 Rebuilding trusted native dependencies..."