instar 1.3.260 → 1.3.262
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 +7 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +1 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +10 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +36 -0
- 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/monitoring/StaleSessionBackstop.d.ts +16 -0
- package/dist/monitoring/StaleSessionBackstop.d.ts.map +1 -1
- package/dist/monitoring/StaleSessionBackstop.js +13 -2
- package/dist/monitoring/StaleSessionBackstop.js.map +1 -1
- package/package.json +1 -1
- package/scripts/assemble-next-md.mjs +7 -1
- package/src/data/builtin-manifest.json +19 -19
- package/upgrades/1.3.261.md +45 -0
- package/upgrades/1.3.262.md +23 -0
- package/upgrades/side-effects/instar-dev-internal-only-lane-docs.md +103 -0
- package/upgrades/side-effects/stalebackstop-accuracy.md +52 -0
|
@@ -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-05T01:40:01.762Z",
|
|
5
|
+
"instarVersion": "1.3.262",
|
|
6
6
|
"entryCount": 198,
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
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": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
150
150
|
"since": "2025-01-01"
|
|
151
151
|
},
|
|
152
152
|
"job:health-check": {
|
|
@@ -1530,7 +1530,7 @@
|
|
|
1530
1530
|
"type": "subsystem",
|
|
1531
1531
|
"domain": "updates",
|
|
1532
1532
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1533
|
-
"contentHash": "
|
|
1533
|
+
"contentHash": "7b24d5f0ce709b9b960d78d17a92d2cb24ad6319175d2edd1e3ffef17f30ba80",
|
|
1534
1534
|
"since": "2025-01-01"
|
|
1535
1535
|
},
|
|
1536
1536
|
"subsystem:scheduler": {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: minor -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
The stale-session watchdog no longer cries wolf on healthy long-running sessions. Two
|
|
9
|
+
detection-accuracy fixes in StaleSessionBackstop:
|
|
10
|
+
|
|
11
|
+
1. Operator-protected sessions (the reaper's protectedSessions) are never flagged as
|
|
12
|
+
stale — they're deliberately kept alive, so escalating them was a false alarm.
|
|
13
|
+
2. Conversational/autonomous sessions get a far more forgiving no-progress window
|
|
14
|
+
(conversationalEscalateMinutes, default 180 min) than run-to-completion jobs (which
|
|
15
|
+
keep the strict 30-min window). A long autonomous session that legitimately idles
|
|
16
|
+
between turns or waits on a multi-minute tool call no longer trips the 30-minute
|
|
17
|
+
"looks stuck" threshold.
|
|
18
|
+
|
|
19
|
+
This is the detection half of the Notification UX Coherence work; PR1 shipped the calm
|
|
20
|
+
"🩺 Agent Health" lane (the delivery half). The fake-work guards (transcript tail-hash +
|
|
21
|
+
cpu-seconds delta) are unchanged — genuine wedges are still caught; the backstop is still
|
|
22
|
+
signal-only and never auto-kills.
|
|
23
|
+
|
|
24
|
+
## What to Tell Your User
|
|
25
|
+
|
|
26
|
+
Your agent will stop pinging you that a long-running session "looks stuck" when it's
|
|
27
|
+
actually just working through a slow step or waiting between turns. Sessions you've
|
|
28
|
+
marked as protected are never flagged at all, and ordinary long conversations get a much
|
|
29
|
+
more patient window before the agent mentions anything. Genuinely-stuck work is still
|
|
30
|
+
caught — just without the false alarms.
|
|
31
|
+
|
|
32
|
+
## Summary of New Capabilities
|
|
33
|
+
|
|
34
|
+
- StaleSessionBackstop exempts operator-protected sessions from stale escalation.
|
|
35
|
+
- New monitoring.staleBackstop.conversationalEscalateMinutes (default 180): a forgiving
|
|
36
|
+
no-progress window for conversational/autonomous sessions, separate from the strict job
|
|
37
|
+
window (unverifiableEscalateMinutes, 30). Clamped to never be more aggressive than the
|
|
38
|
+
job window.
|
|
39
|
+
|
|
40
|
+
## Evidence
|
|
41
|
+
|
|
42
|
+
- Unit (tests/unit/stale-session-backstop.test.ts): a protected session is never
|
|
43
|
+
escalated even well past the window; the threshold split — a healthy long conversational
|
|
44
|
+
session at 35 min does NOT escalate while a wedged job at 35 min DOES.
|
|
45
|
+
- 82 standards + backstop tests green; tsc clean; pre-push-gate clean.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Documented the internal-only release-note lane in the bundled instar-dev skill and added a PostUpdateMigrator backfill so existing agents with stock deployed copies receive the same guidance after update.
|
|
9
|
+
|
|
10
|
+
The new skill section explains the `<!-- internal-only -->` fragment marker, the ability to omit the two user-facing release-note sections, the assembler's all-internal-only auto-fill rule, and the pre-push gate that rejects the marker when runtime `src/*.ts` files changed.
|
|
11
|
+
|
|
12
|
+
## What to Tell Your User
|
|
13
|
+
|
|
14
|
+
Nothing changes in normal product behavior. This update improves the development workflow so agents know when the internal-only release-note lane is valid and existing agents receive that guidance automatically.
|
|
15
|
+
|
|
16
|
+
## Summary of New Capabilities
|
|
17
|
+
|
|
18
|
+
Existing agents with stock instar-dev skill installs now learn the internal-only release-note lane through the post-update migration path instead of waiting for a fresh install.
|
|
19
|
+
|
|
20
|
+
## Evidence
|
|
21
|
+
|
|
22
|
+
- Added a focused PostUpdateMigrator unit test covering update, idempotency, customized-skill preservation, and missing-skill no-op behavior.
|
|
23
|
+
- Ran the existing build-location migration test and the new internal-only-lane migration test together: 8 tests passed.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Side-Effects Review — instar-dev internal-only release-note lane docs
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `instar-dev-internal-only-lane-docs`
|
|
4
|
+
**Date:** `2026-06-04`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This change documents PR #765's internal-only release-note lane in the bundled `/instar-dev` skill and adds a PostUpdateMigrator backfill so existing deployed stock skill copies receive the same guidance.
|
|
11
|
+
|
|
12
|
+
The skill text documents four operational facts grounded in #765: `<!-- internal-only -->` opts a fragment into the lane, the marker lets the fragment omit `What to Tell Your User` and `Summary of New Capabilities`, the shared assembler auto-fills those sections only when every contributing fragment is internal-only, and the pre-push gate rejects the marker when runtime `src/*.ts` files changed.
|
|
13
|
+
|
|
14
|
+
## Decision-point inventory
|
|
15
|
+
|
|
16
|
+
- `/instar-dev` skill text — modify — teaches agents when the internal-only lane is valid.
|
|
17
|
+
- `PostUpdateMigrator` built-in skill migration — modify — copies the bundled stock skill into existing stock deployed copies when the new marker is missing.
|
|
18
|
+
- Release gates — `hasInternalOnlyMarker` (`scripts/assemble-next-md.mjs`) hardened to match the marker only as a standalone directive line (see §8); pre-push behavior otherwise unchanged.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Over-block
|
|
23
|
+
|
|
24
|
+
The migration may skip a deployed instar-dev skill that is structurally stock but lacks the conservative fingerprint (`# /instar-dev` and `### Phase 2 — Planning`). That is acceptable because the alternative is clobbering customized local workflows. Fresh installs still receive the bundled skill.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Under-block
|
|
29
|
+
|
|
30
|
+
This does not enforce correct use of the internal-only marker beyond documenting the already-merged pre-push gate. An agent can still misunderstand the lane, but the guidance now lives in the skill at the point where agents prepare release fragments.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 3. Level-of-abstraction fit
|
|
35
|
+
|
|
36
|
+
The skill is the right documentation layer because `/instar-dev` owns the release-fragment workflow. PostUpdateMigrator is the right deployment layer because installed skills are untracked agent-local files; package updates alone do not rewrite existing copies.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 4. Signal vs authority compliance
|
|
41
|
+
|
|
42
|
+
- [x] No new authority is introduced.
|
|
43
|
+
|
|
44
|
+
This PR changes documentation and migration parity only. The objective authority remains PR #765's existing pre-push gate, which checks the marker against the diff.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 5. Interactions
|
|
49
|
+
|
|
50
|
+
- **#760 migration:** This mirrors the existing build-location skill migration but uses a new marker phrase, so both migrations are independently idempotent.
|
|
51
|
+
- **Fresh installs:** `installBuiltinSkills` gets the updated bundled skill directly.
|
|
52
|
+
- **Existing installs:** PostUpdateMigrator rewrites only stock deployed copies missing the new phrase.
|
|
53
|
+
- **Customized installs:** The conservative fingerprint check leaves them untouched.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 6. External surfaces
|
|
58
|
+
|
|
59
|
+
The visible surface is limited to development agents reading `/instar-dev`. End-user behavior does not change. Existing agents with stock skill installs will see the new guidance after update.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 7. Rollback cost
|
|
64
|
+
|
|
65
|
+
Rollback is a normal code revert. Agents that already received the updated skill keep a harmless documentation section until a later migration rewrites the file. There is no persistent database migration.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Conclusion
|
|
70
|
+
|
|
71
|
+
The change closes the deploy-awareness half of #765 without changing the ship-lane mechanism itself. The main risk is overwriting customized skills, and the migration avoids that by using the same conservative content-sniffing pattern as #760.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Second-pass review (if required)
|
|
76
|
+
|
|
77
|
+
**Reviewer:** not required
|
|
78
|
+
**Independent read of the artifact:** not required
|
|
79
|
+
|
|
80
|
+
This touches development-skill documentation and an idempotent post-update skill migration. It does not alter session lifecycle, messaging gates, sentinels, or runtime block/allow decisions.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 8. Marker-detection hardening (surfaced while building this PR)
|
|
85
|
+
|
|
86
|
+
Building this docs PR surfaced a false-positive in `hasInternalOnlyMarker`
|
|
87
|
+
(`scripts/assemble-next-md.mjs`): the matcher used a whole-content regex, so a
|
|
88
|
+
fragment that merely *documents* the `<!-- internal-only -->` marker in prose (as
|
|
89
|
+
this PR's own release fragment does, quoting the literal marker in backticks) was
|
|
90
|
+
misread as *using* the internal-only lane — and tripped its own §3c src-conflict
|
|
91
|
+
gate (this PR touches `PostUpdateMigrator.ts`). Hardened the matcher to recognize
|
|
92
|
+
the marker ONLY as a standalone directive line (like `<!-- bump: -->`), never an
|
|
93
|
+
inline/backtick mention. Pure script + test change; no `src/` runtime surface.
|
|
94
|
+
Behavior for genuine internal-only fragments (marker on its own line) is unchanged
|
|
95
|
+
— all three prior `detects the marker` assertions stay green. Regression test
|
|
96
|
+
added (`does NOT detect an inline/backtick mention…`).
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Evidence pointers
|
|
101
|
+
|
|
102
|
+
- `npm test -- --run tests/unit/migrate-instar-dev-build-location.test.ts tests/unit/migrate-instar-dev-internal-only-lane.test.ts`
|
|
103
|
+
- `npm test -- --run tests/unit/assemble-next-md.test.ts tests/unit/pre-push-gate.test.ts` (47 tests — marker false-positive regression)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Side-Effects Review — StaleBackstop detection accuracy (PR2 / D5)
|
|
2
|
+
|
|
3
|
+
## What changed (mechanically)
|
|
4
|
+
|
|
5
|
+
`StaleSessionBackstop` no longer cries wolf on healthy long-running sessions:
|
|
6
|
+
1. **Protected sessions are never escalated.** New `isProtectedSession?(session)` dep
|
|
7
|
+
(wired in server.ts to the reaper's `getProtectedSessions()`, matched by tmux name
|
|
8
|
+
or session name). A protected session — one the operator deliberately keeps alive —
|
|
9
|
+
skips BOTH escalation paths (no-progress and long-indeterminate).
|
|
10
|
+
2. **Conversational/autonomous sessions get a forgiving window.** New
|
|
11
|
+
`conversationalEscalateMinutes` option (default 180, clamped to ≥ the job window).
|
|
12
|
+
The no-progress threshold is now `session.jobSlug ? unverifiableEscalateMinutes (30)
|
|
13
|
+
: max(conversationalEscalateMinutes, unverifiableEscalateMinutes)`. A job runs to
|
|
14
|
+
completion (strict 30-min window); a conversational/autonomous session legitimately
|
|
15
|
+
idles between turns and while waiting on multi-minute tool calls, so it gets 180.
|
|
16
|
+
|
|
17
|
+
## Blast radius
|
|
18
|
+
|
|
19
|
+
- The fake-work guards (`hasForwardProgress`: tail-hash + cpu-seconds delta) are
|
|
20
|
+
UNTOUCHED — wedge detection is unchanged; this only widens the no-progress WINDOW for
|
|
21
|
+
conversational sessions and exempts protected ones.
|
|
22
|
+
- A genuinely-wedged JOB still escalates at 30 min (unchanged).
|
|
23
|
+
- A genuinely-wedged conversational session still escalates — just at 180 min, not 30.
|
|
24
|
+
Combined with PR1's calm lane, even that is a single calm heads-up, not topic-spam.
|
|
25
|
+
- Config additive + defaulted; absent config → defaults apply (180 / protected-from-reaper).
|
|
26
|
+
|
|
27
|
+
## Failure modes considered
|
|
28
|
+
|
|
29
|
+
- **conversationalEscalateMinutes mis-set below the job window**: clamped up via
|
|
30
|
+
`max(...)` at the decision site, so it can never be MORE aggressive than the job window.
|
|
31
|
+
- **isProtectedSession absent** (older wiring / tests): optional-chained → no session
|
|
32
|
+
treated as protected (prior behavior), never throws.
|
|
33
|
+
- **Protected list by name vs id**: matched against both `tmuxSession` and `name`.
|
|
34
|
+
|
|
35
|
+
## Non-goals
|
|
36
|
+
|
|
37
|
+
- Does NOT change delivery (that's PR1's lane).
|
|
38
|
+
- Does NOT auto-kill anything (the backstop remains signal-only).
|
|
39
|
+
|
|
40
|
+
## Reversibility
|
|
41
|
+
|
|
42
|
+
`monitoring.staleBackstop.conversationalEscalateMinutes: 30` restores the old uniform
|
|
43
|
+
window; protection follows the existing `protectedSessions` list. Additive only.
|
|
44
|
+
|
|
45
|
+
## Tests
|
|
46
|
+
|
|
47
|
+
Unit (stale-session-backstop.test.ts): protected session never escalates; the
|
|
48
|
+
conversational-vs-job threshold split (a healthy long conversational session at 35 min
|
|
49
|
+
does NOT escalate while a wedged job DOES). Existing mechanism tests pinned to the 30-min
|
|
50
|
+
window via `conversationalEscalateMinutes: M`. 82 standards + backstop tests green; tsc
|
|
51
|
+
clean. (Also: bumped the no-silent-fallbacks baseline 458→459 for PR1's lane fallback, and
|
|
52
|
+
tracked main's untacked `/secrets/sync-status` migrator section — both per Zero-Failure.)
|