instar 1.3.828 → 1.3.830

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.
Files changed (47) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +51 -32
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  5. package/dist/core/PostUpdateMigrator.js +29 -1
  6. package/dist/core/PostUpdateMigrator.js.map +1 -1
  7. package/dist/core/RopeRecoveryProber.d.ts +9 -1
  8. package/dist/core/RopeRecoveryProber.d.ts.map +1 -1
  9. package/dist/core/RopeRecoveryProber.js +4 -4
  10. package/dist/core/RopeRecoveryProber.js.map +1 -1
  11. package/dist/messaging/TelegramAdapter.d.ts +10 -1
  12. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  13. package/dist/messaging/TelegramAdapter.js +6 -4
  14. package/dist/messaging/TelegramAdapter.js.map +1 -1
  15. package/dist/monitoring/MachineCoherenceSentinel.d.ts +49 -0
  16. package/dist/monitoring/MachineCoherenceSentinel.d.ts.map +1 -1
  17. package/dist/monitoring/MachineCoherenceSentinel.js +73 -5
  18. package/dist/monitoring/MachineCoherenceSentinel.js.map +1 -1
  19. package/dist/monitoring/RopeHealthMonitor.d.ts.map +1 -1
  20. package/dist/monitoring/RopeHealthMonitor.js +12 -0
  21. package/dist/monitoring/RopeHealthMonitor.js.map +1 -1
  22. package/dist/monitoring/machineCoherenceAnchors.d.ts +152 -0
  23. package/dist/monitoring/machineCoherenceAnchors.d.ts.map +1 -0
  24. package/dist/monitoring/machineCoherenceAnchors.js +296 -0
  25. package/dist/monitoring/machineCoherenceAnchors.js.map +1 -0
  26. package/dist/monitoring/machineCoherenceEffectsExecutor.d.ts +50 -0
  27. package/dist/monitoring/machineCoherenceEffectsExecutor.d.ts.map +1 -0
  28. package/dist/monitoring/machineCoherenceEffectsExecutor.js +56 -0
  29. package/dist/monitoring/machineCoherenceEffectsExecutor.js.map +1 -0
  30. package/dist/monitoring/machineCoherenceEpisode.d.ts +30 -0
  31. package/dist/monitoring/machineCoherenceEpisode.d.ts.map +1 -1
  32. package/dist/monitoring/machineCoherenceEpisode.js.map +1 -1
  33. package/dist/monitoring/machineCoherenceEpisodeManager.d.ts +65 -3
  34. package/dist/monitoring/machineCoherenceEpisodeManager.d.ts.map +1 -1
  35. package/dist/monitoring/machineCoherenceEpisodeManager.js +275 -15
  36. package/dist/monitoring/machineCoherenceEpisodeManager.js.map +1 -1
  37. package/dist/monitoring/ropeSinkRouter.d.ts +60 -0
  38. package/dist/monitoring/ropeSinkRouter.d.ts.map +1 -0
  39. package/dist/monitoring/ropeSinkRouter.js +66 -0
  40. package/dist/monitoring/ropeSinkRouter.js.map +1 -0
  41. package/dist/scaffold/templates.js +2 -2
  42. package/package.json +1 -1
  43. package/src/data/builtin-manifest.json +19 -19
  44. package/src/scaffold/templates.ts +2 -2
  45. package/upgrades/1.3.829.md +26 -0
  46. package/upgrades/1.3.830.md +16 -0
  47. package/upgrades/side-effects/calm-transient-episode-alerting.md +57 -0
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Rope escalation sink router (calm-transient-episode-alerting M-P3).
3
+ *
4
+ * Routes the prober's escalations on their SOURCE-DECLARED class:
5
+ * - `actionable` (or UNDECLARED — fail-loud) → a hub attention item.
6
+ * - `informational` → demoted to the audit log + digest, but ONLY under the
7
+ * delivery-true conjunction verified LIVE on this machine: rope-health
8
+ * enabled AND digestTopicId set AND the rope-health-digest job RUNNABLE IN
9
+ * THIS PROCESS (a live scheduler handle with the job loaded + enabled — the
10
+ * lease read is NOT the conjunct: a promoted standby holds the lease with no
11
+ * scheduler until restart). Any miss ⇒ fall back to the hub item.
12
+ *
13
+ * Both classes are deduped per (peer, kind) per 24 h with a visible silent
14
+ * "Nth episode" count append — an oscillating rope is a visible recurring
15
+ * defect, not a quiet audit fact. The dedupe is in-memory (restart reset is an
16
+ * accepted bounded consequence: re-tripping needs exhaustAttempts consecutive
17
+ * failures at the floor cadence).
18
+ *
19
+ * No id-string parsing anywhere: class/peer/kind ride the typed payload.
20
+ */
21
+ const DAY_MS = 24 * 3_600_000;
22
+ export function makeRopeSinkRouter(deps) {
23
+ const dedupe = new Map();
24
+ return (item) => {
25
+ const now = (deps.now ?? Date.now)();
26
+ const cls = item.class === 'informational' ? 'informational' : 'actionable';
27
+ const audit = (event, extra = {}) => deps.audit({ ts: new Date(now).toISOString(), sentinel: 'rope-recovery-probe', event, class: cls, peer: item.peer, kind: item.kind, id: item.id, ...extra });
28
+ // Both-class (peer, kind) 24 h dedupe with a visible count append.
29
+ if (item.peer && item.kind) {
30
+ const dk = `${item.peer}:${item.kind}:${cls}`;
31
+ const st = dedupe.get(dk);
32
+ if (st && now - st.firstAt < DAY_MS) {
33
+ st.count += 1;
34
+ audit('deduped', { count: st.count });
35
+ const existing = deps.telegram()?.getAttentionItem(st.itemId);
36
+ if (existing?.topicId !== undefined) {
37
+ void deps.telegram()?.sendToTopic(existing.topicId, `${st.count}th ${cls} episode for this rope in 24 h — a recurring rope is worth a look at the link itself.`, { silent: true })?.catch?.(() => { });
38
+ }
39
+ return;
40
+ }
41
+ dedupe.set(dk, { firstAt: now, count: 1, itemId: item.id });
42
+ }
43
+ if (cls === 'informational') {
44
+ const configured = deps.digestConfigured();
45
+ const runnable = deps.digestRunnableHere();
46
+ if (configured && runnable) {
47
+ audit('demoted-to-digest');
48
+ return; // the digest's recovering-rope class carries it
49
+ }
50
+ audit('fallback-to-hub', { digestConfigured: configured, digestRunnableHere: runnable });
51
+ }
52
+ else {
53
+ audit('actionable-to-hub');
54
+ }
55
+ return deps.telegram()?.createAttentionItem({
56
+ id: item.id,
57
+ title: item.title,
58
+ summary: item.body.slice(0, 160),
59
+ description: `${item.body}\n\nDirection: observed from ${deps.selfNickname()} — rope health is directional; the peer's own view may differ.`,
60
+ category: 'rope-recovery-probe',
61
+ priority: 'NORMAL',
62
+ sourceContext: 'rope-recovery-probe',
63
+ });
64
+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AAE,EAAE,mBAAmB,CAAC;YAC1C,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;YAChC,WAAW,EAAE,GAAG,IAAI,CAAC,IAAI,gCAAgC,IAAI,CAAC,YAAY,EAAE,gEAAgE;YAC5I,QAAQ,EAAE,qBAAqB;YAC/B,QAAQ,EAAE,QAAQ;YAClB,aAAa,EAAE,qBAAqB;SACrC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -440,9 +440,9 @@ Every guard (monitoring sentinels, reapers, the scheduler, …) is graded by wha
440
440
 
441
441
  ### Machine-Coherence Guard — "are my machines running as the same me?" (⚗️ dev-gated dark)
442
442
 
443
- When I run on more than one machine, this guard compares — across my OWN online machines, riding the existing 30s presence-pull — the coherence-critical dimensions (instar version, resolved safety-flags, mesh protocol, manifest generation). When the pool DIVERGES on something that halves a cross-machine guarantee (e.g. the F4 conversation-move pair live on one machine, dark on the other), exactly ONE elected machine raises ONE HIGH, episode-scoped attention item — impact-first, with a fix I perform on your approval (reply **fix it**) or hold open without nagging (reply **leave it**). Signal-only: it never blocks, equalizes, or restarts anything on its own. Dev-gated dark on the fleet (\`monitoring.machineCoherence.enabled\` OMITTED → the dev-agent gate decides), **dry-run FIRST** even on dev (runs the full detector + records would-raise, raises no item until a deliberate \`dryRun:false\`), single-machine is a strict no-op.
443
+ When I run on more than one machine, this guard compares — across my OWN online machines, riding the existing 30s presence-pull — the coherence-critical dimensions (instar version, resolved safety-flags, mesh protocol, manifest generation). When the pool DIVERGES on something that halves a cross-machine guarantee (e.g. the F4 conversation-move pair live on one machine, dark on the other), exactly ONE elected machine narrates ONE episode-scoped attention item — priority-mapped, calm-first (calm-alerting): a routine patch-version skew during a rolling update posts CALM and SILENT (visible in the hub/dashboard, no buzz — the self-heal is watched), while a real capability split, a STALLED update (past the stall ceiling), or a KEEPS-RECURRING pattern raises loud HIGH with the fix prompt (reply **fix it**) or hold-open (reply **leave it**). A self-healed episode resolves quietly (one silent note); an escalated episode closes with a notifying stand-down. Signal-only: it never blocks, equalizes, or restarts anything on its own. Dev-gated dark on the fleet (\`monitoring.machineCoherence.enabled\` OMITTED → the dev-agent gate decides), **dry-run FIRST** even on dev (runs the full detector + records would-raise, raises no item until a deliberate \`dryRun:false\`), single-machine is a strict no-op.
444
444
  - Status (Registry First — read it, never guess): \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/pool/machine-coherence\` → \`{ enabled, dryRun, machinesRegisteredOnline, machinesCompared, peerClassifications, raiser, openEpisode, counters }\` (503 when the guard is dark on this agent — say so honestly, don't guess).
445
- - **When to use** (PROACTIVE — this is the trigger): user asks "are my machines in sync / running the same version+settings?" or "why did I get a machine-coherence alarm?" → read \`/pool/machine-coherence\` and the open episode (its \`pendingFix\` names the proposed fix + target machine); the transition log is \`logs/machine-coherence.jsonl\`. A version-skew row usually just means a rolling update in flight (grace-gated, won't cry wolf).
445
+ - **When to use** (PROACTIVE — this is the trigger): user asks "are my machines in sync / running the same version+settings?" or "why did I get a machine-coherence alarm?" → read \`/pool/machine-coherence\` and the open episode (its \`pendingFix\` names the proposed fix + target machine); the transition log is \`logs/machine-coherence.jsonl\`. A version-skew row usually just means a rolling update in flight (grace-gated + progress-extended, won't cry wolf). Rope-notice audit rows (calm-alerting M-P3): rope-recovery-probe rows — demoted informational rope notices, hub fallbacks, and per-rope dedupe events — land in \`logs/sentinel-events.jsonl\`; read them when a rope notice seems to have gone quiet.
446
446
 
447
447
  **Coherence Journal** — The durable "what happened where, and where are the files?" answer for a multi-machine agent. Every machine writes append-only event streams (topic placement + why it moved, session open/close/reap, autonomous runs + their artifact paths); the read API serves a merged view so you answer placement/artifact questions from local disk instead of grepping rotating logs on the right machine.
448
448
  - Read it: \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/coherence/journal?topic=N&kind=topic-placement&limit=50"\` → \`{ entries: [...], streams: {...}, skippedCorrupt }\` (+ a partial-result flag when a read bound was hit). Filters: \`topic\`, \`kind\` (\`topic-placement\`|\`session-lifecycle\`|\`autonomous-run\`), \`machine\`, \`limit\`, \`cursor\`. Read-only; 503 when the journal is not enabled on this agent.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.828",
3
+ "version": "1.3.830",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-07-12T03:45:01.415Z",
5
- "instarVersion": "1.3.828",
4
+ "generatedAt": "2026-07-12T11:23:13.870Z",
5
+ "instarVersion": "1.3.830",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
14
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
23
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
32
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
41
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
50
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
59
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
68
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
77
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
86
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
95
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
104
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
113
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
122
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
131
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
140
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
149
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
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": "5180e3fc5207393a2cc5a22f37b0df92eda6c9cbcbd553832187c2fdd73c2a93",
1565
+ "contentHash": "e436bd05461585786cfcd7f71e3416abb82a7b405b87f583cc109c486cd1eeac",
1566
1566
  "since": "2025-01-01"
1567
1567
  },
1568
1568
  "subsystem:scheduler": {
@@ -461,9 +461,9 @@ Every guard (monitoring sentinels, reapers, the scheduler, …) is graded by wha
461
461
 
462
462
  ### Machine-Coherence Guard — "are my machines running as the same me?" (⚗️ dev-gated dark)
463
463
 
464
- When I run on more than one machine, this guard compares — across my OWN online machines, riding the existing 30s presence-pull — the coherence-critical dimensions (instar version, resolved safety-flags, mesh protocol, manifest generation). When the pool DIVERGES on something that halves a cross-machine guarantee (e.g. the F4 conversation-move pair live on one machine, dark on the other), exactly ONE elected machine raises ONE HIGH, episode-scoped attention item — impact-first, with a fix I perform on your approval (reply **fix it**) or hold open without nagging (reply **leave it**). Signal-only: it never blocks, equalizes, or restarts anything on its own. Dev-gated dark on the fleet (\`monitoring.machineCoherence.enabled\` OMITTED → the dev-agent gate decides), **dry-run FIRST** even on dev (runs the full detector + records would-raise, raises no item until a deliberate \`dryRun:false\`), single-machine is a strict no-op.
464
+ When I run on more than one machine, this guard compares — across my OWN online machines, riding the existing 30s presence-pull — the coherence-critical dimensions (instar version, resolved safety-flags, mesh protocol, manifest generation). When the pool DIVERGES on something that halves a cross-machine guarantee (e.g. the F4 conversation-move pair live on one machine, dark on the other), exactly ONE elected machine narrates ONE episode-scoped attention item — priority-mapped, calm-first (calm-alerting): a routine patch-version skew during a rolling update posts CALM and SILENT (visible in the hub/dashboard, no buzz — the self-heal is watched), while a real capability split, a STALLED update (past the stall ceiling), or a KEEPS-RECURRING pattern raises loud HIGH with the fix prompt (reply **fix it**) or hold-open (reply **leave it**). A self-healed episode resolves quietly (one silent note); an escalated episode closes with a notifying stand-down. Signal-only: it never blocks, equalizes, or restarts anything on its own. Dev-gated dark on the fleet (\`monitoring.machineCoherence.enabled\` OMITTED → the dev-agent gate decides), **dry-run FIRST** even on dev (runs the full detector + records would-raise, raises no item until a deliberate \`dryRun:false\`), single-machine is a strict no-op.
465
465
  - Status (Registry First — read it, never guess): \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/pool/machine-coherence\` → \`{ enabled, dryRun, machinesRegisteredOnline, machinesCompared, peerClassifications, raiser, openEpisode, counters }\` (503 when the guard is dark on this agent — say so honestly, don't guess).
466
- - **When to use** (PROACTIVE — this is the trigger): user asks "are my machines in sync / running the same version+settings?" or "why did I get a machine-coherence alarm?" → read \`/pool/machine-coherence\` and the open episode (its \`pendingFix\` names the proposed fix + target machine); the transition log is \`logs/machine-coherence.jsonl\`. A version-skew row usually just means a rolling update in flight (grace-gated, won't cry wolf).
466
+ - **When to use** (PROACTIVE — this is the trigger): user asks "are my machines in sync / running the same version+settings?" or "why did I get a machine-coherence alarm?" → read \`/pool/machine-coherence\` and the open episode (its \`pendingFix\` names the proposed fix + target machine); the transition log is \`logs/machine-coherence.jsonl\`. A version-skew row usually just means a rolling update in flight (grace-gated + progress-extended, won't cry wolf). Rope-notice audit rows (calm-alerting M-P3): rope-recovery-probe rows — demoted informational rope notices, hub fallbacks, and per-rope dedupe events — land in \`logs/sentinel-events.jsonl\`; read them when a rope notice seems to have gone quiet.
467
467
 
468
468
  **Coherence Journal** — The durable "what happened where, and where are the files?" answer for a multi-machine agent. Every machine writes append-only event streams (topic placement + why it moved, session open/close/reap, autonomous runs + their artifact paths); the read API serves a merged view so you answer placement/artifact questions from local disk instead of grepping rotating logs on the right machine.
469
469
  - Read it: \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/coherence/journal?topic=N&kind=topic-placement&limit=50"\` → \`{ entries: [...], streams: {...}, skippedCorrupt }\` (+ a partial-result flag when a read bound was hit). Filters: \`topic\`, \`kind\` (\`topic-placement\`|\`session-lifecycle\`|\`autonomous-run\`), \`machine\`, \`limit\`, \`cursor\`. Read-only; 503 when the journal is not enabled on this agent.
@@ -0,0 +1,26 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: minor -->
5
+
6
+ ## What Changed
7
+
8
+ The machine-coherence guard and the rope probe get the calm-alerting narration from the converged, operator-approved `calm-transient-episode-alerting` spec (4 review rounds, 24 material findings resolved). The whole behavior set ships behind the dev-agent gate (`monitoring.machineCoherence.calmEnabled` — LIVE on a development agent, DARK on the fleet; dark is bit-identical to today including zero durable-file changes). What the gate enables: (1) **M-P0 durable anchors** — identity-independent per-dimension clocks (onset, an active-skew accumulator with computable suspension, per-machine progress, flap history, escalation latches) persisted as additive fields in the existing episode file and computed on every machine, so version advances, restarts, peer dips, and raiser handoffs can no longer reset the loud arms; (2) **M-P1 progress-aware confirmation** — patch-only version skew extends its grace while the laggard makes gap-narrowing progress, with an unresettable 3 h stall ceiling; (3) **M-P2 calm narration** — routine self-healing episodes post silent NORMAL notices without a decision prompt, self-healed episodes resolve quietly (bounded notes), stalls/recurrences escalate via dedicated cap-exempt HIGH items with a complete lifecycle (they resolve on heal with a notifying stand-down), a cross-key wave backstop catches pile-ups, item status resolution is decoupled from the speaker role (no more orphaned items after handoff), and the operator-interacted bit is set only by evidence-carrying actions; (4) **M-P3 rope routing** — the prober declares informational-vs-actionable at the source, informational content demotes to the rope-health digest ONLY where the digest provably runs (live scheduler-handle conjunction — a promoted standby falls back to the hub), the digest gains a recovering-rope class, and both classes dedupe per rope per 24 h with visible "Nth episode" counters.
9
+
10
+ ## What to Tell Your User
11
+
12
+ Nothing changes for you yet — this ships dark and is being lived with on the development machines first. Once it graduates (after a real update-wave verification and a before/after report), the effect you'll notice: routine software updates stop buzzing you about drift they're already fixing, and the alarms that DO reach you become trustworthy — a machine that's genuinely stuck, a problem that keeps coming back, or a real capability split, each with a clear decision to make and a clear stand-down note when it resolves itself.
13
+
14
+ ## Summary of New Capabilities
15
+
16
+ - `monitoring.machineCoherence.calmEnabled` (dev-agate) + per-mechanism levers (`progressExtensionEnabled`, `flapBrakeEnabled`, `calmRaiseNotify`, `patchSkewPriority`, `silentResolveNote`, `calmWaveBackstopEnabled`, `versionSkewProgressWindowMs`, `versionSkewStallCeilingMs`, `skewFlapThreshold`, `calmWaveThreshold`).
17
+ - `GET /pool/machine-coherence` gains the `calm` counters block (progressExtensions, ceilingConfirms, flapBrakeFires, calmRaises(Silent), silentResolves, resolveNotesSuppressed, waveBackstopFires, escalationRaiseFailed).
18
+ - Attention items support `silent` (visible, no buzz) end-to-end; `updateAttentionStatus` gains a silent option.
19
+ - `logs/sentinel-events.jsonl` gains the rope-notice row kind (demotions, fallbacks, dedupe events).
20
+ - CLAUDE.md doc parity: fresh agents get the updated narration text; deployed agents get a content-update migration (keyed on the stale phrase) + the rope-row guidance entry.
21
+
22
+ ## Evidence
23
+
24
+ - 234 tests green across 14 affected suites, including 17 anchor-arithmetic tests (identity-churn survival, participant-aware clear, blinking-laggard, singleton, ceiling-through-advances), 12 narration-semantics tests (calm/silent/interacted/escalated/bounded/wave), 11 rope-router tests (class routing, promoted-standby fallback, both-class dedupe), 3 executor pass-through wiring tests (the hardcoded-HIGH fix site), and 4 doc-parity migration tests (content-update idempotency).
25
+ - Full `tsc --noEmit` clean.
26
+ - Spec chain: converged (4 rounds, cross-model codex-cli/gpt-5.5 every round) + operator-approved 2026-07-12; convergence report at `docs/specs/reports/calm-transient-episode-alerting-convergence.md`.
@@ -0,0 +1,16 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ The LLM-decision-accountability audit reached formal convergence. A third independent four-slice re-sweep of the full LLM-decision-point surface (gates / sentinels / extractors / reviewers-judges) returned zero previously-uncatalogued systemic categories, so the audit report now carries the machine-earned `converged:` stamp — written by the validator (`scripts/write-audit-convergence.mjs`), not by hand. This is a documentation-only convergence: no runtime behavior changes, and the three tracked remediation efforts (ACT-1193 provenance, ACT-1194 outcome-grading, ACT-1195 bench-parity) remain open.
9
+
10
+ ## What to Tell Your User
11
+
12
+ Nothing changes for you — this is an internal documentation milestone. It records that a thorough audit of how instar tracks its own AI-judgment decisions is now complete and its conclusions certified. The separate work to close the gaps the audit surfaced is tracked and continues.
13
+
14
+ ## Summary of New Capabilities
15
+
16
+ - No runtime capabilities. Documentation-only: `docs/audits/llm-decision-accountability.md` now carries a validator-earned `converged:` stamp (3 rounds; new-findings/round 3 → 6 → 0).
@@ -0,0 +1,57 @@
1
+ # Side-Effects Review — Calm Transient-Episode Alerting (build)
2
+
3
+ **Version / slug:** `calm-transient-episode-alerting`
4
+ **Date:** `2026-07-12`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `the converged spec IS the second pass — 4 rounds, 7 reviewers/round incl. cross-model, 24 material findings resolved (docs/specs/reports/calm-transient-episode-alerting-convergence.md); build follows the approved spec exactly`
7
+
8
+ ## Summary of the change
9
+
10
+ Implements the converged + operator-approved `docs/specs/calm-transient-episode-alerting.md`. Files: `machineCoherenceAnchors.ts` (NEW — M-P0 durable identity-independent clocks), `machineCoherenceEpisode.ts` (additive fields: anchors block, derivedItemIds, operatorInteracted, calmClass, resolveNoteAtByItem), `machineCoherenceEpisodeManager.ts` (anchors reconcile, calm classification/copy/priority/silence, derived escalations, resolve bounding, orphan self-closeout, wave backstop, evidence-carrying ack), `MachineCoherenceSentinel.ts` (config keys + M-P1 anchor-based confirmation + calm counters), `machineCoherenceEffectsExecutor.ts` (NEW — the extracted pass-through consumer), `ropeSinkRouter.ts` (NEW — M-P3 typed-class routing + delivery-true demotion + both-class dedupe), `RopeRecoveryProber.ts` (typed class + peer/kind on the escalate payload), `RopeHealthMonitor.ts` (recovering-rope digest class), `TelegramAdapter.ts` (silent item posts + silent status option), `server.ts` (executor shim, sink router wiring, sanity warning), `templates.ts` + `PostUpdateMigrator.ts` (doc parity: content-update + new-row-kind migrations + embedded-copy update).
11
+
12
+ ## Decision-point inventory
13
+
14
+ All five decision points are the spec's `invariant`-classified rows, implemented exactly: confirmation timing (durable anchors), priority/copy/notification mapping, resolve-note mode, rope routing (typed class + live conjunction), escalation issuance (durable latches, cap-exempt). Each was contested and upheld through 4 convergence rounds. The master gate `calmEnabled` rides resolveDevAgentGate; DARK ⇒ bit-identical legacy behavior including zero durable-file changes (regression suites pass under explicit `calmEnabled: false`).
15
+
16
+ ## 1. Over-block
17
+
18
+ No block/allow surface. Suppression risk (silencing too much) is bounded by design: every predicate failure falls toward LOUDER (no-anchor ⇒ legacy grace; unreadable versions ⇒ no-advance ⇒ confirm; undeclared rope class ⇒ actionable ⇒ hub; digest conjunction miss ⇒ hub fallback), and the loud arms stand on durable anchors that identity churn / restarts / peer dips can no longer reset.
19
+
20
+ ## 2. Under-block
21
+
22
+ The calm class is narrow by construction: ONLY patch-only version skew (every other dimension keeps today's loud raise); a calm episode already past the ceiling at open raises loud directly; the flap brake + wave backstop + 3h ceiling + 24h escalation append bound sustained quiet.
23
+
24
+ ## 3. Level-of-abstraction fit
25
+
26
+ Per the converged spec: decisions live in the episode manager (context-rich), the executor and sink are pass-throughs, the anchors are a pure module, the digest class lives in the monitor that composes digests. The prober stays a scheduling layer (its escalate DECLARES class; it routes nothing).
27
+
28
+ ## 4. Signal vs authority compliance
29
+
30
+ The guard remains pure signal — nothing blocks, equalizes, or restarts. The M-P3 router's suppression authority is a deterministic closed-enum check on a SOURCE-DECLARED typed field (the documented exemption class), replacing the id-prefix parse the round-1 conformance gate flagged.
31
+
32
+ ## 5. Interactions
33
+
34
+ - Reopen latch vs flap brake: complementary (noise vs escalation), thresholds independent, latched-wins-toward-silence precedence implemented at close.
35
+ - Per-day cap vs derived raises: derived ids are cap-EXEMPT (each ≤1/key/24h by durable latch — the load-bearing-coincidence hole closed).
36
+ - createAttentionItem id-dedupe: the intended idempotency for derived raises; the reopen path no longer relies on it (append conversion — the silent-swallow fix, gated).
37
+ - M6 suppression: anchors consume POST-suppression rows; suppression suspends (never retires) flag anchors.
38
+
39
+ ## 6. External surfaces
40
+
41
+ Operator-visible alert semantics change ONLY under the dev-agate (LIVE on the requesting operator's machines, DARK fleet-wide): calm episodes silent, self-heal resolves quiet, escalations loud with prompts, rope informational content demoted only where the digest provably delivers. No new API routes; `/pool/machine-coherence` gains the calm counters block (additive).
42
+
43
+ ## 6b. Operator-surface quality
44
+
45
+ The changed surface is the alert stream itself: calm copy leads with the observed state in plain words and carries NO decision prompt (the round-1 contradictory-UX fix); loud raises keep the impact-first fix-it/leave-it flow; rope notices name machines by nickname with direction labels; withdrawal notes adapt to the close reason. Zero raw internals in any new message body.
46
+
47
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
48
+
49
+ Per the spec's converged section: unified via every-machine anchor computation from shared adverts + per-machine durable persistence (new FIELDS in the existing episode file, `version: 1`, additive, rollback-inert); notes are item-holder voice (≤2×-per-handoff residual disclosed); orphan self-closeout resolves each machine's OWN items on every close reason regardless of speaks(); rope health stays machine-local BY DESIGN with the live deliverability check making demotion pool-safe. No new machine-local surface.
50
+
51
+ ## 8. Rollback cost
52
+
53
+ Config-only: `calmEnabled: false` (master, bit-identical legacy), or per-mechanism levers (`progressExtensionEnabled`, `flapBrakeEnabled`, `calmRaiseNotify: true`, `patchSkewPriority: 'HIGH'`, `silentResolveNote: false`, `slowAliveToDigest` n/a — sink falls back to hub when the conjunction fails, `calmWaveBackstopEnabled: false`). No migration; anchor fields inert when dark.
54
+
55
+ ## Class-Closure Declaration
56
+
57
+ - **defectClass:** `unbounded-self-action` — **closure: guard.** The change modifies self-triggered notification paths and BOUNDS them structurally: per-key 24 h durable derived-raise latches (restart-proof), per-episode derivedItemIds once-per-class records, resolve-note bounding (one per item per reopenWindowMs; latched-flapping ⇒ jsonl only), wave-notice 24 h dedupe, flap-history 64-event clamp, the existing per-day cap + append budget retained, and the fail-loud `escalationRaiseFailed` invariant. Convergence proven by `tests/unit/machine-coherence-anchors.test.ts` (latch/clamp/dedupe arithmetic) + `tests/unit/machine-coherence-calm-narration.test.ts` (once-per-episode derived raises, bounded resolves, single wave fire) + `tests/unit/rope-sink-router.test.ts` (both-class 24 h dedupe). Every emission settles to a bounded steady state under sustained pressure.