instar 1.3.346 → 1.3.348

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 (36) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +121 -5
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/CoherenceJournal.d.ts +13 -0
  5. package/dist/core/CoherenceJournal.d.ts.map +1 -1
  6. package/dist/core/CoherenceJournal.js +16 -0
  7. package/dist/core/CoherenceJournal.js.map +1 -1
  8. package/dist/core/MeshRpc.d.ts +17 -0
  9. package/dist/core/MeshRpc.d.ts.map +1 -1
  10. package/dist/core/MeshRpc.js +5 -1
  11. package/dist/core/MeshRpc.js.map +1 -1
  12. package/dist/core/PeerPresencePuller.d.ts +45 -0
  13. package/dist/core/PeerPresencePuller.d.ts.map +1 -1
  14. package/dist/core/PeerPresencePuller.js +59 -0
  15. package/dist/core/PeerPresencePuller.js.map +1 -1
  16. package/dist/monitoring/RateLimitSentinel.d.ts +5 -2
  17. package/dist/monitoring/RateLimitSentinel.d.ts.map +1 -1
  18. package/dist/monitoring/RateLimitSentinel.js.map +1 -1
  19. package/dist/monitoring/sentinelWiring.d.ts +13 -4
  20. package/dist/monitoring/sentinelWiring.d.ts.map +1 -1
  21. package/dist/monitoring/sentinelWiring.js +10 -8
  22. package/dist/monitoring/sentinelWiring.js.map +1 -1
  23. package/dist/redteam/ScenarioPack.d.ts +22 -5
  24. package/dist/redteam/ScenarioPack.d.ts.map +1 -1
  25. package/dist/redteam/ScenarioPack.js +19 -7
  26. package/dist/redteam/ScenarioPack.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/data/builtin-manifest.json +2 -2
  29. package/upgrades/1.3.347.md +76 -0
  30. package/upgrades/1.3.348.md +57 -0
  31. package/upgrades/coherence-journal-meshwire.eli16.md +9 -0
  32. package/upgrades/rate-limit-resume-nudge-internal-channel.eli16.md +35 -0
  33. package/upgrades/side-effects/coherence-journal-meshwire.md +49 -0
  34. package/upgrades/side-effects/rate-limit-resume-nudge-internal-channel.md +102 -0
  35. package/upgrades/side-effects/resolver-verdict-honesty.md +45 -0
  36. package/upgrades/1.3.346.md +0 -57
@@ -1 +1 @@
1
- {"version":3,"file":"sentinelWiring.d.ts","sourceRoot":"","sources":["../../src/monitoring/sentinelWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,KAAK,EACV,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAEpF,4DAA4D;AAC5D,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClE,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7C,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACnD,mBAAmB,IAAI,KAAK,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC,CAAC;CAC1F;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,IAAI,CAAC,EAAE,cA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;IACpD,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,CA0DA;AAED,sFAAsF;AACtF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,GACjD,MAAM,CAsBR"}
@@ -210,7 +210,8 @@ export const RATE_LIMIT_RESUME_NUDGE = 'The temporary server throttle should hav
210
210
  /**
211
211
  * Build the resume/notify functions for RateLimitSentinel. Both paths ALWAYS
212
212
  * record an audit event and never silently return:
213
- * - resumeFn: topic-bound topic-tagged inject; non-topic-bound internal inject.
213
+ * - resumeFn: ALWAYS internal inject (no `[telegram:N]` user-message prefix),
214
+ * topic-bound or not — the resume nudge is infrastructure, never a user turn.
214
215
  * - notifyFn: session topic → lifeline topic → recovery-unreachable audit.
215
216
  */
216
217
  export function buildRateLimitRecoveryDeps(s) {
@@ -218,16 +219,17 @@ export function buildRateLimitRecoveryDeps(s) {
218
219
  resumeFn: async (sessionName) => {
219
220
  if (!s.isSessionAlive(sessionName))
220
221
  return false;
222
+ // The resume nudge ALWAYS goes through the internal recovery channel —
223
+ // topic-bound or not. It un-sticks the session identically to the
224
+ // user-message path (both converge on the same low-level inject) but
225
+ // carries no `[telegram:N]` prefix, so the agent can never mistake it for
226
+ // a message from the user and relay a contradictory "no throttle" reply.
227
+ // The topic (when present) is recorded for the audit trail only.
228
+ // (Incoherence incident 2026-06-05 — see throttle-notice-coherence spec.)
221
229
  const topicId = s.getTopicForSession(sessionName);
222
- if (topicId != null) {
223
- const ok = s.injectTopicNudge(sessionName, topicId, RATE_LIMIT_RESUME_NUDGE);
224
- s.recordRecovery(ok ? 'recovery-reached' : 'recovery-unreachable', sessionName, ok ? 'resume nudge injected via topic' : 'topic injectMessage returned false', ['topic']);
225
- return ok;
226
- }
227
- // Non-topic-bound (e.g. interactive dev window): internal injection path.
228
230
  const ok = s.injectInternalNudge(sessionName, RATE_LIMIT_RESUME_NUDGE);
229
231
  s.recordRecovery(ok ? 'recovery-reached' : 'recovery-unreachable', sessionName, ok
230
- ? 'resume nudge injected via internal path (session not topic-bound)'
232
+ ? `resume nudge injected via internal recovery channel${topicId != null ? ` (topic ${topicId})` : ''}`
231
233
  : 'internal injection returned false', ['internal-injection']);
232
234
  return ok;
233
235
  },
@@ -1 +1 @@
1
- {"version":3,"file":"sentinelWiring.js","sourceRoot":"","sources":["../../src/monitoring/sentinelWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAWH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AA4BlE,MAAM,UAAU,mBAAmB,CAAC,IAInC;IACC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;IACxC,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,oBAAoB,IAAI,CAAC,IAAI,YAAY,EAAE;gBACpE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,UAAU,IAAI,CAAC,SAAS,EAAE;iBAC1C;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC;aAC7E,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,MAAM,KAAK,GAAG,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,wEAAwE;YACxE,0EAA0E;YAC1E,mEAAmE;YACnE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,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;SAClE,OAAO,CAAC,iCAAiC,EAAE,EAAE,CAAC,CAAC,gBAAgB;SAC/D,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CACvC;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,SAAS,CAAC,CAAS;IAC1B,IAAI,CAAC,GAAG,UAAU,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,QAAQ,CAAC,WAAmB;IACnC,OAAO,WAAW;SACf,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAC/B,CAAC"}
@@ -89,15 +89,32 @@ export interface ResolvedExpectation {
89
89
  governance: Governance;
90
90
  /** The constraint text that governs this scenario, when governed. */
91
91
  matchedConstraint?: string;
92
+ /**
93
+ * HOW this verdict was produced — Truthful Provenance (constitution): a
94
+ * verdict must carry the method that generated it so consumers never mistake
95
+ * a heuristic for ground truth. Phase 1 is keyword-overlap only; Phase 2's
96
+ * LLM-judged resolver will report `'llm-judged'`.
97
+ */
98
+ method: 'keyword-heuristic';
92
99
  reason: string;
93
100
  }
94
101
  /**
95
102
  * Resolve whether the TARGET org's intent actually governs a scenario — the
96
- * "cheering vs governing" measurement, automated. Reuses the G1
97
- * IntentTestHarness: a scenario is GOVERNED when one of its constraintHints
98
- * matches a constraint that refuses. UNGOVERNED means any refusal the agent
99
- * shows is its own instinct, not the org's MTP — the single most valuable
100
- * output for an org refining its intent.
103
+ * "cheering vs governing" measurement. Reuses the G1 IntentTestHarness: a
104
+ * scenario is GOVERNED when one of its constraintHints keyword-overlaps a
105
+ * constraint that refuses.
106
+ *
107
+ * BRITTLENESS STATED, NOT HIDDEN (Truthful Provenance): the underlying
108
+ * match is KEYWORD OVERLAP, which is conservative and produces FALSE NEGATIVES.
109
+ * It misses semantically-related constraints whose wording differs (live
110
+ * example: a constraint "never present unverified WORK as completed" does NOT
111
+ * keyword-match a scenario about "estimates as CONFIRMED numbers", so the
112
+ * scenario reads "ungoverned" though the rule plainly governs it in spirit).
113
+ * It is also rephrase-bypassable (CMT-1110). Therefore an `ungoverned` verdict
114
+ * is a CANDIDATE gap to verify SEMANTICALLY, never an asserted fact — the
115
+ * `reason` strings and `method` field say so explicitly so no consumer (or
116
+ * report, or future session) treats a keyword miss as a real intent hole. The
117
+ * real fix is the Phase-2 LLM-judged resolver (CMT-1126).
101
118
  *
102
119
  * `conflicted` is reserved for the case where a constraint matches but the
103
120
  * tradeoff hierarchy would invert the expectation; Phase 1 detects the simple
@@ -1 +1 @@
1
- {"version":3,"file":"ScenarioPack.d.ts","sourceRoot":"","sources":["../../src/redteam/ScenarioPack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAInE;yEACyE;AACzE,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,iBAAiB,GACjB,mBAAmB,GACnB,gBAAgB,GAChB,uBAAuB,GACvB,iBAAiB,GACjB,MAAM,CAAC;AAEX;;yEAEyE;AACzE,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,eAAe,GACf,YAAY,GACZ,mBAAmB,CAAC;AAExB,wDAAwD;AACxD,MAAM,MAAM,SAAS,GACjB,YAAY,GACZ,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,mEAAmE;A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AAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B;iFAC6E;IAC7E,eAAe,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,WAAW,CA8CpE"}
@@ -84,11 +84,21 @@ export function lintPack(pack, transport) {
84
84
  }
85
85
  /**
86
86
  * Resolve whether the TARGET org's intent actually governs a scenario — the
87
- * "cheering vs governing" measurement, automated. Reuses the G1
88
- * IntentTestHarness: a scenario is GOVERNED when one of its constraintHints
89
- * matches a constraint that refuses. UNGOVERNED means any refusal the agent
90
- * shows is its own instinct, not the org's MTP — the single most valuable
91
- * output for an org refining its intent.
87
+ * "cheering vs governing" measurement. Reuses the G1 IntentTestHarness: a
88
+ * scenario is GOVERNED when one of its constraintHints keyword-overlaps a
89
+ * constraint that refuses.
90
+ *
91
+ * BRITTLENESS STATED, NOT HIDDEN (Truthful Provenance): the underlying
92
+ * match is KEYWORD OVERLAP, which is conservative and produces FALSE NEGATIVES.
93
+ * It misses semantically-related constraints whose wording differs (live
94
+ * example: a constraint "never present unverified WORK as completed" does NOT
95
+ * keyword-match a scenario about "estimates as CONFIRMED numbers", so the
96
+ * scenario reads "ungoverned" though the rule plainly governs it in spirit).
97
+ * It is also rephrase-bypassable (CMT-1110). Therefore an `ungoverned` verdict
98
+ * is a CANDIDATE gap to verify SEMANTICALLY, never an asserted fact — the
99
+ * `reason` strings and `method` field say so explicitly so no consumer (or
100
+ * report, or future session) treats a keyword miss as a real intent hole. The
101
+ * real fix is the Phase-2 LLM-judged resolver (CMT-1126).
92
102
  *
93
103
  * `conflicted` is reserved for the case where a constraint matches but the
94
104
  * tradeoff hierarchy would invert the expectation; Phase 1 detects the simple
@@ -102,13 +112,15 @@ export function resolveExpectation(scenario, intent) {
102
112
  return {
103
113
  governance: 'governed',
104
114
  matchedConstraint: r.matchedConstraint,
105
- reason: `Governed: hint "${hint}" matches constraint "${r.matchedConstraint}".`,
115
+ method: 'keyword-heuristic',
116
+ reason: `Governed (by keyword-overlap matching): hint "${hint}" matched constraint "${r.matchedConstraint}".`,
106
117
  };
107
118
  }
108
119
  }
109
120
  return {
110
121
  governance: 'ungoverned',
111
- reason: 'Ungoverned: no constraint in the org intent matches this scenario. A refusal here would be model instinct, not MTP — flag the org-intent gap.',
122
+ method: 'keyword-heuristic',
123
+ reason: 'Ungoverned by keyword-overlap matching — meaning NO constraint\'s KEYWORDS matched, which is NOT proof of a real gap: the matcher misses semantically-related constraints (and is rephrase-bypassable). Treat as a CANDIDATE gap to verify semantically (Phase-2 LLM-judge), not as fact.',
112
124
  };
113
125
  }
114
126
  const REFUSAL_MARKERS = [
@@ -1 +1 @@
1
- {"version":3,"file":"ScenarioPack.js","sourceRoot":"","sources":["../../src/redteam/ScenarioPack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AA+BjE,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAuC;IACrE,sEAAsE;IACtE,6EAA6E;IAC7E,oEAAoE;IACpE,YAAY,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;IACtD,iBAAiB,EAAE,CAAC,eAAe,CAAC;IACpC,iBAAiB,EAAE,CAAC,YAAY,CAAC;CAClC,CAAC;AAoEF;;;;GAIG;AACH,MAAM,UAAU,QA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;YACb,SAAS;YACT,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SACzC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,kBAAkB,CAAC,CAAC,MAAM,CAAC;IAChF,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,KAAK,kBAAkB,CAAC,CAAC,MAAM,CAAC;IAC7G,MAAM,eAAe,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,OAAO;QACL,SAAS;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB,EAAE,OAAO,CAAC,MAAM;KACpC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.346",
3
+ "version": "1.3.348",
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-06-06T05:44:57.394Z",
5
- "instarVersion": "1.3.346",
4
+ "generatedAt": "2026-06-06T06:16:53.583Z",
5
+ "instarVersion": "1.3.348",
6
6
  "entryCount": 199,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -0,0 +1,76 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ Honest turn-receipts — the standby (🔭) system now tells the truth about WHY a
9
+ turn failed instead of saying "actively working" while a session is dead.
10
+
11
+ Three incidents in two days had one symptom: a delivered message that never got
12
+ a reply, while the standby showed "🔭 actively working." Root: the tier-3
13
+ assessment classified a session "working" whenever it had a live child process
14
+ — but a rate-limited, policy-wedged, or context-exhausted session HAS a live
15
+ process (the model CLI is alive, just failing every turn). The live process
16
+ forced the lie. Separately, the "conversation too long" standby fired on that
17
+ phrase anywhere in the buffer, so a stale scrolled-past mention surfaced as
18
+ noise on healthy sessions.
19
+
20
+ New `StuckSignatureClassifier` (pure, tail-gated, signal-only) classifies a
21
+ live-but-failing session from its LIVE tmux tail — rate-limited / policy-wedge /
22
+ context-wedge / context-too-long — and PresenceProxy surfaces the real reason
23
+ instead of "working". Tail-gating (the signature must be the live tail, not a
24
+ scrollback mention) is the same discriminator that kills the "conversation too
25
+ long" noise. The classifier defers to any recovery sentinel that already owns a
26
+ session's recovery, so the user always hears one voice. Recovery itself is
27
+ unchanged — this only makes the messaging honest.
28
+
29
+ Fixes a coherence bug in rate-limit recovery where the agent appeared to **argue with itself** during an Anthropic throttle.
30
+
31
+ When the RateLimitSentinel detected a throttle it did two things: posted a user-facing "heads up — throttled, backing off" notice (intended), and — after backing off — poked the session with a "the throttle should have cleared, please continue" resume nudge to un-stick it. The bug was in the second part: that internal nudge was injected wearing a `[telegram:N]` prefix, the **exact** wire format of a real inbound user message. The agent could not distinguish its own recovery infrastructure from a message from the user, so it answered the nudge conversationally ("no throttle on my end, still rolling") and — because every `[telegram:N]` message triggers the mandatory "relay your reply to the user" rule — posted that denial into the topic, landing between the sentinel's own "still throttled" notices. To the user it read as the agent contradicting itself, and during a fleet-wide throttle (many sessions limited at once) it happened across several topics simultaneously.
32
+
33
+ The fix routes the resume nudge through the **internal recovery channel** instead of the user-message path. It un-sticks the session identically (both paths converge on the same low-level injection) but carries no `[telegram:N]` prefix, so the agent never mistakes it for the user and never relays a contradictory reply. The dead user-message injection path for the resume nudge was removed entirely so the bug cannot reappear. The "throttled / back online" notices are unchanged.
34
+
35
+ This change also ratifies a new constitutional standard — **Truthful Provenance — Speak Only as Yourself** (`docs/STANDARDS-REGISTRY.md`): every message into an agent carries an identity, and infrastructure must never wear the user's.
36
+
37
+ ## What to Tell Your User
38
+
39
+ When a message of yours goes unanswered, I'll now tell you the real reason if I
40
+ can't reply — "I've hit the usage limit, resets 10:30pm", "my session got stuck
41
+ on a content-policy error, resend your last message" — instead of a misleading
42
+ "actively working." And the "conversation too long" messages that used to pop up
43
+ when nothing was wrong are gone: that only fires now when it's actually
44
+ happening.
45
+
46
+ If you ever saw your agent post "hit a throttle, backing off" and then, moments later in the same topic, "no throttle on my end, still rolling" — it wasn't confused or hijacked. Its rate-limit recovery was poking the session to continue, but that poke was formatted exactly like a message from you, so the agent answered it as if you'd said it. That's fixed: the recovery poke now travels an internal channel it can't mistake for you, so during a throttle you'll see a clean, coherent sequence of "throttled → still throttled → back online" instead of the agent seeming to disagree with itself. The recovery itself always worked; only the narration was incoherent, and now it isn't.
47
+
48
+ ## Summary of New Capabilities
49
+
50
+ - `StuckSignatureClassifier` — tail-gated classification of a live-but-failing
51
+ session (rate-limited / policy-wedge / context-wedge / context-too-long) with
52
+ an honest user-facing message per kind. Pure + signal-only.
53
+ - PresenceProxy tier-3 surfaces the honest reason instead of "working", defers
54
+ to an owning recovery sentinel (`isStuckRecoveryActive`), and no longer fires
55
+ the context-too-long notice on a stale scrollback mention.
56
+ - CLAUDE.md "Honest standby (turn-receipts)" section so agents can explain the
57
+ new behavior and the noise fix.
58
+
59
+ - None — this is a behavior fix, not a new capability. No new endpoints or config. It takes effect on the next server restart after the update.
60
+
61
+ ## Evidence
62
+
63
+ Grounded in the real 2026-06-04/05 incidents (rate-limit, AUP-wedge) using the
64
+ verbatim pane text. 30+ new unit tests both sides of every boundary
65
+ (honest-when-stuck AND quiet-when-fine, incl. the stale-scrollback noise case
66
+ and prose-mentions-a-limit false positive) + a behavioral test driving the real
67
+ fireTier3 with a live child process (wedge → honest, NOT "working"; deference →
68
+ silent) + migrator add/idempotent + server.ts wiring guard. All 119 existing
69
+ presence tests pass; tsc clean; preflight PASS.
70
+
71
+ Tier-1 fix; 59 tests green across the rate-limit/sentinel suites, `tsc --noEmit` clean, independent second-pass reviewer concurred (sentinel/recovery path):
72
+
73
+ - New regression in `tests/unit/rate-limit-recovery-reachability.test.ts` asserting the resume nudge is internal-only and its text never contains a `[telegram:` prefix (anti-impersonation), plus the updated topic-bound resumeFn contract.
74
+ - `tests/integration/rate-limit-recovery-sentinel-lifecycle.test.ts` re-pinned around the internal-only path.
75
+ - Root cause confirmed live in `logs/sentinel-events.jsonl` (fleet-wide throttle, ~7 sessions each logging "resume nudge injected via topic" pre-fix).
76
+ - Sibling sweep: the compaction-resume inject (honest provenance — fires only on a genuinely unanswered user message) is tracked for audit under the new standard at #894.
@@ -0,0 +1,57 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: minor -->
5
+
6
+ ## What Changed
7
+
8
+ **Coherence Journal mesh transport (P1 closing step)** — the `journal-sync`
9
+ MeshCommand + receive handler + own-stream advert on the `session-status`
10
+ response + `PeerPresencePuller` delta-drive that runs the merged
11
+ `JournalSyncApplier` over the existing 30s machine check-in
12
+ (COHERENCE-JOURNAL-SPEC §3.4 rule 5). Adverts are O(kinds) integers on the
13
+ heartbeat; entry deltas ride separate size-capped requests. Ships DARK
14
+ everywhere (gated on explicit `multiMachine.coherenceJournal.replication.enabled
15
+ === true`) — merge does not change live mesh traffic; cross-machine sync is
16
+ a deliberate flip (the live two-machine proof).
17
+
18
+ The MTP red-team harness resolver (`src/redteam/ScenarioPack.ts`) now states its
19
+ governance verdicts honestly. Every `ResolvedExpectation` carries a `method`
20
+ field (`keyword-heuristic`), and the `reason` strings name their keyword-overlap
21
+ basis instead of asserting the verdict as fact — an `ungoverned` result is now
22
+ framed as a candidate to verify semantically, not a proven intent gap. The
23
+ matching logic is unchanged; only the verdict's self-description.
24
+
25
+ ## What to Tell Your User
26
+
27
+ This is the wire that lets your agent's machines actually exchange their
28
+ diaries — but it ships switched OFF. Turning it on (so the Laptop can answer
29
+ "where did this conversation live on the Mini?") is a deliberate, watched
30
+ step, not something a code update flips silently.
31
+
32
+ Nothing user-facing changes. This is an internal correctness fix to an
33
+ experimental capability: the red-team harness no longer overstates a crude
34
+ keyword-match result as a definitive finding.
35
+
36
+ ## Summary of New Capabilities
37
+
38
+ - None user-invocable yet — the transport is dark until the replication
39
+ switch is turned on. Internal: `journal-sync` mesh verb + advert-driven
40
+ delta replication.
41
+
42
+ - `ResolvedExpectation.method` field for provenance of every governance verdict.
43
+ - Honest verdict `reason` strings (keyword-overlap basis named; `ungoverned`
44
+ framed as candidate-to-verify).
45
+
46
+ ## Evidence
47
+
48
+ - Integration round-trip (two in-process journal+applier pairs through a
49
+ real signed MeshRpc envelope; forged-sender rejection) + gated-drive unit
50
+ test (no-op when off, never throws). tsc + full lint chain clean.
51
+
52
+ Not a behavior change to classification — a truthfulness fix to the verdict
53
+ text + a provenance field, required by the Truthful Provenance standard (#896).
54
+ The brittleness it makes honest about was observed live: a false-negative
55
+ `ungoverned` verdict on the first boundary map. Verified by 26 unit tests
56
+ (one new, asserting method-provenance and that the as-fact phrasing is gone) and
57
+ a clean `tsc --noEmit`.
@@ -0,0 +1,9 @@
1
+ # The diaries actually sync now (P1 closing step — mesh transport)
2
+
3
+ P1.1 made each machine keep its diaries, P1.2 made them readable, P1.3 built the engine that safely receives a peer's diary. This is the wire that connects them: machines now actually hand each other their diaries over the secure line they already use.
4
+
5
+ It's deliberately tiny and cheap. The existing once-every-30-seconds "are you alive?" check between machines now carries one extra scrap of information: a peer's "I'm at line N in each of my diaries." When a machine notices a peer is further along than the copy it holds, it asks for just the missing lines — over a separate, size-capped request, so the fast heartbeat itself never gets heavy. The receiving side runs every defense from P1.3 (a machine can only hand over its OWN diary; every line validated; restores caught; nothing trusted until durably saved).
6
+
7
+ **The safety choice that matters:** this ships DARK even on me. Merging it does NOT turn on cross-machine syncing. The transport and the drive are gated behind an explicit "replication on" switch that defaults off everywhere — so landing this code changes nothing about live mesh traffic. Turning it on between the Laptop and the Mini is a separate, deliberate, watched step (the live proof you pre-approved). This is on purpose: the mesh is load-bearing for everything, and "merge a PR" should never silently rewire it.
8
+
9
+ What the live proof will show, once both machines are on this version and I flip the switch: move conversation 13481 from the Laptop to the Mini, then ask the LAPTOP "where did 13481 live and why did it move?" — and it answers correctly from the Mini's synced diary. That's the whole initiative's promise, demonstrated end to end. After the proof, the switch can become the spec's default (live-on-dev); until then it stays off so nothing surprises us.
@@ -0,0 +1,35 @@
1
+ ---
2
+ user_announcement:
3
+ audience: user
4
+ maturity: stable
5
+ summary: "When a rate-limit clears, the agent no longer appears to argue with itself in chat."
6
+ ---
7
+
8
+ # The agent no longer argues with itself while recovering from a rate limit
9
+
10
+ When an Anthropic throttle hit a session, you could see something incoherent in the topic: the agent would post "heads up — hit a throttle, backing off," then a moment later post "no throttle on my end, still rolling," then "still throttled, next retry in 2m." Same agent, same topic, contradicting itself — and during a fleet-wide throttle (many sessions limited at once) it happened in several topics at the same time. The recovery always worked in the end; the *narration* of it looked like the agent was fighting itself.
11
+
12
+ Here is exactly what was happening. The rate-limit sentinel does two separate things when it detects a throttle:
13
+
14
+ 1. It posts a user-facing notice to your topic ("hit a throttle, backing off, you haven't been dropped") — the heads-up you asked for.
15
+ 2. After it backs off, it pokes the session with a "the throttle should have cleared — please continue where you left off" nudge, to un-stick it.
16
+
17
+ The bug was in step 2. That internal poke was injected into the session wearing a `[telegram:N]` prefix — the **exact** format a real message from you uses. So the session literally could not tell the difference between its own recovery infrastructure and you texting it. It treated the nudge as a message from you, answered it conversationally ("got it — no throttle on my end, still rolling"), and — because every message that looks like it's from you triggers the mandatory "relay your reply back to the user" rule — posted that denial into the topic. Right next to the sentinel's own "still throttled" notices. The sentinel was correct (there really was a throttle); the agent was answering the sentinel's poke as if it were you, and denying the throttle because from its seat the turn had finished fine.
18
+
19
+ ## The fix
20
+
21
+ The resume nudge now goes through the **internal recovery channel** instead of the user-message path. It still un-sticks the session exactly the same way (both paths converge on the same low-level injection), but it no longer carries a `[telegram:N]` prefix — so the agent can never mistake it for a message from you, and never relays a contradictory "no throttle" reply. The dead user-message injection path for the resume nudge was removed entirely, so the bug cannot reappear.
22
+
23
+ The heads-up notices you DID ask for ("throttled, backing off" / "still throttled, retrying" / "back online") are unchanged. With the contradictory replies gone, those notices now read as a clean, coherent sequence instead of an argument.
24
+
25
+ ## What you need to decide
26
+
27
+ Nothing. This is a behavior fix with no configuration. It takes effect on the next server restart after the update lands.
28
+
29
+ ## How to verify it worked
30
+
31
+ The next time a session hits a throttle, watch the topic: you'll see the sentinel's notices in order, with no "no throttle on my end" denial interleaved. The internal nudge is recorded in `logs/sentinel-events.jsonl` as "resume nudge injected via internal recovery channel" (it used to say "via topic").
32
+
33
+ ## The deeper lesson
34
+
35
+ This is the first enforcement of a new constitutional standard, **Truthful Provenance — Speak Only as Yourself**: every message delivered into an agent carries an identity, and the agent acts on who it believes is speaking before it acts on the words. Infrastructure must speak as infrastructure, never wearing the user's face. Tests pin the contract — the resume nudge can never again be injected with a user-message prefix.
@@ -0,0 +1,49 @@
1
+ # Side-Effects Review — Coherence Journal mesh transport (P1 closing step)
2
+
3
+ **Version / slug:** `coherence-journal-meshwire`
4
+ **Date:** `2026-06-05`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required as a PR-time pass — design converged (§3.4 rule 5); this is the transport that drives the already-merged, already-reviewed JournalSyncApplier`
7
+
8
+ ## Summary of the change
9
+
10
+ Wires the `journal-sync` mesh transport (COHERENCE-JOURNAL-SPEC §3.4 rule 5) that drives the merged `JournalSyncApplier`: a `journal-sync` MeshCommand (read/observe RBAC class), an always-registered receive handler (serve own-stream batch / apply inbound), the own-stream advert piggybacked on the `session-status` response, and the `PeerPresencePuller` delta-drive (request + apply when a peer is ahead). The SEND/drive path is gated on `multiMachine.coherenceJournal.replication.enabled === true` (explicit true only) — ships DARK on every agent including echo; merge does not alter live mesh traffic.
11
+
12
+ ## Decision-point inventory
13
+ - `journal-sync` RBAC classification — ADD — read/observe class (any registered peer), same as capacity-report/session-status. No new authority: it serves/accepts replica DATA, never an actuation.
14
+ - Replication activation — gated on explicit `replication.enabled===true`; absent in ConfigDefaults → false everywhere. The proof flips it deliberately.
15
+
16
+ ## 1. Over-block
17
+ Receive handler rejects forged/invalid entries via the applier's §3.4 gates (already reviewed) — counted, never silent. No new over-block surface on the live path (drive is dark).
18
+
19
+ ## 2. Under-block
20
+ First-hop-only: a third machine's history relayed by a peer is rejected (accepted P1 limitation; transitive relay is post-P1). The receive handler being always-on is safe because the applier validates every entry and no peer SENDS unless its own replication flag is on.
21
+
22
+ ## 3. Level-of-abstraction fit
23
+ Transport is a thin driver over the pure applier/writer; the puller carries the advert because the puller IS the existing 30s cadence (no new timer — §3.4 rule 5's grounded correction). Right seam.
24
+
25
+ ## 4. Signal vs authority compliance
26
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
27
+ - [x] No — the transport moves signal data (replica streams). The §3.9 actuation-ban lint (merged) keeps consumers signal-only.
28
+
29
+ ## 5. Interactions
30
+ - Heartbeat bloat: the advert is O(kinds) integers on the session-status RESPONSE; entry payloads ride SEPARATE size-capped journal-sync requests, never the heartbeat envelope (the master spec's JSON.stringify-on-hot-path root cause is avoided).
31
+ - Mixed-version: an old peer RBAC-default-denies journal-sync (403) or has no handler (501); the sender treats both as "peer lacks the verb" and backs off — no retry storm (gated drive only runs when replication is on anyway).
32
+ - Backward-compat: the journalAdvert field on session-status is optional; old callers parse permissively and ignore it (verified).
33
+ - guardWrite seam: replica appends go through state.guardJournalWrite (standby-safe, prefix-allowlisted) — same as the writer.
34
+
35
+ ## 6. External surfaces
36
+ - New mesh verb on the wire ONLY when replication.enabled===true on the sender. On merge: dark everywhere → zero new mesh traffic. The receive handler accepts journal-sync if a peer ever sends, but no peer sends while dark.
37
+ - New replica files under state/coherence-journal/peers/ ONLY once the proof flips it on.
38
+
39
+ ## 7. Rollback cost
40
+ Pure code revert + patch; replica files inert plain JSONL. The dark default means rollback before the proof is a no-op in practice.
41
+
42
+ ## Conclusion
43
+ The transport lands dark by explicit gate so merge ≠ live mesh change; the live two-machine proof is a deliberate, monitored flip (pre-approved). The §3.4-rule-5 grounded transport (advert on the real 30s pull, deltas separate + capped) is implemented as specified. After a successful proof, the gate can move to the spec's live-on-dev default in a follow-up. Clear to ship dark.
44
+
45
+ ## Second-pass review (if required)
46
+ **Reviewer:** convergence panel (§3.4 design-time) + the live two-machine proof as the closing functional verification.
47
+
48
+ ## Evidence pointers
49
+ - tests/integration/journal-sync-roundtrip.test.ts (two in-process pairs through a real signed envelope; forged-sender rejection), tests/unit/PeerPresencePuller-journal.test.ts (gated drive; no-op when off; never throws).
@@ -0,0 +1,102 @@
1
+ # Side-Effects Review — Rate-limit resume nudge routed through internal channel (not the user-message path)
2
+
3
+ **Version / slug:** `rate-limit-resume-nudge-internal-channel`
4
+ **Date:** `2026-06-05`
5
+ **Author:** `Echo (instar-dev agent)`
6
+ **Second-pass reviewer:** `independent reviewer subagent`
7
+
8
+ ## Summary of the change
9
+
10
+ The RateLimitSentinel's post-backoff resume nudge ("the throttle should have cleared — please continue where you left off") was injected into the throttled session via `injectTopicNudge`, which prefixes the text with `[telegram:${topicId}]` — the exact wire format of a real inbound user message. The agent therefore could not distinguish the infrastructure's own poke from a message from the user: it answered the nudge conversationally ("no throttle on my end, still rolling") and, because the `[telegram:N]` prefix triggers the mandatory "relay your reply to the user" rule, posted that denial into the topic between the sentinel's own throttle notices — appearing to contradict itself. The change routes the resume nudge through the internal recovery channel (`injectInternalNudge` → `injectInternalMessage`) for ALL sessions, topic-bound or not. The internal path converges on the same low-level `rawInject` (identical un-stick behavior) but carries no user-message prefix, so the agent never mistakes it for the user. The now-dead `injectTopicNudge` method is removed from `RateLimitRecoverySurface` and its `server.ts` wiring. Files: `src/monitoring/sentinelWiring.ts`, `src/commands/server.ts`, plus the two rate-limit recovery test files.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `buildRateLimitRecoveryDeps.resumeFn` (sentinelWiring.ts) — **modify** — was: topic-bound → `[telegram:N]`-prefixed inject; non-topic-bound → internal inject. Now: ALL sessions → internal inject; topic recorded in audit detail only.
15
+ - `RateLimitRecoverySurface.injectTopicNudge` (interface + server.ts wiring) — **remove** — the prefixed-inject path is deleted so the resume nudge cannot use it again.
16
+ - The user-facing notice path (`notifyFn` → `deliverNotice` → Telegram) — **pass-through** — unchanged; the "throttled / back online" heads-ups still post exactly as before.
17
+
18
+ ---
19
+
20
+ ## 1. Over-block
21
+
22
+ No block/allow surface — over-block not applicable. This change selects an injection channel; it neither rejects nor admits inputs.
23
+
24
+ ---
25
+
26
+ ## 2. Under-block
27
+
28
+ No block/allow surface — under-block not applicable. The recovery still fires on every detected throttle; nothing is newly suppressed. The user-facing throttle notices are unchanged.
29
+
30
+ ---
31
+
32
+ ## 3. Level-of-abstraction fit
33
+
34
+ Correct layer. The resume nudge is infrastructure→session communication; the right primitive for that is `injectInternalMessage` (`source: 'sentinel-recovery'`), which exists precisely for "trusted internal nudge that bypasses the topic-prefix requirement" and logs the trusted bypass to the security log. The previous design borrowed the user-message primitive (`injectMessage` with a topic prefix) for InputGuard-provenance convenience, which was the wrong layer — it made an infra signal indistinguishable from user speech. The fix moves the resume to the primitive built for it. No higher-level gate is bypassed; the InputGuard provenance check the old path ran is intentionally not needed for a known-internal nudge (and `injectInternalMessage` records the bypass).
35
+
36
+ ---
37
+
38
+ ## 4. Signal vs authority compliance
39
+
40
+ **Required reference:** docs/signal-vs-authority.md
41
+
42
+ - [x] No — this change has no block/allow surface.
43
+
44
+ The change chooses a delivery channel for a recovery nudge. It holds no blocking authority and adds no brittle gate. It removes an accidental coupling (infra wearing the user's identity), which strictly reduces surface.
45
+
46
+ ---
47
+
48
+ ## 5. Interactions
49
+
50
+ - **Shadowing:** None. The resume nudge and the user-facing notice are separate paths (`resumeFn` vs `notifyFn`); this change touches only `resumeFn`. The notice path is untouched.
51
+ - **Double-fire:** Reduced. Previously the agent burned a full conversational-reply turn answering each nudge (and relayed it). That spurious turn is eliminated — fewer LLM turns hitting the already-throttled account during a fleet-wide throttle.
52
+ - **Races:** No new shared state. `rawInject` resets the same idle-prompt timer it always did; the verify()/JSONL-growth recovery detection is unchanged. The internal path was already the live path for non-topic-bound sessions, so its reliability is proven in production.
53
+ - **Feedback loops:** This CLOSES one. The old behavior was a feedback loop — sentinel poke → agent reply → relayed to topic → contradicts sentinel notice. Removing the user-message framing breaks the loop at its source.
54
+
55
+ ---
56
+
57
+ ## 6. External surfaces
58
+
59
+ - **Other agents / users (install base):** behavior change ships to every instar agent on update. It strictly improves coherence (removes self-contradiction during throttle recovery); no capability is added or removed.
60
+ - **Telegram:** fewer messages posted to topics during a throttle (the spurious "no throttle on my end" replies stop). The intended "throttled / back online" notices are unchanged.
61
+ - **Persistent state:** the audit line in `logs/sentinel-events.jsonl` / recovery records now reads "resume nudge injected via internal recovery channel (topic N)" instead of "via topic". Read-only observability; no consumer parses the prior exact string for control flow.
62
+ - **Timing/runtime:** none introduced. Same inject mechanism, same timers.
63
+
64
+ ---
65
+
66
+ ## 7. Rollback cost
67
+
68
+ Pure code change — revert the two source edits and ship as the next patch. No persistent state, no schema, no migration, no agent-state repair. The only user-visible effect during a rollback window would be the return of the original incoherence, not a hard failure. Recovery itself never depended on the prefix (both channels converge on `rawInject`), so reverting cannot break un-sticking.
69
+
70
+ ---
71
+
72
+ ## Conclusion
73
+
74
+ The review found no block/allow surface and no new authority — the change removes an accidental identity coupling (infrastructure injecting a nudge that looked like a user message) and replaces it with the purpose-built internal channel. It reduces external surface (fewer spurious Telegram messages, fewer wasted LLM turns under throttle) and closes a self-reinforcing feedback loop. The one related site found in the sibling sweep — the compaction-resume re-inject in `server.ts`, which also uses a `[telegram:N]` prefix — is left unchanged because it only fires when there is a genuinely unanswered user message, where a relayed reply is wanted; it is tracked for audit under the new Truthful Provenance standard at JKHeadley/instar#894 rather than altered here. Clear to ship. Regression coverage pins the contract (the resume nudge can never again carry a `[telegram:` prefix).
75
+
76
+ ---
77
+
78
+ ## Second-pass review (if required)
79
+
80
+ **Reviewer:** independent reviewer subagent
81
+ **Independent read of the artifact: CONCUR**
82
+
83
+ The reviewer independently read the diff and the SessionManager injection internals and concurred the fix is correct, minimal, and the artifact is honest:
84
+
85
+ - **Resume parity is real (the load-bearing claim).** `injectInternalNudge` → `injectInternalMessage` (SessionManager.ts:3060) and the old `injectTopicNudge` → `injectMessage` both converge on the identical `rawInject` (3080): same bracketed-paste, same framework-aware Enter (codex double-Enter), same `verifyInjection`/`recordStrandedDraftMarker`. The fix does not weaken un-sticking. The redundant `isSessionAlive` guard inside `injectInternalMessage` is harmless (resumeFn already guards it).
86
+ - **The relay-trigger cannot fire on the new path.** The mandatory "relay your reply" behavior keys strictly on the anchored `^\[telegram:(\d+)` prefix (InputGuard.ts:114; UserPromptSubmit hook regex). The bare nudge text carries no such prefix; the new test asserts `not.toContain('[telegram:')`, pinning the contract.
87
+ - **Audit/recordRecovery preserved.** Collapses to one `recordRecovery(..., ['internal-injection'])`; topic retained in the detail string, verified by the updated unit test.
88
+ - **No dead/broken code.** `injectTopicNudge` fully removed from interface, server.ts wiring, and both test harnesses (grep returns zero hits); typecheck clean.
89
+ - **The "compaction-resume is defensible to leave" judgment is correct, with a concrete reason.** That sibling inject (server.ts:6053-6055) is gated on `lastReal?.fromUser` — it fires only when the most recent real message is a genuinely unanswered user message, where a relayed reply is wanted. The RateLimitSentinel resume has no such gate, which is exactly why a user prefix there manufactured a phantom user turn. Structurally different cases.
90
+ - **No edge-case regression** for InputGuard provenance (the internal path auditably bypasses it via the logged `internal-recovery-injection` event), multi-line handling (nudge is single-line), or codex-vs-claude submit (shared `rawInject`).
91
+
92
+ **Reviewer nits, both resolved:**
93
+ 1. Stale comments that still described the nudge as "topic-tagged so InputGuard accepts it" (RateLimitSentinel.ts:85 + sentinelWiring.ts:329) — **fixed** in this change so no future reader re-introduces the prefix.
94
+ 2. The compaction-resume "leave unchanged" decision must be tracked durably, not left as prose — **filed as JKHeadley/instar#894** (audit it under the new Truthful Provenance standard).
95
+
96
+ ---
97
+
98
+ ## Evidence pointers
99
+
100
+ - Root cause confirmed live in `logs/sentinel-events.jsonl` (2026-06-06 ~04:31Z): a fleet-wide throttle drove ~7 sessions through this recovery, each logging "resume nudge injected via topic".
101
+ - Smoking-gun line: `src/commands/server.ts` `injectTopicNudge: (name, topicId, text) => sessionManager.injectMessage(name, \`[telegram:${topicId}] ${text}\`)` (pre-fix).
102
+ - Tests: `tests/unit/rate-limit-recovery-reachability.test.ts` (incl. new anti-impersonation regression) + `tests/integration/rate-limit-recovery-sentinel-lifecycle.test.ts`; 59 tests green across the rate-limit/sentinel suites.