instar 1.3.171 → 1.3.173
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/UpdateGate.d.ts.map +1 -1
- package/dist/core/UpdateGate.js +10 -1
- package/dist/core/UpdateGate.js.map +1 -1
- package/dist/monitoring/MentorStageA.d.ts +11 -0
- package/dist/monitoring/MentorStageA.d.ts.map +1 -1
- package/dist/monitoring/MentorStageA.js +40 -3
- package/dist/monitoring/MentorStageA.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.172.md +47 -0
- package/upgrades/1.3.173.md +47 -0
- package/upgrades/side-effects/mentor-agenda-coverage.md +44 -0
- package/upgrades/side-effects/update-gate-health-key-fix.md +69 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateGate.d.ts","sourceRoot":"","sources":["../../src/core/UpdateGate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,+DAA+D;IAC/D,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;I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AC,EAAE,kBAAkB,GAAG,IAAI,GACzC,UAAU;IAgEb;;;;;;;;;;OAUG;IACH,mBAAmB,CACjB,cAAc,EAAE,kBAAkB,EAClC,cAAc,CAAC,EAAE,kBAAkB,GAAG,IAAI,GACzC,MAAM,EAAE;IAMX;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IA4C/B,OAAO,CAAC,oBAAoB;IAO5B;;OAEG;IACH,SAAS,IAAI,gBAAgB;IAc7B;;;OAGG;IACH,sBAAsB,IAAI,OAAO;IAQjC;;;OAGG;IACH,sBAAsB,IAAI,OAAO;IAQjC;;OAEG;IACH,KAAK,IAAI,IAAI;CASd"}
|
package/dist/core/UpdateGate.js
CHANGED
|
@@ -119,7 +119,16 @@ export class UpdateGate {
|
|
|
119
119
|
nonBlockingJobSessions.push(session.name);
|
|
120
120
|
continue;
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
// Health is keyed by the tmux session name (the slug SessionMonitor
|
|
123
|
+
// tracks, e.g. "echo-codey-collaboration"), NOT the human-facing display
|
|
124
|
+
// name (e.g. "Codey Collaboration"). Look up by tmuxSession first, then
|
|
125
|
+
// fall back to name. Without the tmuxSession key, every interactive
|
|
126
|
+
// session misses the health map and hits the conservative "treat as
|
|
127
|
+
// active" default below — which silently turned the idle/dead exclusion
|
|
128
|
+
// into dead code and meant restart-when-idle (#41) never fired while ANY
|
|
129
|
+
// session existed (the day-long version-lag root cause).
|
|
130
|
+
const h = (session.tmuxSession ? healthMap.get(session.tmuxSession) : undefined) ??
|
|
131
|
+
healthMap.get(session.name);
|
|
123
132
|
if (!h) {
|
|
124
133
|
// No health data — be conservative, treat as active
|
|
125
134
|
activeSessions.push(session.name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateGate.js","sourceRoot":"","sources":["../../src/core/UpdateGate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAyEH,MAAM,OAAO,UAAU;IACb,MAAM,CAA6B;IACnC,iBAAi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QACpB,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;YACjC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC9B,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACjC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC9B,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -66,6 +66,17 @@ export interface ConversationSurface {
|
|
|
66
66
|
* passive-observe default). Sourced from `mentor.onboardingAgenda` config.
|
|
67
67
|
*/
|
|
68
68
|
onboardingAgenda?: string[];
|
|
69
|
+
/**
|
|
70
|
+
* Agenda items the mentor has ALREADY driven recently (matched against its own
|
|
71
|
+
* recent sent prompts). Stage A judges "already covered" only from the bounded
|
|
72
|
+
* `threadlineHistory` window, so once an assignment scrolls out the item looks
|
|
73
|
+
* fresh again and the mentor re-drives it — making the mentee re-verify the same
|
|
74
|
+
* capabilities on a loop (low-yield). This compact list survives the window so
|
|
75
|
+
* Stage A can PREFER not-yet-driven items, and choose observe-only when the whole
|
|
76
|
+
* agenda is recently covered (rather than mindlessly re-cycling). Surface-legitimate
|
|
77
|
+
* (the mentor's own assignment history) → included in surfaceText.
|
|
78
|
+
*/
|
|
79
|
+
recentlyDrivenAgenda?: string[];
|
|
69
80
|
}
|
|
70
81
|
export interface LeakResult {
|
|
71
82
|
/** True if Stage A referenced an internal it could not have seen from the surface. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorStageA.d.ts","sourceRoot":"","sources":["../../src/monitoring/MentorStageA.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAO,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"MentorStageA.d.ts","sourceRoot":"","sources":["../../src/monitoring/MentorStageA.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAO,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B;;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AAM,CAAC;CACrB,GAAG,mBAAmB,CAkCtB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,CAkBnF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAkBvF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAYrG"}
|
|
@@ -87,6 +87,14 @@ export function buildStageAContext(surface) {
|
|
|
87
87
|
const agendaLines = hasAgenda
|
|
88
88
|
? surface.onboardingAgenda.map((t) => ` - ${t}`).join('\n')
|
|
89
89
|
: '';
|
|
90
|
+
// Coverage: which agenda items were already driven recently (survives the
|
|
91
|
+
// bounded history window). Lets Stage A prefer fresh items and stop re-cycling.
|
|
92
|
+
const recentlyDriven = surface.recentlyDrivenAgenda ?? [];
|
|
93
|
+
const hasRecentlyDriven = recentlyDriven.length > 0;
|
|
94
|
+
const recentlyDrivenLines = hasRecentlyDriven
|
|
95
|
+
? recentlyDriven.map((t) => ` - ${t}`).join('\n')
|
|
96
|
+
: '';
|
|
97
|
+
const allAgendaCovered = hasAgenda && surface.onboardingAgenda.every((t) => recentlyDriven.includes(t));
|
|
90
98
|
// Bound the conversation history so the assembled Stage-A prompt can never
|
|
91
99
|
// exceed tmux's `new-session` command-line limit (~12-16KB). The prompt is
|
|
92
100
|
// passed as a command-line ARGUMENT to the spawned compose session, so an
|
|
@@ -121,9 +129,17 @@ export function buildStageAContext(surface) {
|
|
|
121
129
|
``,
|
|
122
130
|
`You have an onboarding agenda below. If the mentee is idle — no task in flight,`,
|
|
123
131
|
`said they're done, or nothing actionable in the conversation — choose assign-next`,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
...(hasRecentlyDriven
|
|
133
|
+
? [
|
|
134
|
+
`and give them one concrete agenda item that is NOT in the "Recently driven"`,
|
|
135
|
+
`list below (prefer items not yet covered). Do NOT re-assign a recently-driven`,
|
|
136
|
+
`item — the mentee already verified it; re-driving it wastes their time. If`,
|
|
137
|
+
`EVERY agenda item is already in the Recently driven list, choose observe-only`,
|
|
138
|
+
`instead of re-cycling.`,
|
|
139
|
+
]
|
|
140
|
+
: [`and give them the next agenda item, phrased as one concrete task.`]),
|
|
141
|
+
`Also choose observe-only if they are mid-task. If they're blocked or asked`,
|
|
142
|
+
`something, unblock/answer first.`,
|
|
127
143
|
]
|
|
128
144
|
: []),
|
|
129
145
|
``,
|
|
@@ -139,6 +155,13 @@ export function buildStageAContext(surface) {
|
|
|
139
155
|
...(hasAgenda
|
|
140
156
|
? [``, `--- Your onboarding agenda (suggested next tasks, in order) ---`, agendaLines]
|
|
141
157
|
: []),
|
|
158
|
+
...(hasRecentlyDriven
|
|
159
|
+
? [
|
|
160
|
+
``,
|
|
161
|
+
`--- Recently driven (already covered — prefer items NOT here; observe-only if EVERY agenda item is here${allAgendaCovered ? ' — which is the case now' : ''}) ---`,
|
|
162
|
+
recentlyDrivenLines,
|
|
163
|
+
]
|
|
164
|
+
: []),
|
|
142
165
|
].join('\n');
|
|
143
166
|
}
|
|
144
167
|
/**
|
|
@@ -169,6 +192,20 @@ export function buildConversationSurface(input) {
|
|
|
169
192
|
};
|
|
170
193
|
if (input.onboardingAgenda && input.onboardingAgenda.length) {
|
|
171
194
|
surface.onboardingAgenda = input.onboardingAgenda;
|
|
195
|
+
// Which agenda items has the mentor recently DRIVEN? Match each item's leading
|
|
196
|
+
// stem (the part before any "(" — e.g. "Verify the Project Map") against the
|
|
197
|
+
// mentor's recent sent prompts. This compact coverage list survives the bounded
|
|
198
|
+
// conversation window, so Stage A won't re-assign an item just because its
|
|
199
|
+
// assignment scrolled out of `threadlineHistory` (the re-cycling bug).
|
|
200
|
+
const sentText = (input.mentorSent ?? []).map((m) => m.message).join('\n');
|
|
201
|
+
if (sentText) {
|
|
202
|
+
const driven = input.onboardingAgenda.filter((item) => {
|
|
203
|
+
const stem = item.split('(')[0].trim();
|
|
204
|
+
return stem.length >= 8 && sentText.includes(stem);
|
|
205
|
+
});
|
|
206
|
+
if (driven.length)
|
|
207
|
+
surface.recentlyDrivenAgenda = driven;
|
|
208
|
+
}
|
|
172
209
|
}
|
|
173
210
|
const lastTs = recent.length ? recent[recent.length - 1].ts : undefined;
|
|
174
211
|
if (typeof lastTs === 'number') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorStageA.js","sourceRoot":"","sources":["../../src/monitoring/MentorStageA.ts"],"names":[],"mappings":"AAiCA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"MentorStageA.js","sourceRoot":"","sources":["../../src/monitoring/MentorStageA.ts"],"names":[],"mappings":"AAiCA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB,EAAE,CAAC;AAmD3D,+EAA+E;AAC/E,4EAA4E;AAC5E,mFAAmF;AACnF,MAAM,iBAAiB,GAAa;IAClC,kBAAkB,EAAE,oBAAoB;IACxC,4DAA4D,EAAE,0BAA0B;IACxF,qBAAqB,EAAE,qBAAqB;IAC5C,qBAAqB,EAAE,eAAe;IACtC,gBAAgB,EAAE,gBAAgB;IAClC,cAAc,EAAE,oCAAoC;IACpD,qBAAqB,EAAE,WAAW;CACnC,CAAC;AAEF,SAAS,mBAAmB,CAAC,IAAY;IACvC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,EAAE,IAAI,iBAAiB,EAAE,CAAC;QACnC,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC;QACjB,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,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YAAE,SAAS;QAChG,MAAM,EAAE,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAAE,SAAS;QACnC,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE;YAAE,SAAS;QACrE,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,MAAkB,EAAE,MAAe;IAClF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO;QACL,MAAM,EAAE,wBAAwB;QAChC,KAAK,EAAE,sEAAsE;QAC7E,QAAQ,EAAE,GAAG,SAAS,gBAAgB;QACtC,SAAS,EAAE,wBAAwB;QACnC,QAAQ,EAAE,MAAM;QAChB,kGAAkG;QAClG,QAAQ,EAAE,QAAQ,MAAM,IAAI,KAAK,iBAAiB,MAAM,GAAG;QAC3D,UAAU,EAAE,MAAM,IAAI,SAAS;KAChC,CAAC;AACJ,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-05-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-31T16:53:49.605Z",
|
|
5
|
+
"instarVersion": "1.3.173",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What to Tell Your User
|
|
7
|
+
|
|
8
|
+
If your agent mentors another agent, it will stop making the mentee re-do the same
|
|
9
|
+
checklist items over and over — it moves through the checklist and then observes,
|
|
10
|
+
re-checking only periodically. Nothing to configure.
|
|
11
|
+
|
|
12
|
+
## Summary of New Capabilities
|
|
13
|
+
|
|
14
|
+
- The mentor Stage-A composer now receives a `recentlyDrivenAgenda` coverage list
|
|
15
|
+
(derived in `buildConversationSurface` from the mentor's recent sent prompts) and
|
|
16
|
+
steers task selection by it: prefer not-yet-driven agenda items, and choose
|
|
17
|
+
observe-only when every item is recently covered, instead of re-cycling. When
|
|
18
|
+
nothing has been driven, behavior is unchanged. The two-hats leak detector is
|
|
19
|
+
untouched.
|
|
20
|
+
|
|
21
|
+
## Evidence
|
|
22
|
+
|
|
23
|
+
- Observed live while driving the codex mentee: the mentor cycled the same 6 agenda
|
|
24
|
+
items repeatedly (one item assigned 14 times), so the mentee kept re-verifying
|
|
25
|
+
already-checked capabilities with almost no new findings.
|
|
26
|
+
- Cause: Stage A judged "already covered" only from the bounded recent-conversation
|
|
27
|
+
window; once an assignment scrolled out, the item looked fresh and was re-driven.
|
|
28
|
+
- The fix derives a durable coverage list from the mentor's own recent prompts and
|
|
29
|
+
steers Stage A to prefer fresh items / observe-only when all are covered.
|
|
30
|
+
- Unit tests, tests/unit/MentorStageA.test.ts: the coverage list flags driven (and
|
|
31
|
+
not undriven) items; the prompt prefers fresh ones; all-covered steers to
|
|
32
|
+
observe-only; the no-coverage case is unchanged. All 31 tests pass.
|
|
33
|
+
|
|
34
|
+
## What Changed — The mentor stops re-assigning checklist items the mentee already did
|
|
35
|
+
|
|
36
|
+
If you run your agent as a mentor to another agent, it walks the mentee through a
|
|
37
|
+
checklist of things to verify. It decided what was "already done" by looking back
|
|
38
|
+
over the recent conversation — but it only kept a short window in view, so once an
|
|
39
|
+
assignment scrolled off the top, the mentor forgot it and assigned the same item
|
|
40
|
+
again. In practice it kept re-assigning the same handful of items in a loop, so the
|
|
41
|
+
mentee re-verified things it had already checked and rarely found anything new.
|
|
42
|
+
|
|
43
|
+
Now the mentor keeps a short, durable list of what it has recently driven (built
|
|
44
|
+
from its own recent messages, so it doesn't scroll away). It prefers items not on
|
|
45
|
+
that list, and if the whole checklist is already covered it simply observes instead
|
|
46
|
+
of pointlessly re-assigning. Old items quietly become eligible again over time, so
|
|
47
|
+
it still re-checks periodically to catch regressions — just not every single time.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Fixed a bug in the auto-update restart gate that kept agents running a stale
|
|
9
|
+
version far longer than intended. `UpdateGate` decides whether the box is "idle
|
|
10
|
+
enough" to restart onto a freshly-downloaded update by checking each running
|
|
11
|
+
session's health (`healthy` blocks; `idle`/`dead` don't). It looked that health
|
|
12
|
+
up by the session's **display name** while the health map is keyed by the **tmux
|
|
13
|
+
session name** (slug). The lookup always missed, so every interactive session was
|
|
14
|
+
conservatively treated as active — which made the idle/dead exclusion dead code
|
|
15
|
+
and meant the restart-when-idle path never fired while any session existed.
|
|
16
|
+
|
|
17
|
+
The gate now looks up health by `session.tmuxSession` (the key the health map
|
|
18
|
+
actually uses), falling back to the display name. Idle/dead sessions correctly
|
|
19
|
+
stop blocking restarts; genuinely-active (`healthy`) sessions still block, so live
|
|
20
|
+
work is never interrupted.
|
|
21
|
+
|
|
22
|
+
## What to Tell Your User
|
|
23
|
+
|
|
24
|
+
Nothing required — this is invisible robustness. If they noticed their agent
|
|
25
|
+
"staying on an old version most of the day and only catching up overnight," or
|
|
26
|
+
the agent reporting more active sessions than seemed real, this is the fix:
|
|
27
|
+
updates now activate promptly when the box is genuinely idle.
|
|
28
|
+
|
|
29
|
+
## Summary of New Capabilities
|
|
30
|
+
|
|
31
|
+
- Auto-update restarts activate promptly on a genuinely-idle box instead of
|
|
32
|
+
waiting for the overnight restart window (completes the restart-when-idle
|
|
33
|
+
intent).
|
|
34
|
+
- More accurate "active session" accounting in the restart gate (idle sessions
|
|
35
|
+
no longer inflate the blocker count).
|
|
36
|
+
|
|
37
|
+
## Evidence
|
|
38
|
+
|
|
39
|
+
- Root cause proven from live state: `auto-updater.json.restartDeferral.currentBlockers`
|
|
40
|
+
held display names (`"Codey Collaboration"`, …) while `topic-session-registry.json`
|
|
41
|
+
keyed the same sessions by slug (`"echo-codey-collaboration"`, …) — a guaranteed
|
|
42
|
+
lookup miss.
|
|
43
|
+
- `tests/unit/UpdateGate.test.ts`: +5 tests using the production key shape; the
|
|
44
|
+
3 status-discriminating ones were confirmed RED pre-fix, GREEN post-fix.
|
|
45
|
+
- `npx vitest run tests/unit/UpdateGate.test.ts tests/unit/AutoUpdater.test.ts` →
|
|
46
|
+
29 passed. `npm run lint` clean. `tsc --noEmit` clean.
|
|
47
|
+
- Spec: `docs/specs/UPDATE-GATE-HEALTH-KEY-FIX-SPEC.md` (+ ELI16 companion).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Side-effects — Mentor agenda coverage (stop re-cycling)
|
|
2
|
+
|
|
3
|
+
## 1. What files/state does this touch at runtime?
|
|
4
|
+
`src/monitoring/MentorStageA.ts` only: `buildConversationSurface` computes a new
|
|
5
|
+
`recentlyDrivenAgenda` field on the surface (from the `mentorSent` it already
|
|
6
|
+
receives), and `buildStageAContext` reads it to steer task selection. New optional
|
|
7
|
+
field on the `ConversationSurface` interface. No new state, config, schema,
|
|
8
|
+
endpoint, or runner wiring.
|
|
9
|
+
|
|
10
|
+
## 2. Does it change any functional behavior?
|
|
11
|
+
Only which agenda item Stage A prefers. When some items are recently driven, the
|
|
12
|
+
prompt steers the compose LLM to prefer not-yet-driven items and to observe-only
|
|
13
|
+
when ALL are covered. When nothing is driven (or no agenda), behavior is unchanged.
|
|
14
|
+
|
|
15
|
+
## 3. What happens on failure / weird config?
|
|
16
|
+
Pure string/array logic; cannot throw. If `mentorSent` is empty/absent,
|
|
17
|
+
`recentlyDrivenAgenda` is simply absent and the prompt uses the original steering.
|
|
18
|
+
The matching is a substring check on the item stem — a non-match just means the item
|
|
19
|
+
is treated as not-yet-driven (fail-toward-driving, never toward silence).
|
|
20
|
+
|
|
21
|
+
## 4. Migration parity — do existing agents get it?
|
|
22
|
+
Yes, via the normal release — code-only, compiled into `dist`. No agent-installed
|
|
23
|
+
file / config / template change → no `PostUpdateMigrator` pass.
|
|
24
|
+
|
|
25
|
+
## 5. Could it spam / flood / burn resources?
|
|
26
|
+
The opposite — it REDUCES waste: it stops the mentor from re-driving the same
|
|
27
|
+
already-verified agenda items every tick (each re-drive spends a mentee cycle + the
|
|
28
|
+
mentor's Stage-A/Stage-B LLM work). No new I/O, timers, or LLM calls; the coverage
|
|
29
|
+
list is computed from data already read.
|
|
30
|
+
|
|
31
|
+
## 6. Rollback / off-switch?
|
|
32
|
+
Revert the `recentlyDrivenAgenda` computation + the prompt branch + the type field.
|
|
33
|
+
No data, no migration, no flag. Behavior returns to window-only coverage.
|
|
34
|
+
|
|
35
|
+
## 7. Concurrency / ordering?
|
|
36
|
+
None — both functions are pure + synchronous. The coverage list is computed before
|
|
37
|
+
the prompt is assembled; ordering of the rest of the surface/prompt is unchanged.
|
|
38
|
+
|
|
39
|
+
## Blast radius
|
|
40
|
+
Small + mentor-only. One pure function gains a derived field; one prompt gains a
|
|
41
|
+
conditional block + revised steering. `recentlyDrivenAgenda ⊆ onboardingAgenda`, so
|
|
42
|
+
`surfaceText` already covers it → the two-hats leak detector + canary are untouched
|
|
43
|
+
and enforcement strength is unchanged. Affects only mentor-enabled agents (mentor
|
|
44
|
+
ships dark elsewhere), and only the task-selection wording.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Side-Effects Review — UpdateGate health lookup keys by tmux session name
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `update-gate-health-key-fix`
|
|
4
|
+
**Date:** 2026-05-31
|
|
5
|
+
**Author:** echo
|
|
6
|
+
|
|
7
|
+
## Summary of the change
|
|
8
|
+
|
|
9
|
+
`UpdateGate.classifyRunningSessions()` looked up per-session health with
|
|
10
|
+
`healthMap.get(session.name)` (display name) against a map keyed by the tmux
|
|
11
|
+
session slug. The lookup always missed → every interactive session hit the
|
|
12
|
+
conservative "treat as active" default → the idle/dead exclusion was dead code →
|
|
13
|
+
restart-when-idle (#41) never fired. Fix: look up by `session.tmuxSession` first,
|
|
14
|
+
fall back to `session.name`.
|
|
15
|
+
|
|
16
|
+
**Files changed (source):**
|
|
17
|
+
- `src/core/UpdateGate.ts` — one lookup expression in `classifyRunningSessions`
|
|
18
|
+
(+ an explanatory comment). No signature, interface, or control-flow change.
|
|
19
|
+
|
|
20
|
+
**Files changed (tests):**
|
|
21
|
+
- `tests/unit/UpdateGate.test.ts` — +1 describe block (5 tests) exercising the
|
|
22
|
+
production key shape (health keyed by slug, `session.name` a display name).
|
|
23
|
+
|
|
24
|
+
## Blast radius
|
|
25
|
+
|
|
26
|
+
`classifyRunningSessions` is the single private classifier behind both
|
|
27
|
+
`canRestart()` (the restart gate) and `getBlockingSessions()` (the pure idle
|
|
28
|
+
probe). Both are consumed only by `AutoUpdater` for restart gating. Nothing else
|
|
29
|
+
calls them. So the change's reach is exactly: "which running sessions are deemed
|
|
30
|
+
active for the purpose of deferring an auto-update restart."
|
|
31
|
+
|
|
32
|
+
## Behavior delta
|
|
33
|
+
|
|
34
|
+
| Scenario | Before | After |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Interactive session, health=`idle` (keyed by slug) | counted **active** (lookup miss → conservative) → blocks restart | correctly **idle** → does not block |
|
|
37
|
+
| Interactive session, health=`healthy` (keyed by slug) | counted active (right outcome, wrong reason) | counted active (correct reason) → still blocks |
|
|
38
|
+
| Interactive session, health=`dead`/`unresponsive` (slug) | counted active (miss) | correctly excluded / unresponsive |
|
|
39
|
+
| Session with genuinely no health entry | conservative active | conservative active (unchanged) |
|
|
40
|
+
| Health keyed by display name (legacy/test) | found | still found (fallback) |
|
|
41
|
+
|
|
42
|
+
Net: idle/dead sessions stop blocking restarts; **active (`healthy`) sessions
|
|
43
|
+
still block, so live work is never interrupted.**
|
|
44
|
+
|
|
45
|
+
## Risks considered
|
|
46
|
+
|
|
47
|
+
- **False-idle interruption?** No. Only `idle`/`dead` health statuses become
|
|
48
|
+
non-blocking, and those are set by SessionMonitor's own thresholds (15-min
|
|
49
|
+
no-output for `idle`). A session actively producing output is `healthy` and
|
|
50
|
+
still blocks.
|
|
51
|
+
- **Name collision (a session's display name equals another's slug)?** The
|
|
52
|
+
fallback only fires when the slug lookup misses; display vs slug formats differ
|
|
53
|
+
(spaces/caps vs hyphenated-prefixed), so a cross-match is implausible and would
|
|
54
|
+
at worst reuse an existing same-status entry.
|
|
55
|
+
- **Restarts now happen more often** — that is the intended effect (#41). They
|
|
56
|
+
remain gated by genuinely-active sessions and the operator restart window.
|
|
57
|
+
|
|
58
|
+
## Migration parity
|
|
59
|
+
|
|
60
|
+
None required. `src/core/UpdateGate.ts` is shipped library code, not an
|
|
61
|
+
agent-installed file (hook, config default, CLAUDE.md template, or skill). It
|
|
62
|
+
takes effect for every agent on the normal server restart that activates the new
|
|
63
|
+
version. No `PostUpdateMigrator` entry is needed.
|
|
64
|
+
|
|
65
|
+
## Test evidence
|
|
66
|
+
|
|
67
|
+
`npx vitest run tests/unit/UpdateGate.test.ts tests/unit/AutoUpdater.test.ts` →
|
|
68
|
+
29 passed. The 3 status-discriminating new tests were confirmed RED against the
|
|
69
|
+
pre-fix lookup and GREEN with the fix. `npm run lint` clean.
|