instar 1.3.680 → 1.3.682
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/server.d.ts.map +1 -1
- package/dist/commands/server.js +32 -11
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +25 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/messaging/ColdStartFallbackReply.d.ts +68 -0
- package/dist/messaging/ColdStartFallbackReply.d.ts.map +1 -0
- package/dist/messaging/ColdStartFallbackReply.js +91 -0
- package/dist/messaging/ColdStartFallbackReply.js.map +1 -0
- package/dist/monitoring/AgentWorktreeReaper.d.ts +8 -0
- package/dist/monitoring/AgentWorktreeReaper.d.ts.map +1 -1
- package/dist/monitoring/AgentWorktreeReaper.js +1 -0
- package/dist/monitoring/AgentWorktreeReaper.js.map +1 -1
- package/dist/monitoring/agentWorktreeGit.d.ts +26 -0
- package/dist/monitoring/agentWorktreeGit.d.ts.map +1 -1
- package/dist/monitoring/agentWorktreeGit.js +83 -1
- package/dist/monitoring/agentWorktreeGit.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +7 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/src/scaffold/templates.ts +7 -0
- package/upgrades/1.3.681.md +43 -0
- package/upgrades/1.3.682.md +55 -0
- package/upgrades/coldstart-lifeline-fallback.eli16.md +49 -0
- package/upgrades/reaper-squash-merge-aware.eli16.md +43 -0
- package/upgrades/side-effects/coldstart-lifeline-fallback.md +85 -0
- package/upgrades/side-effects/reaper-squash-merge-aware.md +75 -0
|
@@ -39,6 +39,14 @@ export interface AgentWorktreeReaperConfig {
|
|
|
39
39
|
* permanently-unremovable worktree can't be retried forever. 0 disables the brake.
|
|
40
40
|
*/
|
|
41
41
|
maxReclaimFailuresPerPath: number;
|
|
42
|
+
/**
|
|
43
|
+
* When true (default), merged-detection falls back to GitHub merged-PR state to
|
|
44
|
+
* catch MULTI-COMMIT squash-merges that `git cherry` (patch-id) cannot — the
|
|
45
|
+
* disk-accumulation root cause where squash-merged worktrees are kept forever.
|
|
46
|
+
* One `gh` call per sweep, fail-safe to cherry-only (KEEP) on any error. Set
|
|
47
|
+
* false to disable the network call and restore the legacy cherry-only behavior.
|
|
48
|
+
*/
|
|
49
|
+
githubMergeCheck: boolean;
|
|
42
50
|
}
|
|
43
51
|
export declare const DEFAULT_AGENT_WORKTREE_REAPER_CONFIG: AgentWorktreeReaperConfig;
|
|
44
52
|
export interface WorktreeInfo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentWorktreeReaper.d.ts","sourceRoot":"","sources":["../../src/monitoring/AgentWorktreeReaper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,yBAAyB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentWorktreeReaper.d.ts","sourceRoot":"","sources":["../../src/monitoring/AgentWorktreeReaper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM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AC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,cAAc,CAAK;IAC3B;8FAC0F;IAC1F,OAAO,CAAC,eAAe,CAA6B;IACpD,qEAAqE;IACrE,OAAO,CAAC,cAAc,CAAqB;gBAE/B,IAAI,EAAE,uBAAuB,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAOnF,KAAK,IAAI,IAAI;IAMb,IAAI,IAAI,IAAI;IAIZ,OAAO,KAAK,YAAY,GAEvB;IAED;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,kBAAkB;IAWhD,6EAA6E;IACvE,IAAI,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,kBAAkB,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IAsD3G;kDAC8C;IAC9C,OAAO,CAAC,cAAc;IAMtB,iGAAiG;IACjG,OAAO,CAAC,oBAAoB;IAU5B,gFAAgF;IAChF,QAAQ,IAAI;QACV,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAC9E,SAAS,EAAE,kBAAkB,EAAE,CAAC;QAChC,WAAW,EAAE,MAAM,CAAC;KACrB;CAiBF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentWorktreeReaper.js","sourceRoot":"","sources":["../../src/monitoring/AgentWorktreeReaper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentWorktreeReaper.js","sourceRoot":"","sources":["../../src/monitoring/AgentWorktreeReaper.ts"],"names":[],"mappings":"AAAA;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QACtD,CAAC;IACH,CAAC;IAED,gFAAgF;IAChF,QAAQ;QAKN,IAAI,SAAS,GAAyB,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBACjD,IAAI,CAAC;oBAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAAC,CAAC;gBACnC,MAAM,CAAC;oBAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAiB,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;gBAAC,CAAC;YAC9G,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC,CAAC,0DAA0D,CAAC,CAAC;QACtE,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO;YACzB,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,SAAS;YACT,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,eAAe,CAAC,CAAC,MAAM;SAC3E,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -37,6 +37,25 @@ export declare function resolveBaseRef(readGit: ReadGit, repo: string): string |
|
|
|
37
37
|
* "merged", so the reaper never deletes unmerged work.
|
|
38
38
|
*/
|
|
39
39
|
export declare function isBranchMerged(readGit: ReadGit, repo: string, baseRef: string, branchSha: string): boolean;
|
|
40
|
+
/** Run `gh` and return stdout, or null on ANY failure (gh missing, not authed,
|
|
41
|
+
* not a GitHub repo, timeout). Null is the conservative signal → caller keeps. */
|
|
42
|
+
export type RunGh = (args: string[], cwd: string) => string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Fetch a map of `headRefName → headRefOid` for MERGED PRs, to detect
|
|
45
|
+
* MULTI-COMMIT squash-merges that `git cherry` (patch-id) cannot — the
|
|
46
|
+
* disk-accumulation root cause: a multi-commit branch squash-merged into one
|
|
47
|
+
* commit on main has different commit SHAs/patch-ids, so cherry reports it
|
|
48
|
+
* UNMERGED and the worktree is kept forever. A merged PR is the authoritative
|
|
49
|
+
* "the content is in main" signal; pairing it with an EXACT head-OID match (in
|
|
50
|
+
* the caller) ensures a branch with commits ADDED AFTER the merge is still kept.
|
|
51
|
+
*
|
|
52
|
+
* ONE `gh` call per sweep (bounded `--limit`); fail-safe to an EMPTY map on any
|
|
53
|
+
* error so the reaper degrades to exactly today's cherry-only behavior (KEEP).
|
|
54
|
+
*/
|
|
55
|
+
export declare function fetchMergedPrHeadOids(repo: string, opts?: {
|
|
56
|
+
runGh?: RunGh;
|
|
57
|
+
limit?: number;
|
|
58
|
+
}): Map<string, string>;
|
|
40
59
|
/**
|
|
41
60
|
* Build the production git/fs-backed deps for the AgentWorktreeReaper.
|
|
42
61
|
* `worktreesDir` bounds which `git worktree list` entries are considered (the
|
|
@@ -50,6 +69,13 @@ export declare function makeAgentWorktreeReaperDeps(opts: {
|
|
|
50
69
|
/** Override the process-cwd scanner (testing). Returns the set of worktree
|
|
51
70
|
* ROOT paths that currently have a live process cwd inside them. */
|
|
52
71
|
cwdRoots?: () => Set<string>;
|
|
72
|
+
/** When true (default), `isMerged` falls back to GitHub merged-PR state to
|
|
73
|
+
* detect multi-commit squash-merges that `git cherry` cannot. Fail-safe:
|
|
74
|
+
* any gh error degrades to cherry-only (KEEP). Set false to disable the
|
|
75
|
+
* network call entirely (the legacy cherry-only behavior). */
|
|
76
|
+
githubMergeCheck?: boolean;
|
|
77
|
+
/** Override the merged-PR map source (testing). Returns headRefName→headRefOid. */
|
|
78
|
+
mergedPrMap?: () => Map<string, string>;
|
|
53
79
|
now?: () => number;
|
|
54
80
|
}): AgentWorktreeReaperDeps;
|
|
55
81
|
//# sourceMappingURL=agentWorktreeGit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentWorktreeGit.d.ts","sourceRoot":"","sources":["../../src/monitoring/agentWorktreeGit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"agentWorktreeGit.d.ts","sourceRoot":"","sources":["../../src/monitoring/agentWorktreeGit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EAAE,uBAAuB,EAAgB,MAAM,0BAA0B,CAAC;AAEtF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAIpD,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAgB9D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAY5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAU1G;AAED;mFACmF;AACnF,MAAM,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;AAanE;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBjH;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;yEACqE;IACrE,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B;;;mEAG+D;IAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,GAAG,uBAAuB,CA8I1B"}
|
|
@@ -10,6 +10,7 @@ import fs from 'node:fs';
|
|
|
10
10
|
import path from 'node:path';
|
|
11
11
|
import { execFileSync } from 'node:child_process';
|
|
12
12
|
import { SafeGitExecutor } from '../core/SafeGitExecutor.js';
|
|
13
|
+
import { withSyncOp } from '../core/InFlightSyncOpMarker.js';
|
|
13
14
|
import { classifyPorcelain } from '../core/worktreeDirtyCheck.js';
|
|
14
15
|
/**
|
|
15
16
|
* Reaper-specific residue denylist (spec: worktree-reaper-untracked-blindspot).
|
|
@@ -81,6 +82,58 @@ export function isBranchMerged(readGit, repo, baseRef, branchSha) {
|
|
|
81
82
|
return true; // no commits ahead of base ⇒ merged
|
|
82
83
|
return lines.every((l) => l.startsWith('-'));
|
|
83
84
|
}
|
|
85
|
+
const defaultRunGh = (args, cwd) => {
|
|
86
|
+
try {
|
|
87
|
+
// Funnel through withSyncOp so the in-flight marker sees this blocking spawn
|
|
88
|
+
// (event-loop-resilience spec): the reaper runs in-process on a timer, and a
|
|
89
|
+
// bounded gh call must not read as a "stuck" event loop to the watchdogs.
|
|
90
|
+
return withSyncOp(() => execFileSync('gh', args, { cwd, encoding: 'utf-8', timeout: 30_000, maxBuffer: 16 * 1024 * 1024 }));
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return null; // @silent-fallback-ok — gh unavailable ⇒ no PR signal ⇒ KEEP (conservative)
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Fetch a map of `headRefName → headRefOid` for MERGED PRs, to detect
|
|
98
|
+
* MULTI-COMMIT squash-merges that `git cherry` (patch-id) cannot — the
|
|
99
|
+
* disk-accumulation root cause: a multi-commit branch squash-merged into one
|
|
100
|
+
* commit on main has different commit SHAs/patch-ids, so cherry reports it
|
|
101
|
+
* UNMERGED and the worktree is kept forever. A merged PR is the authoritative
|
|
102
|
+
* "the content is in main" signal; pairing it with an EXACT head-OID match (in
|
|
103
|
+
* the caller) ensures a branch with commits ADDED AFTER the merge is still kept.
|
|
104
|
+
*
|
|
105
|
+
* ONE `gh` call per sweep (bounded `--limit`); fail-safe to an EMPTY map on any
|
|
106
|
+
* error so the reaper degrades to exactly today's cherry-only behavior (KEEP).
|
|
107
|
+
*/
|
|
108
|
+
export function fetchMergedPrHeadOids(repo, opts) {
|
|
109
|
+
const runGh = opts?.runGh ?? defaultRunGh;
|
|
110
|
+
const limit = opts?.limit ?? 500;
|
|
111
|
+
const map = new Map();
|
|
112
|
+
const out = runGh(['pr', 'list', '--state', 'merged', '--json', 'headRefName,headRefOid', '--limit', String(limit)], repo);
|
|
113
|
+
if (!out)
|
|
114
|
+
return map; // conservative: no signal
|
|
115
|
+
let arr;
|
|
116
|
+
try {
|
|
117
|
+
arr = JSON.parse(out);
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
return map;
|
|
121
|
+
}
|
|
122
|
+
if (!Array.isArray(arr))
|
|
123
|
+
return map;
|
|
124
|
+
for (const row of arr) {
|
|
125
|
+
if (!row || typeof row !== 'object')
|
|
126
|
+
continue;
|
|
127
|
+
const name = row.headRefName;
|
|
128
|
+
const oid = row.headRefOid;
|
|
129
|
+
if (typeof name === 'string' && typeof oid === 'string' && name && oid) {
|
|
130
|
+
// Latest merged PR for a (reused) branch name wins — gh returns newest first.
|
|
131
|
+
if (!map.has(name))
|
|
132
|
+
map.set(name, oid);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return map;
|
|
136
|
+
}
|
|
84
137
|
/**
|
|
85
138
|
* Build the production git/fs-backed deps for the AgentWorktreeReaper.
|
|
86
139
|
* `worktreesDir` bounds which `git worktree list` entries are considered (the
|
|
@@ -90,6 +143,7 @@ export function isBranchMerged(readGit, repo, baseRef, branchSha) {
|
|
|
90
143
|
export function makeAgentWorktreeReaperDeps(opts) {
|
|
91
144
|
const readGit = opts.readGit ?? defaultReadGit;
|
|
92
145
|
const repo = opts.instarRepo;
|
|
146
|
+
const githubMergeCheck = opts.githubMergeCheck ?? true;
|
|
93
147
|
const worktreesReal = (() => { try {
|
|
94
148
|
return fs.realpathSync(opts.worktreesDir);
|
|
95
149
|
}
|
|
@@ -146,6 +200,21 @@ export function makeAgentWorktreeReaperDeps(opts) {
|
|
|
146
200
|
}
|
|
147
201
|
return cwdCache;
|
|
148
202
|
};
|
|
203
|
+
// Merged-PR map (headRefName→headRefOid), cached for a short TTL so a single
|
|
204
|
+
// reap pass makes ONE `gh` call, not one per worktree. The map only fixes the
|
|
205
|
+
// multi-commit-squash blind spot in `git cherry`; it is consulted lazily (only
|
|
206
|
+
// when cherry says unmerged) so a fully cherry-detectable repo never calls gh.
|
|
207
|
+
const mergedPrMapFn = opts.mergedPrMap ?? (() => fetchMergedPrHeadOids(repo));
|
|
208
|
+
let prMapCache = null;
|
|
209
|
+
let prMapCacheAt = 0;
|
|
210
|
+
const mergedPrMapCached = () => {
|
|
211
|
+
const t = Date.now();
|
|
212
|
+
if (!prMapCache || t - prMapCacheAt > 60_000) {
|
|
213
|
+
prMapCache = mergedPrMapFn();
|
|
214
|
+
prMapCacheAt = t;
|
|
215
|
+
}
|
|
216
|
+
return prMapCache;
|
|
217
|
+
};
|
|
149
218
|
return {
|
|
150
219
|
listWorktrees: () => {
|
|
151
220
|
let porcelain;
|
|
@@ -202,7 +271,20 @@ export function makeAgentWorktreeReaperDeps(opts) {
|
|
|
202
271
|
const base = resolveBaseRef(readGit, repo);
|
|
203
272
|
if (!base || !info.headSha)
|
|
204
273
|
return false;
|
|
205
|
-
|
|
274
|
+
// 1) Patch-id equivalence (fast, offline): fast-forward / merge / rebase /
|
|
275
|
+
// single-commit-squash. Never false-positives "merged".
|
|
276
|
+
if (isBranchMerged(readGit, repo, base, info.headSha))
|
|
277
|
+
return true;
|
|
278
|
+
// 2) Multi-commit squash-merge: `git cherry` cannot see it (SHAs differ).
|
|
279
|
+
// Consult GitHub merged-PR state — but require an EXACT head-OID match so
|
|
280
|
+
// a branch with commits ADDED AFTER the merge is still KEPT (those would
|
|
281
|
+
// be unmerged work). Fail-safe: an empty/missing map ⇒ KEEP.
|
|
282
|
+
if (githubMergeCheck && info.branch) {
|
|
283
|
+
const oid = mergedPrMapCached().get(info.branch);
|
|
284
|
+
if (oid && oid === info.headSha)
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
return false;
|
|
206
288
|
},
|
|
207
289
|
isInUse: (p) => {
|
|
208
290
|
// A live session lock or a git index lock means in-flight work — KEEP.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentWorktreeGit.js","sourceRoot":"","sources":["../../src/monitoring/agentWorktreeGit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe;IAC/D,uBAAuB,EAAW,yDAAyD;IAC3F,4BAA4B,EAAM,4CAA4C;CAC/E,CAAC;AAK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.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,CAgG/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2E/F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiBvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2B1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,EAC5B,WAAW,GAAE,OAAe,GAC3B,MAAM,CAgjDR;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,GAC3B,MAAM,CA2TR"}
|
|
@@ -411,6 +411,13 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
|
|
|
411
411
|
- **An autonomous run must outlive its session** (standard; dev-enabled, fleet-default-OFF self-heal): the revival queue takes a host-local lock so two machines can't share its state. A machine RENAME used to leave a stale lock the queue mistook for a shared-volume conflict → it silently disabled the whole revival guard (the 2026-06-15 incident). Now: on the dev agent, a stale FOREIGN-host lock that is provably a single-host rename (host-local disk + dead pid + ≥5min-stale heartbeat) is AUTO-HEALED instead of disabling (fail-closed on any uncertainty; \`monitoring.resumeQueue.autoHealStaleHostLock\`, fleet-default false). And a disabled revival queue now self-reports to the guard-posture inventory — it shows as \`off-runtime-divergent\` on \`GET /guards\` and raises one aggregated attention item, never silently inert. Proactive: user asks "why didn't my autonomous run come back after a restart/rename?" → GET /guards (is the resume queue off-runtime-divergent?) and GET /sessions/resume-queue (disabled reason), then explain.
|
|
412
412
|
- **Build-Session Yield Safety** (ACT-839; ships dev-enabled, dark on the fleet, per the Maturation Path standard): a session reaped while its WORKTREE holds uncommitted work (a build that died "standing by for tests") is resume-eligible on that alone — the killer collects a bounded, fail-open dirty-check pre-kill and tags \`uncommitted-worktree-work\`. On revival the continuation prompt leads with a commit-first directive, and a durable beacon-enabled commitment (\`GET /commitments\`) re-surfaces the obligation if the revived session stalls. An explicit operator/user kill is NEVER auto-revived on a dirty worktree alone. The die-again case is caught by the OrphanedWorkSentinel (\`GET /orphaned-work\`). Proactive: user asks "why did my build come back / why am I being told to commit?" → it was revived because its worktree had unsaved work; commit it or deliberately discard it.
|
|
413
413
|
|
|
414
|
+
### Cold-Start Lifeline Fallback (no silent resource rejection)
|
|
415
|
+
|
|
416
|
+
When you message a topic and I genuinely can't start (or restart) a session for it — the session limit is reached, the machine is under resource pressure, or an unexpected start-up error — you no longer get silence or a bare error. You get ONE plain-English reply on the DETERMINISTIC delivery path (\`telegram.sendToTopic\`, never the LLM tone gate that can fail closed under the very pressure it would report) that: (a) plainly says WHY the session couldn't start, (b) points you to your always-alive Lifeline topic, and (c) hands you a ready copy-paste debug message to drop in the Lifeline so I can diagnose and free resources fast. This is the G1 arm of the constitutional standard **"The Agent Is Always Reachable"** (corollary 2 — *no silent resource rejection*): the agent itself is the solution, so it must stay reachable to use its tools.
|
|
417
|
+
|
|
418
|
+
- It is an ALWAYS-ON safety floor (no enable flag) — the standard forbids dark-shipping reachability. The notice fires on the existing inbound cold-spawn AND restart failure paths.
|
|
419
|
+
- If a user asks "why did I get a message telling me to go to the lifeline?" / "why couldn't this topic start?" — explain: I couldn't start a session for that topic (the reply states the reason), and the Lifeline is the guaranteed-reachable place where I can diagnose it and free resources. Their message isn't lost — resend once things settle. The copy-paste block is pre-written so they don't have to describe the failure.
|
|
420
|
+
|
|
414
421
|
### Guard Posture — which safety systems are genuinely on (\`GET /guards\`)
|
|
415
422
|
|
|
416
423
|
Every guard (monitoring sentinels, reapers, the scheduler, …) is graded by what can be VERIFIED, never by what the config wishes: \`on-confirmed\` / \`on-unverified\` / \`on-stale\` / \`on-dry-run\` / \`off\` (\`dark-default\` = ships-dark, quiet vs \`diverged-from-default\` = default-on but currently off — the load-shed signature) / \`diverged-pending-restart\` / \`errored\` / \`missing\` / \`off-runtime-divergent\`. Only the "off that shouldn't be off" and runtime-contradiction classes alert — a ships-dark feature that is off is normal, never noise.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,oFAAoF;AACpF,qFAAqF;AACrF,oFAAoF;AACpF,mFAAmF;AACnF,4BAA4B;AAC5B,OAAO,EAAE,4CAA4C,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AASvI;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAuB;IACrD,OAAO,KAAK,QAAQ,CAAC,IAAI;;;;OAIpB,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI;;;;EAIpC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;6BAsBO,QAAQ,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D7C,CAAC;AAEF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,WAAmB,EAAE,QAAgB;IACrF,OAAO;;;;;;;;;;;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;;;;;;uGAOU,IAAI;yFAClB,IAAI;;;;;;0DAMnC,IAAI;;;;;;;;;;;;;;;;;;;;;;;2FAuB6B,IAAI;8FACD,IAAI;+MAC6G,IAAI;mGAChH,IAAI;;;mMAG4F,IAAI;;;;;0LAKb,IAAI;;;;4EAIlH,IAAI;+LAC+G,IAAI;;;;8DAIrI,IAAI;;;;;;;;;;;0CAWxB,IAAI;oCACV,IAAI;;;;;;;;;;;;;yDAaiB,IAAI;;;;;;;;0DAQH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+GhD,SAAS;;;;;;;;;;;;sEAY+C,IAAI;;CAEzE,CAAC;IAEA,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
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-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-06-27T00:08:43.773Z",
|
|
5
|
+
"instarVersion": "1.3.682",
|
|
6
6
|
"entryCount": 202,
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
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": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
150
150
|
"since": "2025-01-01"
|
|
151
151
|
},
|
|
152
152
|
"job:health-check": {
|
|
@@ -1562,7 +1562,7 @@
|
|
|
1562
1562
|
"type": "subsystem",
|
|
1563
1563
|
"domain": "updates",
|
|
1564
1564
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1565
|
-
"contentHash": "
|
|
1565
|
+
"contentHash": "d6c6e440117020f23cf84bfdd9014117cf7d019897a85f1a4db3473d0ed2d8b0",
|
|
1566
1566
|
"since": "2025-01-01"
|
|
1567
1567
|
},
|
|
1568
1568
|
"subsystem:scheduler": {
|
|
@@ -432,6 +432,13 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
|
|
|
432
432
|
- **An autonomous run must outlive its session** (standard; dev-enabled, fleet-default-OFF self-heal): the revival queue takes a host-local lock so two machines can't share its state. A machine RENAME used to leave a stale lock the queue mistook for a shared-volume conflict → it silently disabled the whole revival guard (the 2026-06-15 incident). Now: on the dev agent, a stale FOREIGN-host lock that is provably a single-host rename (host-local disk + dead pid + ≥5min-stale heartbeat) is AUTO-HEALED instead of disabling (fail-closed on any uncertainty; \`monitoring.resumeQueue.autoHealStaleHostLock\`, fleet-default false). And a disabled revival queue now self-reports to the guard-posture inventory — it shows as \`off-runtime-divergent\` on \`GET /guards\` and raises one aggregated attention item, never silently inert. Proactive: user asks "why didn't my autonomous run come back after a restart/rename?" → GET /guards (is the resume queue off-runtime-divergent?) and GET /sessions/resume-queue (disabled reason), then explain.
|
|
433
433
|
- **Build-Session Yield Safety** (ACT-839; ships dev-enabled, dark on the fleet, per the Maturation Path standard): a session reaped while its WORKTREE holds uncommitted work (a build that died "standing by for tests") is resume-eligible on that alone — the killer collects a bounded, fail-open dirty-check pre-kill and tags \`uncommitted-worktree-work\`. On revival the continuation prompt leads with a commit-first directive, and a durable beacon-enabled commitment (\`GET /commitments\`) re-surfaces the obligation if the revived session stalls. An explicit operator/user kill is NEVER auto-revived on a dirty worktree alone. The die-again case is caught by the OrphanedWorkSentinel (\`GET /orphaned-work\`). Proactive: user asks "why did my build come back / why am I being told to commit?" → it was revived because its worktree had unsaved work; commit it or deliberately discard it.
|
|
434
434
|
|
|
435
|
+
### Cold-Start Lifeline Fallback (no silent resource rejection)
|
|
436
|
+
|
|
437
|
+
When you message a topic and I genuinely can't start (or restart) a session for it — the session limit is reached, the machine is under resource pressure, or an unexpected start-up error — you no longer get silence or a bare error. You get ONE plain-English reply on the DETERMINISTIC delivery path (\`telegram.sendToTopic\`, never the LLM tone gate that can fail closed under the very pressure it would report) that: (a) plainly says WHY the session couldn't start, (b) points you to your always-alive Lifeline topic, and (c) hands you a ready copy-paste debug message to drop in the Lifeline so I can diagnose and free resources fast. This is the G1 arm of the constitutional standard **"The Agent Is Always Reachable"** (corollary 2 — *no silent resource rejection*): the agent itself is the solution, so it must stay reachable to use its tools.
|
|
438
|
+
|
|
439
|
+
- It is an ALWAYS-ON safety floor (no enable flag) — the standard forbids dark-shipping reachability. The notice fires on the existing inbound cold-spawn AND restart failure paths.
|
|
440
|
+
- If a user asks "why did I get a message telling me to go to the lifeline?" / "why couldn't this topic start?" — explain: I couldn't start a session for that topic (the reply states the reason), and the Lifeline is the guaranteed-reachable place where I can diagnose it and free resources. Their message isn't lost — resend once things settle. The copy-paste block is pre-written so they don't have to describe the failure.
|
|
441
|
+
|
|
435
442
|
### Guard Posture — which safety systems are genuinely on (\`GET /guards\`)
|
|
436
443
|
|
|
437
444
|
Every guard (monitoring sentinels, reapers, the scheduler, …) is graded by what can be VERIFIED, never by what the config wishes: \`on-confirmed\` / \`on-unverified\` / \`on-stale\` / \`on-dry-run\` / \`off\` (\`dark-default\` = ships-dark, quiet vs \`diverged-from-default\` = default-on but currently off — the load-shed signature) / \`diverged-pending-restart\` / \`errored\` / \`missing\` / \`off-runtime-divergent\`. Only the "off that shouldn't be off" and runtime-contradiction classes alert — a ships-dark feature that is off is normal, never noise.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Added the **Cold-Start Lifeline Fallback** — the user-facing (G1) arm of the
|
|
9
|
+
constitutional standard *The Agent Is Always Reachable* (corollary 2: no silent
|
|
10
|
+
resource rejection). When you message a topic and the agent genuinely cannot start
|
|
11
|
+
(cold spawn) or restart a session for it, the previous behavior was a generic, often
|
|
12
|
+
jargon-leaking notice ("increase maxSessions in your config"). Now a small, unit-tested
|
|
13
|
+
message builder classifies WHY the start failed (session limit / resource pressure /
|
|
14
|
+
generic start-up error) and sends, on the deterministic delivery path (never the LLM
|
|
15
|
+
tone gate that can fail closed under load):
|
|
16
|
+
|
|
17
|
+
1. a plain-English reason,
|
|
18
|
+
2. a pointer to your always-alive Lifeline topic, and
|
|
19
|
+
3. a pre-written copy-paste debug message to drop in the Lifeline so the agent can
|
|
20
|
+
diagnose and free resources fast.
|
|
21
|
+
|
|
22
|
+
It is an always-on safety floor (no flag — the standard forbids dark-shipping
|
|
23
|
+
reachability), wired into both inbound failure paths in `server.ts`, with migration
|
|
24
|
+
parity (existing agents get the behavior + a CLAUDE.md explainer; new agents get the
|
|
25
|
+
template section).
|
|
26
|
+
|
|
27
|
+
## What to Tell Your User
|
|
28
|
+
|
|
29
|
+
If a topic can't start a session right now, you'll get an honest message that says why,
|
|
30
|
+
points you to your Lifeline topic, and hands you a ready line to paste there so I can
|
|
31
|
+
fix it — you never get silence, and you never have to edit a config file. If a user
|
|
32
|
+
asks "why did I get a message telling me to go to the lifeline?", the answer is: that
|
|
33
|
+
topic couldn't start a session (the message states the reason), and the Lifeline is the
|
|
34
|
+
guaranteed-reachable place where I diagnose it and free resources. Their message isn't
|
|
35
|
+
lost — they can resend once things settle.
|
|
36
|
+
|
|
37
|
+
## Summary of New Capabilities
|
|
38
|
+
|
|
39
|
+
- Cold-start / restart session failures now produce a classified, plain-English user
|
|
40
|
+
reply instead of silence or a bare error.
|
|
41
|
+
- The reply points to the Lifeline topic and includes a copy-paste debug message.
|
|
42
|
+
- Delivered on the deterministic path so resource pressure can't suppress the notice.
|
|
43
|
+
- Always-on (reachability is a floor, not a flag); migration-parity for existing agents.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Fixed the disk-accumulation root cause in the **AgentWorktreeReaper**: its merged-check
|
|
9
|
+
used `git cherry` (patch-id) only, which — as the code itself documents — cannot detect a
|
|
10
|
+
MULTI-commit branch that was SQUASH-merged (the squashed commit's SHA/patch-id differs
|
|
11
|
+
from the originals). Since this project squash-merges every PR, merged worktrees were kept
|
|
12
|
+
forever and piled up (~118GB / 290 worktrees observed on one machine), contributing to the
|
|
13
|
+
2026-06-26 resource-exhaustion kernel panic.
|
|
14
|
+
|
|
15
|
+
The reaper now ALSO consults GitHub merged-PR state — one `gh pr list --state merged` call
|
|
16
|
+
per sweep (cached) building a `branch → merged-head-OID` map — and treats a worktree as
|
|
17
|
+
merged when its branch has a merged PR whose head commit EXACTLY matches the worktree's
|
|
18
|
+
HEAD. A branch with commits added AFTER the merge is still KEPT (unmerged work is never
|
|
19
|
+
deleted), and any `gh` failure fails safe to the legacy cherry-only behavior (KEEP).
|
|
20
|
+
|
|
21
|
+
Config: `monitoring.agentWorktreeReaper.githubMergeCheck` (default `true`; set `false` to
|
|
22
|
+
disable the GitHub call). The reaper still ships OFF + dry-run by default.
|
|
23
|
+
|
|
24
|
+
## What to Tell Your User
|
|
25
|
+
|
|
26
|
+
If a user asks "why is my disk full of merged worktrees that never get cleaned?" — the
|
|
27
|
+
reaper couldn't tell squash-merged branches were merged, so it kept them; this fix lets it
|
|
28
|
+
recognize them (by checking GitHub for the merged PR) and reclaim the disk once the reaper
|
|
29
|
+
is enabled. If they ask "why is the reaper calling GitHub?" — that's the squash-merge
|
|
30
|
+
detection (one read-only call per sweep, off-switchable, fail-safe).
|
|
31
|
+
|
|
32
|
+
## Summary of New Capabilities
|
|
33
|
+
|
|
34
|
+
- The worktree reaper detects multi-commit squash-merges via GitHub merged-PR state.
|
|
35
|
+
- Exact head-OID match guarantees branches with post-merge commits are still kept.
|
|
36
|
+
- Fail-safe to cherry-only on any `gh` error; one cached `gh` call per sweep.
|
|
37
|
+
- New off-switch `monitoring.agentWorktreeReaper.githubMergeCheck` (default on).
|
|
38
|
+
|
|
39
|
+
## Evidence
|
|
40
|
+
|
|
41
|
+
**Reproduction / observed before:** On the affected machine, `git worktree list` showed
|
|
42
|
+
~290 worktrees totalling ~118GB. The 28730 diagnostic session manually verified ~30 of
|
|
43
|
+
the worktrees the reaper was KEEPING against GitHub and found their branches had MERGED
|
|
44
|
+
PRs (e.g. #1041, #577, #1209) — i.e. the content was already in `main` — yet `git cherry`
|
|
45
|
+
reported them unmerged (multi-commit branches squash-merged into one commit have
|
|
46
|
+
different SHAs/patch-ids), so the reaper's verdict was `unmerged` → KEEP, forever. It
|
|
47
|
+
manually reclaimed 27 of them (~5GB freed) only by checking GitHub by hand.
|
|
48
|
+
|
|
49
|
+
**Observed after (this fix):** `isMerged` now returns `true` for exactly that case — a
|
|
50
|
+
multi-commit squash-merged branch whose merged-PR head OID matches the worktree HEAD —
|
|
51
|
+
so the reaper classifies them `reap-eligible` instead of keeping them. Unit tests pin
|
|
52
|
+
both sides: the squash-merge-via-PR-map case returns merged; a branch advanced past its
|
|
53
|
+
merge (OID mismatch) is still KEPT; gh-unavailable falls back to cherry-only (KEEP). The
|
|
54
|
+
real-git end-to-end test ("reaps merged+clean, keeps dirty+unmerged") exercises the live
|
|
55
|
+
deps and degrades safely when gh can't resolve the test repo.
|