instar 1.3.148 → 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/package.json +1 -1
- package/src/data/builtin-manifest.json +18 -18
- package/upgrades/1.3.149.md +64 -0
- package/upgrades/side-effects/boot-wrapper-version-managed-node-candidates.md +51 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-31T07:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-31T07:33:04.801Z",
|
|
5
|
+
"instarVersion": "1.3.149",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"domain": "identity",
|
|
12
12
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
13
13
|
"installedPath": ".instar/hooks/instar/session-start.sh",
|
|
14
|
-
"contentHash": "
|
|
14
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
15
15
|
"since": "2025-01-01"
|
|
16
16
|
},
|
|
17
17
|
"hook:dangerous-command-guard": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"domain": "safety",
|
|
21
21
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
22
22
|
"installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
|
|
23
|
-
"contentHash": "
|
|
23
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
24
24
|
"since": "2025-01-01"
|
|
25
25
|
},
|
|
26
26
|
"hook:grounding-before-messaging": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"domain": "safety",
|
|
30
30
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
31
31
|
"installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
|
|
32
|
-
"contentHash": "
|
|
32
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
33
33
|
"since": "2025-01-01"
|
|
34
34
|
},
|
|
35
35
|
"hook:compaction-recovery": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"domain": "identity",
|
|
39
39
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
40
40
|
"installedPath": ".instar/hooks/instar/compaction-recovery.sh",
|
|
41
|
-
"contentHash": "
|
|
41
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
42
42
|
"since": "2025-01-01"
|
|
43
43
|
},
|
|
44
44
|
"hook:external-operation-gate": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"domain": "safety",
|
|
48
48
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
49
49
|
"installedPath": ".instar/hooks/instar/external-operation-gate.js",
|
|
50
|
-
"contentHash": "
|
|
50
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
51
51
|
"since": "2025-01-01"
|
|
52
52
|
},
|
|
53
53
|
"hook:deferral-detector": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"domain": "safety",
|
|
57
57
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
58
58
|
"installedPath": ".instar/hooks/instar/deferral-detector.js",
|
|
59
|
-
"contentHash": "
|
|
59
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
60
60
|
"since": "2025-01-01"
|
|
61
61
|
},
|
|
62
62
|
"hook:post-action-reflection": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"domain": "evolution",
|
|
66
66
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
67
67
|
"installedPath": ".instar/hooks/instar/post-action-reflection.js",
|
|
68
|
-
"contentHash": "
|
|
68
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
69
69
|
"since": "2025-01-01"
|
|
70
70
|
},
|
|
71
71
|
"hook:external-communication-guard": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"domain": "safety",
|
|
75
75
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
76
76
|
"installedPath": ".instar/hooks/instar/external-communication-guard.js",
|
|
77
|
-
"contentHash": "
|
|
77
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
78
78
|
"since": "2025-01-01"
|
|
79
79
|
},
|
|
80
80
|
"hook:scope-coherence-collector": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"domain": "coherence",
|
|
84
84
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
85
85
|
"installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
|
|
86
|
-
"contentHash": "
|
|
86
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
87
87
|
"since": "2025-01-01"
|
|
88
88
|
},
|
|
89
89
|
"hook:scope-coherence-checkpoint": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"domain": "coherence",
|
|
93
93
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
94
94
|
"installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
|
|
95
|
-
"contentHash": "
|
|
95
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
96
96
|
"since": "2025-01-01"
|
|
97
97
|
},
|
|
98
98
|
"hook:free-text-guard": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"domain": "safety",
|
|
102
102
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
103
103
|
"installedPath": ".instar/hooks/instar/free-text-guard.sh",
|
|
104
|
-
"contentHash": "
|
|
104
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
105
105
|
"since": "2025-01-01"
|
|
106
106
|
},
|
|
107
107
|
"hook:claim-intercept": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"domain": "coherence",
|
|
111
111
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
112
112
|
"installedPath": ".instar/hooks/instar/claim-intercept.js",
|
|
113
|
-
"contentHash": "
|
|
113
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
114
114
|
"since": "2025-01-01"
|
|
115
115
|
},
|
|
116
116
|
"hook:claim-intercept-response": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"domain": "coherence",
|
|
120
120
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
121
121
|
"installedPath": ".instar/hooks/instar/claim-intercept-response.js",
|
|
122
|
-
"contentHash": "
|
|
122
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
123
123
|
"since": "2025-01-01"
|
|
124
124
|
},
|
|
125
125
|
"hook:stop-gate-router": {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"domain": "safety",
|
|
129
129
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
130
130
|
"installedPath": ".instar/hooks/instar/stop-gate-router.js",
|
|
131
|
-
"contentHash": "
|
|
131
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
132
132
|
"since": "2025-01-01"
|
|
133
133
|
},
|
|
134
134
|
"hook:auto-approve-permissions": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"domain": "safety",
|
|
138
138
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
139
139
|
"installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
|
|
140
|
-
"contentHash": "
|
|
140
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
141
141
|
"since": "2025-01-01"
|
|
142
142
|
},
|
|
143
143
|
"job:health-check": {
|
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
"type": "subsystem",
|
|
1490
1490
|
"domain": "updates",
|
|
1491
1491
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1492
|
-
"contentHash": "
|
|
1492
|
+
"contentHash": "09e2c3f8c4a1f7d579224923247e788bf1b90a79ecbc629c4598179cf534ffa2",
|
|
1493
1493
|
"since": "2025-01-01"
|
|
1494
1494
|
},
|
|
1495
1495
|
"subsystem:scheduler": {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
review-convergence: complete
|
|
3
|
+
approved: true
|
|
4
|
+
approved-by: echo (standing 12h deploy mandate, topic 13435; instar-codey node-ABI outage — deeper root)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Upgrade Guide — vNEXT
|
|
8
|
+
|
|
9
|
+
<!-- bump: patch -->
|
|
10
|
+
|
|
11
|
+
## What Changed — the boot wrapper can now heal back to an asdf/nvm node
|
|
12
|
+
|
|
13
|
+
This is the deeper root of the node-ABI outage that the previous release addressed
|
|
14
|
+
at the heal layer. When an agent's Node pointer drifts to a newer Node (e.g. after
|
|
15
|
+
a Homebrew upgrade installs Node 25) but its compiled database driver was built for
|
|
16
|
+
the older Node it had been using via a version manager (asdf / nvm), the boot
|
|
17
|
+
wrapper tries to "heal" by switching to a Node whose ABI matches the driver. But
|
|
18
|
+
its candidate list only looked at the standard system Node locations
|
|
19
|
+
(`/opt/homebrew/bin`, `/usr/local/bin`, `/usr/bin`) — it never looked at
|
|
20
|
+
asdf/nvm-managed Nodes. So the one Node that could load the driver was invisible to
|
|
21
|
+
it, and it self-healed FORWARD to the wrong ABI and got stuck. This took
|
|
22
|
+
instar-codey offline for hours.
|
|
23
|
+
|
|
24
|
+
The fix adds the system-resolved Node (`which node`, which resolves through
|
|
25
|
+
asdf/nvm shims) to the heal candidate list. It is purely additive — it only expands
|
|
26
|
+
a candidate pool that is already filtered to ABI-compatible nodes before selection,
|
|
27
|
+
so it cannot make a heal worse. A migration-parity marker bump regenerates the boot
|
|
28
|
+
wrapper on existing agents (including ones already stuck with the old script).
|
|
29
|
+
|
|
30
|
+
## Summary of New Capabilities
|
|
31
|
+
|
|
32
|
+
- The generated `instar-boot.cjs` node-heal now adds the PATH-resolved node
|
|
33
|
+
(`which node`) to its candidate list before the ABI-compatibility selection,
|
|
34
|
+
mirroring the already-correct `resolveNodeCandidates()` symlink-creation path.
|
|
35
|
+
- `PostUpdateMigrator.migrateBootWrapperAbiCheck` now requires both the ABI-check
|
|
36
|
+
marker AND the new version-managed-node marker; agents missing the new marker are
|
|
37
|
+
regenerated on update.
|
|
38
|
+
|
|
39
|
+
## What to Tell Your User
|
|
40
|
+
|
|
41
|
+
If you ever upgrade Node on the machine running your agent, the agent can now
|
|
42
|
+
recover its database engine on its own even when the Node it needs is one managed
|
|
43
|
+
by a version manager like asdf or nvm. Previously it only knew to look in the
|
|
44
|
+
standard system spots, so an agent could get stuck pointing at the wrong Node after
|
|
45
|
+
an upgrade. Nothing to configure — it applies on the next update, and agents that
|
|
46
|
+
were already stuck get the repair automatically.
|
|
47
|
+
|
|
48
|
+
## Evidence
|
|
49
|
+
|
|
50
|
+
- Root cause traced live in instar-codey logs: the boot wrapper self-healed the
|
|
51
|
+
node link forward to Homebrew Node 25 (ABI 141) while the better-sqlite3 binary
|
|
52
|
+
was ABI 127, with the matching asdf Node 22 absent from the candidate list.
|
|
53
|
+
- The already-correct `resolveNodeCandidates()` in the same file (setup.ts) was
|
|
54
|
+
confirmed to include `which node`; only the generated boot-wrapper template
|
|
55
|
+
lacked it.
|
|
56
|
+
- Unit: `tests/unit/PostUpdateMigrator-bootWrapperAbiCheck.test.ts` — new cases:
|
|
57
|
+
generated wrapper contains the `which node` discovery before the ABI loop
|
|
58
|
+
(cross-platform), regenerates when the new marker is absent (the codey case),
|
|
59
|
+
idempotent when both markers present.
|
|
60
|
+
- Regression: boot-wrapper cjs/plist + durable-node-selection + shadow-install
|
|
61
|
+
self-heal + launchd-handoff suites — 46 tests pass.
|
|
62
|
+
- `tsc --noEmit` clean; `npm run lint` clean.
|
|
63
|
+
- Spec: `docs/specs/boot-wrapper-version-managed-node-candidates.md` (+ `.eli16.md`).
|
|
64
|
+
- Side-effects: `upgrades/side-effects/boot-wrapper-version-managed-node-candidates.md`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Side-effects — Boot-wrapper version-managed node candidates
|
|
2
|
+
|
|
3
|
+
## 1. What files/state does this touch at runtime?
|
|
4
|
+
The generated `<stateDir>/instar-boot.cjs` (regenerated by `installBootWrapper`
|
|
5
|
+
when the PostUpdateMigrator detects the new marker is missing). At boot, the
|
|
6
|
+
wrapper's self-heal may additionally run `which node` and, if it resolves an
|
|
7
|
+
ABI-compatible node, repoint the `.instar/bin/node` symlink to it. No config,
|
|
8
|
+
schema, or other files.
|
|
9
|
+
|
|
10
|
+
## 2. Does it change any functional behavior?
|
|
11
|
+
Yes, narrowly + additively: the node-heal candidate pool now also includes the
|
|
12
|
+
PATH-resolved node (`which node` → asdf/nvm/volta). Selection is unchanged — the
|
|
13
|
+
existing ABI-compatibility loop still picks the candidate that can load the
|
|
14
|
+
existing better-sqlite3 binary. The only new outcome is: a heal that previously
|
|
15
|
+
had NO compatible candidate (and stayed on the wrong-ABI node) can now find the
|
|
16
|
+
version-managed node and heal correctly.
|
|
17
|
+
|
|
18
|
+
## 3. What happens on failure / non-darwin / no `which`?
|
|
19
|
+
- `which` missing or no node on PATH: the probe is wrapped in try/catch and
|
|
20
|
+
swallowed — the heal proceeds exactly as before with the well-known candidates.
|
|
21
|
+
- Non-darwin: the boot wrapper + its migration are darwin/launchd-specific; the
|
|
22
|
+
migration short-circuits with a `non-darwin` skip.
|
|
23
|
+
- A resolved node that can't load the module: skipped by the existing
|
|
24
|
+
ABI-compatibility loop, identical to any other incompatible candidate.
|
|
25
|
+
|
|
26
|
+
## 4. Migration parity — do existing agents get it?
|
|
27
|
+
Yes. `migrateBootWrapperAbiCheck` now requires BOTH the ABI-drift marker AND the
|
|
28
|
+
`version-managed node candidates` marker to consider a wrapper current; an install
|
|
29
|
+
missing the new marker (e.g. instar-codey) is regenerated via `installBootWrapper`
|
|
30
|
+
on its next update. Idempotent (both markers → skip). New agents get it at setup.
|
|
31
|
+
|
|
32
|
+
## 5. Could it spam / flood / burn resources?
|
|
33
|
+
No. The heal path runs only at boot and only when the current node fails the
|
|
34
|
+
better-sqlite3 load check (ABI drift) — the rare case. It adds at most one
|
|
35
|
+
`which node` exec (5s timeout) to that already-rare path. No loop, no network.
|
|
36
|
+
|
|
37
|
+
## 6. Rollback / off-switch?
|
|
38
|
+
Revert the PR. The marker bump means a reverted version would (correctly) see the
|
|
39
|
+
new marker as "extra" — the old sniff only required the ABI marker, so reverting
|
|
40
|
+
leaves existing regenerated wrappers working (they still contain the ABI marker).
|
|
41
|
+
No residual state, no flag.
|
|
42
|
+
|
|
43
|
+
## 7. Concurrency / ordering?
|
|
44
|
+
None new. The `which node` probe is a single synchronous exec inside the existing
|
|
45
|
+
single-threaded `selfHealNodeSymlink()`, before the ABI-compatibility loop.
|
|
46
|
+
|
|
47
|
+
## Blast radius
|
|
48
|
+
Small + additive on a critical path. Two source edits (`setup.ts` template +
|
|
49
|
+
`PostUpdateMigrator.ts` sniff) + test coverage. It only EXPANDS an already
|
|
50
|
+
ABI-filtered candidate pool, mirrors the already-correct `resolveNodeCandidates()`
|
|
51
|
+
in the same file, and cannot make a heal worse. Darwin/launchd-scoped.
|