instar 1.3.147 → 1.3.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +15 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +10 -3
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/memory/NativeModuleHealer.d.ts +17 -7
- package/dist/memory/NativeModuleHealer.d.ts.map +1 -1
- package/dist/memory/NativeModuleHealer.js +74 -28
- package/dist/memory/NativeModuleHealer.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +18 -18
- package/upgrades/1.3.148.md +68 -0
- package/upgrades/1.3.149.md +64 -0
- package/upgrades/side-effects/boot-wrapper-version-managed-node-candidates.md +51 -0
- package/upgrades/side-effects/remediator-heal-prebuilt-first.md +57 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Side-effects — Remediator better-sqlite3 heal: prebuilt-first
|
|
2
|
+
|
|
3
|
+
## 1. What files/state does this touch at runtime?
|
|
4
|
+
Only the better-sqlite3 native module under the agent's install prefix
|
|
5
|
+
(`<prefix>/node_modules/better-sqlite3/...`), and ONLY when the W-1
|
|
6
|
+
`supervisor-preflight` remediation runbook invokes
|
|
7
|
+
`NativeModuleHealer.healBetterSqlite3FromRemediator` — i.e. when a genuine
|
|
8
|
+
NODE_MODULE_VERSION ABI mismatch is detected. No config keys, no schema, no other
|
|
9
|
+
files. The post-rebuild sha256 is recorded in the existing in-line heal log
|
|
10
|
+
(unchanged behavior).
|
|
11
|
+
|
|
12
|
+
## 2. Does it change any functional behavior?
|
|
13
|
+
Yes, narrowly: the remediator heal now attempts the **prebuilt** (`npm install
|
|
14
|
+
better-sqlite3@<pinned> --no-save`) BEFORE the from-source compile (`npm rebuild
|
|
15
|
+
--build-from-source --ignore-scripts`), and pins the toolchain PATH to the running
|
|
16
|
+
Node's directory. Outcome on success is identical (a loadable, correct-ABI
|
|
17
|
+
module). The change makes the path able to heal on a box without a C++ toolchain,
|
|
18
|
+
which it previously could not.
|
|
19
|
+
|
|
20
|
+
## 3. What happens on failure / unwritable path / non-toolchain box?
|
|
21
|
+
- No toolchain: the prebuilt attempt heals it (the whole point). If the prebuilt
|
|
22
|
+
fetch also fails (e.g. no network / no prebuild for that ABI yet), it falls back
|
|
23
|
+
to the from-source compile exactly as before.
|
|
24
|
+
- Both attempts fail: returns `{outcome: 'failure', ...}` with the last npm
|
|
25
|
+
stderr tail — identical failure contract to before (the verify step decides
|
|
26
|
+
next action; nothing is bricked).
|
|
27
|
+
- Abort signal fires mid-heal: honoured at the top of each attempt; an
|
|
28
|
+
already-aborted signal short-circuits.
|
|
29
|
+
|
|
30
|
+
## 4. Migration parity — do existing agents get it?
|
|
31
|
+
Yes, automatically. This is shipped code in `dist/` — every agent picks it up on
|
|
32
|
+
its next instar update via the normal shadow-install. No PostUpdateMigrator change
|
|
33
|
+
needed (no agent-installed file/config/hook/skill is touched).
|
|
34
|
+
|
|
35
|
+
## 5. Could it spam / flood / burn resources?
|
|
36
|
+
No — the opposite. The prebuilt fetch (~2s) replaces a ~30s+ node-gyp compile as
|
|
37
|
+
the first attempt, and the path only runs on a real ABI mismatch (gated by the
|
|
38
|
+
remediator runbook + once-per-process guard). It does LESS CPU work than before,
|
|
39
|
+
and it stops the multi-hour launchd restart-loop that a non-healable path caused.
|
|
40
|
+
|
|
41
|
+
## 6. Rollback / off-switch?
|
|
42
|
+
Revert the PR. The two sibling heal paths are unaffected. No new flag, no residual
|
|
43
|
+
state. The whole remediator path is already gated behind the SelfHealingRemediator
|
|
44
|
+
(largely dark by default), so blast radius is small even before rollback.
|
|
45
|
+
|
|
46
|
+
## 7. Concurrency / ordering?
|
|
47
|
+
Unchanged from the prior implementation: a single spawnSync loop inside the
|
|
48
|
+
existing async method, honouring `ctx.abortSignal`. The once-per-process heal
|
|
49
|
+
guard (`healAttempted`) still prevents re-entry. No new shared state.
|
|
50
|
+
|
|
51
|
+
## Blast radius
|
|
52
|
+
Minimal + consistency-increasing. One method body in
|
|
53
|
+
`src/memory/NativeModuleHealer.ts` (+ two docstring corrections), mirroring two
|
|
54
|
+
already-shipped heal paths. Two unit tests updated/added; 96 healer/remediator
|
|
55
|
+
tests green. No route, sentinel, schema, config, or migration surface changes.
|
|
56
|
+
Spec note: relaxes the aspirational (unimplemented) §A45/§7.1 "build-from-source
|
|
57
|
+
preferred" stance — documented in the spec + V3 spec annotation for review.
|