instar 1.3.350 → 1.3.351
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/core/InstarWorktreeManager.d.ts +19 -0
- package/dist/core/InstarWorktreeManager.d.ts.map +1 -1
- package/dist/core/InstarWorktreeManager.js +27 -0
- package/dist/core/InstarWorktreeManager.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +14 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +26 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/upgrades/{1.3.350.md → 1.3.351.md} +33 -0
- package/upgrades/side-effects/spotlight-resource-hygiene.md +45 -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-06-06T06:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-06-06T06:55:18.419Z",
|
|
5
|
+
"instarVersion": "1.3.351",
|
|
6
6
|
"entryCount": 199,
|
|
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": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
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": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
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": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
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": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
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": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
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": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
60
60
|
"since": "2025-01-01"
|
|
61
61
|
},
|
|
62
62
|
"hook:self-stop-guard": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"domain": "coherence",
|
|
66
66
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
67
67
|
"installedPath": ".instar/hooks/instar/self-stop-guard.js",
|
|
68
|
-
"contentHash": "
|
|
68
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
69
69
|
"since": "2025-01-01"
|
|
70
70
|
},
|
|
71
71
|
"hook:post-action-reflection": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"domain": "evolution",
|
|
75
75
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
76
76
|
"installedPath": ".instar/hooks/instar/post-action-reflection.js",
|
|
77
|
-
"contentHash": "
|
|
77
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
78
78
|
"since": "2025-01-01"
|
|
79
79
|
},
|
|
80
80
|
"hook:external-communication-guard": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"domain": "safety",
|
|
84
84
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
85
85
|
"installedPath": ".instar/hooks/instar/external-communication-guard.js",
|
|
86
|
-
"contentHash": "
|
|
86
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
87
87
|
"since": "2025-01-01"
|
|
88
88
|
},
|
|
89
89
|
"hook:scope-coherence-collector": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"domain": "coherence",
|
|
93
93
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
94
94
|
"installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
|
|
95
|
-
"contentHash": "
|
|
95
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
96
96
|
"since": "2025-01-01"
|
|
97
97
|
},
|
|
98
98
|
"hook:scope-coherence-checkpoint": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"domain": "coherence",
|
|
102
102
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
103
103
|
"installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
|
|
104
|
-
"contentHash": "
|
|
104
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
105
105
|
"since": "2025-01-01"
|
|
106
106
|
},
|
|
107
107
|
"hook:free-text-guard": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"domain": "safety",
|
|
111
111
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
112
112
|
"installedPath": ".instar/hooks/instar/free-text-guard.sh",
|
|
113
|
-
"contentHash": "
|
|
113
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
114
114
|
"since": "2025-01-01"
|
|
115
115
|
},
|
|
116
116
|
"hook:claim-intercept": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"domain": "coherence",
|
|
120
120
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
121
121
|
"installedPath": ".instar/hooks/instar/claim-intercept.js",
|
|
122
|
-
"contentHash": "
|
|
122
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
123
123
|
"since": "2025-01-01"
|
|
124
124
|
},
|
|
125
125
|
"hook:claim-intercept-response": {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"domain": "coherence",
|
|
129
129
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
130
130
|
"installedPath": ".instar/hooks/instar/claim-intercept-response.js",
|
|
131
|
-
"contentHash": "
|
|
131
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
132
132
|
"since": "2025-01-01"
|
|
133
133
|
},
|
|
134
134
|
"hook:stop-gate-router": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"domain": "safety",
|
|
138
138
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
139
139
|
"installedPath": ".instar/hooks/instar/stop-gate-router.js",
|
|
140
|
-
"contentHash": "
|
|
140
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
141
141
|
"since": "2025-01-01"
|
|
142
142
|
},
|
|
143
143
|
"hook:auto-approve-permissions": {
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"domain": "safety",
|
|
147
147
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
148
148
|
"installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
|
|
149
|
-
"contentHash": "
|
|
149
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
150
150
|
"since": "2025-01-01"
|
|
151
151
|
},
|
|
152
152
|
"job:health-check": {
|
|
@@ -1538,7 +1538,7 @@
|
|
|
1538
1538
|
"type": "subsystem",
|
|
1539
1539
|
"domain": "updates",
|
|
1540
1540
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1541
|
-
"contentHash": "
|
|
1541
|
+
"contentHash": "523899adda3f26a840f9559afd1b79fdc6088ebeaffe1e07d142fdb8133bc5b7",
|
|
1542
1542
|
"since": "2025-01-01"
|
|
1543
1543
|
},
|
|
1544
1544
|
"subsystem:scheduler": {
|
|
@@ -23,6 +23,16 @@ The route now injects both as read-only helpers (`gh pr view` and
|
|
|
23
23
|
project's target repo. A wiring-integrity test asserts the helper-absent
|
|
24
24
|
error can never recur.
|
|
25
25
|
|
|
26
|
+
macOS Spotlight (`mds_stores`) was a top constant CPU consumer on busy fleet
|
|
27
|
+
boxes because it re-indexed the Claude Code session transcripts on every turn —
|
|
28
|
+
~18 GB of JSONL that grows with every message. Instar already excluded
|
|
29
|
+
`.worktrees/` and `node_modules/` from Spotlight; this extends the same
|
|
30
|
+
`.metadata_never_index` exclusion to the agent's Claude transcript directory
|
|
31
|
+
(`~/.claude/projects/<encoded-agent-home>`), the largest churning set.
|
|
32
|
+
|
|
33
|
+
New `ensureClaudeTranscriptSpotlightExclusion()` helper + a `PostUpdateMigrator`
|
|
34
|
+
backfill so existing agents get the relief on their next update.
|
|
35
|
+
|
|
26
36
|
## What to Tell Your User
|
|
27
37
|
|
|
28
38
|
Nothing user-facing changes. This is foundation code (experimental) for the
|
|
@@ -35,6 +45,10 @@ work's pull request really merged (merge state, commit reachable on the
|
|
|
35
45
|
main branch, CI green) instead of always erroring out. Project status
|
|
36
46
|
finally tracks reality through the whole pipeline.
|
|
37
47
|
|
|
48
|
+
Nothing required — this is silent OS-level resource hygiene. If they've noticed
|
|
49
|
+
the Mac running hot, part of the cause was Spotlight endlessly re-indexing
|
|
50
|
+
session transcripts; this stops that going forward.
|
|
51
|
+
|
|
38
52
|
## Summary of New Capabilities
|
|
39
53
|
|
|
40
54
|
- `PrincipalGuard` (experimental, no runtime consumers yet): `establishOperator`,
|
|
@@ -45,6 +59,13 @@ finally tracks reality through the whole pipeline.
|
|
|
45
59
|
confirms the merge commit is reachable on `origin/main` before recording
|
|
46
60
|
the item as merged.
|
|
47
61
|
|
|
62
|
+
- `ensureClaudeTranscriptSpotlightExclusion()` — drops a `.metadata_never_index`
|
|
63
|
+
marker at the agent's Claude transcript dir so macOS Spotlight stops
|
|
64
|
+
re-indexing the constantly-appended JSONL session transcripts (~18GB churn).
|
|
65
|
+
- `PostUpdateMigrator` backfill — existing agents get the exclusion on their next
|
|
66
|
+
update; new agents get it once they have transcripts. Internal OS hygiene; no
|
|
67
|
+
agent-facing API or config surface.
|
|
68
|
+
|
|
48
69
|
## Evidence
|
|
49
70
|
|
|
50
71
|
Net-new capability. Verified by 13 unit tests including the incident-replay
|
|
@@ -56,3 +77,15 @@ clean `tsc --noEmit`.
|
|
|
56
77
|
GH_PR_VIEW_FAILED (not UNAVAILABLE), deterministic regardless of whether
|
|
57
78
|
gh is installed/authed. Full projects-api (45) + StageTransitionValidator
|
|
58
79
|
(26) green; tsc + destructive lint clean.
|
|
80
|
+
|
|
81
|
+
Unit + migration tests (both sides of every boundary: marker dropped when
|
|
82
|
+
transcripts exist, correct encoding, graceful no-op for a new agent, idempotent;
|
|
83
|
+
migration backfills/skips/idempotent). 15/15 green. `tsc --noEmit` clean.
|
|
84
|
+
Mirrors the existing node_modules/worktree exclusion pattern.
|
|
85
|
+
|
|
86
|
+
## Scope (honest)
|
|
87
|
+
|
|
88
|
+
This prevents FUTURE re-indexing. It does not instantly drop `mds_stores` —
|
|
89
|
+
Spotlight releases already-indexed content on its own schedule; forcing
|
|
90
|
+
immediate eviction needs a one-time `sudo mdutil -E ~/.claude/projects` the
|
|
91
|
+
operator runs. One of several resource-efficiency fixes (2026-06-06).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Side-Effects Review - Spotlight resource hygiene (Claude transcript exclusion)
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `spotlight-resource-hygiene`
|
|
4
|
+
**Date:** `2026-06-06`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `not required (Tier 1)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Extends Instar's existing macOS Spotlight exclusion (currently covers `.worktrees/` + `node_modules/`) to the agent's Claude Code transcript directory (`~/.claude/projects/<encoded-agent-home>`). The JSONL session transcripts grow on every turn and a busy fleet box accumulates ~18 GB of them — measured as the single largest `mds_stores` (Spotlight) CPU consumer (60-90% of a core, constantly), because Spotlight re-indexes each file on every append. Adds `ensureClaudeTranscriptSpotlightExclusion()` (reuses the generic marker-dropper) + a `PostUpdateMigrator` backfill.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `ensureClaudeTranscriptSpotlightExclusion(agentHome, claudeHome?)` (new, exported) — pure-ish: computes the encoded transcript dir, drops `.metadata_never_index` if the dir exists. Reuses `ensureWorktreeSpotlightExclusion` (the dir-agnostic dropper).
|
|
15
|
+
- `PostUpdateMigrator.migrateClaudeTranscriptSpotlightExclusion` (new, private) — runs the helper on every update, pushes an `upgraded`/`errors` entry.
|
|
16
|
+
- Wired into the migrate() sequence right after `migrateNodeModulesSpotlightExclusion`.
|
|
17
|
+
|
|
18
|
+
## 1. Behavior change / gating
|
|
19
|
+
|
|
20
|
+
NONE that affects message flow, sessions, or any gate. The only effect is writing one empty marker file into the agent's Claude transcript dir, which tells macOS Spotlight to stop indexing that subtree. No runtime behavior of the agent changes; instar's own transcript reads (TokenLedger) are unaffected (Spotlight indexing is orthogonal to file reads).
|
|
21
|
+
|
|
22
|
+
## 2. Over/under-signal
|
|
23
|
+
|
|
24
|
+
N/A — not a signal/gate. The only "decision" is whether the transcript dir exists (drop the marker) or not (skip). Both branches are covered.
|
|
25
|
+
|
|
26
|
+
## 3. Blast radius
|
|
27
|
+
|
|
28
|
+
Filesystem only, additive: writes `~/.claude/projects/<encoded>/.metadata_never_index`. This reaches OUTSIDE the agent home (into `~/.claude`), which is deliberate and bounded: (a) instar already READS that exact directory (TokenLedger/CompactionSentinel), so it is not new territory; (b) the path is scoped to THIS agent's own transcript dir via the home-path encoding, never all of `~/.claude/projects`; (c) the write is a single empty marker, idempotent, reversible. No state, no migration of data, no config. On a non-macOS host the marker is inert.
|
|
29
|
+
|
|
30
|
+
## 4. Failure modes
|
|
31
|
+
|
|
32
|
+
The underlying `ensureWorktreeSpotlightExclusion` swallows write errors (`@silent-fallback-ok`) and returns false — a failed marker write just means Spotlight keeps indexing (status quo), and can never block the migration or an update. `existsSync` guards the absent-dir case (brand-new agent, no sessions). The encoding is a pure string transform with no throw path.
|
|
33
|
+
|
|
34
|
+
## 5. Migration parity
|
|
35
|
+
|
|
36
|
+
Covered: the `PostUpdateMigrator` backfill means existing agents get the marker on their next update (the fast release cadence drops it within minutes once transcripts exist). New agents get it on their first post-session update. No agent-installed config/hooks/skills/CLAUDE.md change — this is internal OS hygiene with no agent-facing surface (consistent with the precedent: the node_modules + worktree exclusions also have no CLAUDE.md template line, as they are not capabilities the agent surfaces to a user). No init-path call is needed because the transcript dir does not exist at init time (no sessions yet) — it would no-op; the migration is the correct single mechanism.
|
|
37
|
+
|
|
38
|
+
## 6. Scope honesty (what this is NOT)
|
|
39
|
+
|
|
40
|
+
- This is fix 1 of 4 in the resource-efficiency initiative (Justin, 2026-06-06). It is the biggest single lever (the 18 GB transcript churn) but does NOT instantly drop `mds_stores`: the marker prevents FUTURE re-indexing; Spotlight releases already-indexed content on its own schedule, and forcing immediate eviction needs a one-time `sudo mdutil -E` the operator runs (instar cannot run sudo). The durable guarantee is that no agent keeps feeding the churn.
|
|
41
|
+
- `mediaanalysisd` (macOS media/photo analysis) is a separate high-CPU process NOT addressed here and likely not Instar-triggered.
|
|
42
|
+
|
|
43
|
+
## 7. Causal autopsy
|
|
44
|
+
|
|
45
|
+
Origin: **latent** (not a prior-PR regression). The transcript-indexing cost has existed since Claude Code began writing JSONL transcripts; the recent node_modules/worktree exclusion PRs addressed the static trees but never extended to the constantly-churning transcript set, which grounding showed is the larger consumer. This PR closes that gap by reusing the same marker mechanism. No behavior was broken by a prior change; an existing cost was simply never excluded.
|