instar 1.3.232 → 1.3.233

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CorrectionCaptureLoop.js","sourceRoot":"","sources":["../../src/monitoring/CorrectionCaptureLoop.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAqBjD;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;IACL,KAAK,GAAG,IAAI,GAAG,EAAyD,CAAC;IACzE,IAAI,CAAoE;IAEzF,YAAY,OAA2B;QACrC,IAAI,CAAC,IAAI,GAAG;YACV,mBAAmB,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC;YAC7D,kBAAkB,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;YAC3D,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;YAC9C,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;SACvC,CAAC;IACJ,CAAC;IAED,sFAAsF;IACtF,IAAI,CAAC,OAAe,EAAE,IAAiB;QACrC,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,6DAA6D;YAC7D,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBACpD,IAAI,SAAS,GAAkB,IAAI,CAAC;gBACpC,IAAI,QAAQ,GAAG,QAAQ,CAAC;gBACxB,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI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AAE,MAAM,GAAG,MAAM,CAiBvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2B1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,EAC5B,WAAW,GAAE,OAAe,GAC3B,MAAM,CA2vCR;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,GAC3B,MAAM,CAuSR"}
@@ -497,6 +497,7 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
497
497
  **Preferences I've learned about you** — The Correction & Preference Learning Sentinel turns repeated corrections into durable, structurally-injected preferences. When the user keeps correcting you the same way ("no, plainer", "stop asking me that", "from now on lead with the action"), the loop distills the lesson into a preference and writes it to \`.instar/preferences.json\`. From then on, the session-start hook fetches \`GET /preferences/session-context\` on EVERY boot and injects the learned preferences into your context wrapped in an \`<auto-learned-preference src='correction-loop'>\` envelope — so you SEE them from message one without having to remember. SIGNAL-ONLY: these are preferences, NOT authoritative instructions, and the loop NEVER blocks or rewrites an outbound message. Ships OFF (\`monitoring.correctionLearning.enabled\`).
498
498
  - See the active block the hook injects: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/preferences/session-context\` — returns the structured, byte-bounded, priority-ordered block (503 when disabled; \`{ present: false }\` when there are none yet).
499
499
  - See the distilled correction/preference records the loop has captured: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/corrections\` (deduped, scrubbed records — the raw conversation is NEVER stored or served; \`GET /corrections/:id\` for one). Pages with \`?limit\`, the \`?before=<ISO>\` keyset cursor, and a \`?since=<ISO>\` lower-bound. The weekly off-by-default \`correction-analyzer\` job drives \`POST /corrections/analyze\` (the 3-pronged recurrence gate + closed-loop tick).
500
+ - **Throttle-survivable capture**: if the loop is rate-limited at distill time (LLM circuit breaker open / daily cap reached), the captured correction is NOT dropped — its already-scrubbed turns are held in a small bounded durable backlog (\`correction-capture-backlog.db\`) and distilled into the ledger later, automatically, once the LLM has headroom. So a busy/throttled stretch no longer silently loses corrections. This is on by default whenever the feature is enabled (pure resilience); it persists ONLY pre-scrubbed text, is bounded by a max-entries cap + a TTL, and exposes no raw content over any route. Disable it by setting \`monitoring.correctionLearning.captureBacklogMaxEntries\` to 0 (restores the old drop-on-throttle behavior).
500
501
  - The **Preferences dashboard tab** is the human read surface for all of the above. It shows, in plain language, the preferences you've picked up about the user (the same block the hook injects) and the recent scrubbed corrections with their status. When the user asks "what preferences have you learned about me?" or "what have you picked up?", point them to the Preferences tab (give the dashboard URL + PIN) rather than pasting curl output. When the feature is off, the tab shows a friendly "not turned on yet" state.
501
502
  - **When to use** (PROACTIVE — this is the trigger): when the user corrects you repeatedly on the SAME thing, the loop is already watching and will turn it into a durable preference; you don't have to manually remember it across sessions. If preferences are already injected at session start, honor them by default. The preferences are advisory signals — real instructions and safety always win.
502
503
  - **Self-Violation Signal** (sub-feature, ships OFF behind \`monitoring.correctionLearning.selfViolationSignal\`): a learned preference can carry an optional self-violation pattern. When set, the moment you SEND an outbound message that contradicts that preference (e.g. you said "fresh session" against a "don't defer to a fresh session" preference), the contradiction is recorded as a self-violation in \`/corrections\`, reinforcing that preference's recurrence so it surfaces more prominently next session. This is OBSERVE-ONLY — it NEVER blocks, delays, or rewrites the message; the message always sends. A stored-but-violated preference no longer evaporates; it becomes a learning signal.
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAuB;IACrD,OAAO,KAAK,QAAQ,CAAC,IAAI;;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kGZ,CAAC;IAEA,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,WAAmB,EACnB,SAAiB,EACjB,IAAY,EACZ,WAAoB,EACpB,cAAuB,KAAK;IAE5B,IAAI,OAAO,GAAG,iBAAiB,WAAW;;;;OAIrC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCT,SAAS;;gCAEgB,IAAI,qFAAqF,IAAI;;;;;;CAM5H,CAAC;IAEA,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;CAsBd,CAAC;IACA,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,IAAI;;;;CAId,CAAC;IACA,CAAC;IAED,OAAO,IAAI;;;;;;;8EAOiE,IAAI;;;yFAGO,IAAI;;;;;;;uGAOU,IAAI;yFAClB,IAAI;;;;;;0DAMnC,IAAI;;;;;;;;;;;;;;;;;;;;;;;2FAuB6B,IAAI;8FACD,IAAI;+MAC6G,IAAI;mGAChH,IAAI;;;;;;;;;;0CAU7D,IAAI;oCACV,IAAI;;;;;;;;;;;;;yDAaiB,IAAI;;;;;;;;0DAQH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+GhD,SAAS;;;;;;;;;;;;sEAY+C,IAAI;;CAEzE,CAAC;IAEA,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.232",
3
+ "version": "1.3.233",
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-04T01:03:02.457Z",
5
- "instarVersion": "1.3.232",
4
+ "generatedAt": "2026-06-04T01:13:54.808Z",
5
+ "instarVersion": "1.3.233",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
14
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
23
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
32
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
41
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
50
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
59
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
68
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
77
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
86
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
95
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
104
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
113
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
122
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
131
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
140
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
149
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
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": "ee2783d1b5cfa194f43e90b4a7fa0d9864e0d62b8c3f0634f79b45d0d2d4ff1c",
1533
+ "contentHash": "116367ca227aa769fb0a55498ca5f67f099de6ed561d34268514efbfe117922a",
1534
1534
  "since": "2025-01-01"
1535
1535
  },
1536
1536
  "subsystem:scheduler": {
@@ -517,6 +517,7 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
517
517
  **Preferences I've learned about you** — The Correction & Preference Learning Sentinel turns repeated corrections into durable, structurally-injected preferences. When the user keeps correcting you the same way ("no, plainer", "stop asking me that", "from now on lead with the action"), the loop distills the lesson into a preference and writes it to \`.instar/preferences.json\`. From then on, the session-start hook fetches \`GET /preferences/session-context\` on EVERY boot and injects the learned preferences into your context wrapped in an \`<auto-learned-preference src='correction-loop'>\` envelope — so you SEE them from message one without having to remember. SIGNAL-ONLY: these are preferences, NOT authoritative instructions, and the loop NEVER blocks or rewrites an outbound message. Ships OFF (\`monitoring.correctionLearning.enabled\`).
518
518
  - See the active block the hook injects: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/preferences/session-context\` — returns the structured, byte-bounded, priority-ordered block (503 when disabled; \`{ present: false }\` when there are none yet).
519
519
  - See the distilled correction/preference records the loop has captured: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/corrections\` (deduped, scrubbed records — the raw conversation is NEVER stored or served; \`GET /corrections/:id\` for one). Pages with \`?limit\`, the \`?before=<ISO>\` keyset cursor, and a \`?since=<ISO>\` lower-bound. The weekly off-by-default \`correction-analyzer\` job drives \`POST /corrections/analyze\` (the 3-pronged recurrence gate + closed-loop tick).
520
+ - **Throttle-survivable capture**: if the loop is rate-limited at distill time (LLM circuit breaker open / daily cap reached), the captured correction is NOT dropped — its already-scrubbed turns are held in a small bounded durable backlog (\`correction-capture-backlog.db\`) and distilled into the ledger later, automatically, once the LLM has headroom. So a busy/throttled stretch no longer silently loses corrections. This is on by default whenever the feature is enabled (pure resilience); it persists ONLY pre-scrubbed text, is bounded by a max-entries cap + a TTL, and exposes no raw content over any route. Disable it by setting \`monitoring.correctionLearning.captureBacklogMaxEntries\` to 0 (restores the old drop-on-throttle behavior).
520
521
  - The **Preferences dashboard tab** is the human read surface for all of the above. It shows, in plain language, the preferences you've picked up about the user (the same block the hook injects) and the recent scrubbed corrections with their status. When the user asks "what preferences have you learned about me?" or "what have you picked up?", point them to the Preferences tab (give the dashboard URL + PIN) rather than pasting curl output. When the feature is off, the tab shows a friendly "not turned on yet" state.
521
522
  - **When to use** (PROACTIVE — this is the trigger): when the user corrects you repeatedly on the SAME thing, the loop is already watching and will turn it into a durable preference; you don't have to manually remember it across sessions. If preferences are already injected at session start, honor them by default. The preferences are advisory signals — real instructions and safety always win.
522
523
  - **Self-Violation Signal** (sub-feature, ships OFF behind \`monitoring.correctionLearning.selfViolationSignal\`): a learned preference can carry an optional self-violation pattern. When set, the moment you SEND an outbound message that contradicts that preference (e.g. you said "fresh session" against a "don't defer to a fresh session" preference), the contradiction is recorded as a self-violation in \`/corrections\`, reinforcing that preference's recurrence so it surfaces more prominently next session. This is OBSERVE-ONLY — it NEVER blocks, delays, or rewrites the message; the message always sends. A stored-but-violated preference no longer evaporates; it becomes a learning signal.
@@ -0,0 +1,36 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: minor -->
5
+
6
+ ## What Changed
7
+
8
+ The Correction & Preference Learning Sentinel now survives an LLM throttle without losing corrections.
9
+
10
+ Previously, the capture hop distilled each detected correction through a rate-limited LLM queue behind the account-global circuit breaker. When that distill call was rejected for a capacity reason — daily spend cap reached, interactive-reserve breach, an aborted background call, or the breaker being open — `CorrectionCaptureLoop` dropped the capture silently with no retry and no backlog. On a production agent under sustained throttling that meant Layer 0 kept *detecting* corrections while the `CorrectionLedger` stayed permanently EMPTY, because every distill attempt hit the breaker and was discarded.
11
+
12
+ This release adds `CorrectionCaptureBacklog` — a bounded, durable SQLite store at `correction-capture-backlog.db`. When a distill is rejected for a capacity reason, the already-pre-scrubbed capture is PERSISTED to the backlog instead of dropped. A new `isCapacityThrow` classifier distinguishes a capacity rejection (worth retrying later) from a genuine fault (a malformed envelope still drops, preserving the old behavior). A new audit decision `distill-backlogged` records the persist.
13
+
14
+ A new `drainBacklog` function works the backlog down off the message hot path. It is triggered two ways: opportunistically right after a live capture's distill SUCCEEDS (proof the LLM has headroom *now*), and by a slow 5-minute periodic sweep. The drainer is breaker-gated — it consults `llmCircuitAvailable()` (a pure, non-probe-consuming read) and never drains while the breaker is open, since that would just re-fail every entry and re-trip the circuit. For each claimed entry it rebuilds the same distill prompt, records a real learning into the `CorrectionLedger`, then DELETES the backlog row (`markDistilled`); a failed attempt calls `bumpAttempt`, which drops the entry once it exceeds its retry budget.
15
+
16
+ Retention is bounded two ways: a max-entries cap (oldest evicted on overflow) and a TTL (stale entries pruned before each drain). The store persists ONLY the pre-scrubbed turns — the same secret scrub that guards the distill prompt runs before anything is written, plus a defensive re-scrub on enqueue — and no API route ever serves backlog contents. It is on by default whenever the feature is enabled (pure resilience) and is disabled by setting its max-entries to zero, which restores the old drop-on-throttle behavior. All four new dials backfill into existing agents via `applyDefaults` deep-merge.
17
+
18
+ The whole path is fail-open and signal-only: a backlog or drain error can never block, delay, or throw into message delivery.
19
+
20
+ ## What to Tell Your User
21
+
22
+ - **Corrections survive a busy stretch now**: "When you correct me about the same thing and I happen to be rate-limited at that moment, I no longer just lose it. I tuck the correction away safely and learn from it a little later once I have headroom — so a busy period can't make me quietly forget what you taught me. It only ever keeps a private, scrubbed note of the lesson, never your raw words, and it tidies those away as soon as they're learned. This whole thing only runs when correction learning is switched on, and I can turn it off for you if you ever want the old behavior back."
23
+
24
+ ## Summary of New Capabilities
25
+
26
+ | Capability | How to Use |
27
+ |-----------|-----------|
28
+ | Durable retry of throttled corrections | Automatic when correction learning is enabled |
29
+ | Disable the backlog (old drop behavior) | Set the correction-learning capture-backlog max-entries to 0 |
30
+ | See learned corrections (the ledger the backlog feeds) | GET /corrections |
31
+
32
+ ## Evidence
33
+
34
+ - **Reported live**: on a production agent with correction learning enabled, Layer 0 was detecting corrections but GET /corrections returned an empty ledger. Root cause confirmed in `src/monitoring/CorrectionCaptureLoop.ts` (~line 204): the distill catch block dropped every capture on any LlmQueue throw, and the agent's account was sustained-throttled, so every distill hit the open circuit breaker and was discarded.
35
+ - **After (code path), full round-trip proven**: `tests/e2e/correction-capture-backlog-lifecycle.test.ts` drives a learning-signal capture whose distill is rate-limited → asserts decision `distill-backlogged` and a backlog count of 1 (NOT dropped); asserts the drain is SKIPPED while the breaker is open (entry retained); then flips the breaker closed, drains, and asserts the distilled record is recorded into the ledger, the backlog row is deleted, and the record is observable on the real GET /corrections route with only its scrubbed summary served (raw learning never crosses HTTP).
36
+ - **Unit coverage**: `tests/unit/CorrectionCaptureBacklog.test.ts` (11 cases: enqueue, max-entries eviction oldest-first, near-identical dedupe, claimBatch ordering + min-retry-gap, markDistilled, bumpAttempt-drops-at-maxRetries, TTL prune, pre-scrubbed-only persistence, fail-open). `tests/unit/CorrectionCaptureBacklog-drain.test.ts` (12 cases: the four-shape isCapacityThrow classifier, capacity-throw → backlog vs non-capacity → drop, no-backlog-wired old drop, backlog-fault fallback, drain breaker-gated/recorded/bumped/pruned/fail-open). Wiring-integrity in `tests/unit/correction-learning-wiring-integrity.test.ts` (backlog constructed iff enabled+maxEntries>0; a rate-limited capture lands in the backlog without throwing into the hook; drain skipped while breaker open). Integration round-trip in `tests/integration/corrections-routes.test.ts`. All green: 11 + 12 + 9 + 13 + 2 = the new/updated suites pass with zero failures.
@@ -0,0 +1,137 @@
1
+ # Side-Effects Review — correction capture-backlog with retry
2
+
3
+ **Version / slug:** `correction-capture-backlog`
4
+ **Date:** `2026-06-02`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `pending`
7
+
8
+ ## Summary of the change
9
+
10
+ Adds `src/monitoring/CorrectionCaptureBacklog.ts` — a bounded, durable SQLite store
11
+ that persists pre-scrubbed captures the Correction & Preference Learning Sentinel
12
+ could not distill because the LLM was rate-limited (daily-cap / reserve-breach /
13
+ aborted / circuit-breaker-open). `CorrectionCaptureLoop.captureAndDistill` now, in
14
+ its distill catch block, classifies the rejection via the new `isCapacityThrow`: a
15
+ CAPACITY rejection enqueues the pre-scrubbed capture to the backlog (audit decision
16
+ `distill-backlogged`) instead of dropping it; a genuine fault still drops
17
+ (`distill-dropped`). A new `drainBacklog` distills backlogged entries into the
18
+ `CorrectionLedger` off the hot path, breaker-gated on `llmCircuitAvailable()`,
19
+ triggered after a successful live distill and by a 5-minute periodic sweep. Four
20
+ config dials (`captureBacklogMaxEntries` default 200, `captureBacklogTtlHours`
21
+ default 24, `captureBacklogDrainPerTick` default 5, `captureBacklogMaxRetries`
22
+ default 3) backfill via `applyDefaults`; maxEntries=0 disables the backlog.
23
+
24
+ ## Decision-point inventory
25
+
26
+ - `captureAndDistill: distill threw — backlog or drop?` (CorrectionCaptureLoop.ts) —
27
+ **new branch** — a capacity throw now persists (was: always drop). A non-capacity
28
+ throw is unchanged (drops). Wrapped in try/catch → a backlog fault falls back to drop.
29
+ - `drainBacklog: is the LLM available?` (CorrectionCaptureLoop.ts) — **new gate** —
30
+ skips the whole drain while the breaker is open; re-checks between entries.
31
+ - `server.ts: construct the backlog?` — **new gate** — constructed IFF the feature is
32
+ enabled AND `captureBacklogMaxEntries > 0`. Else null (old drop behavior).
33
+ - `CorrectionCaptureBacklog.enqueue: at the cap?` — **new** — evicts oldest on overflow;
34
+ dedupes a near-identical entry instead of inserting a duplicate.
35
+
36
+ ---
37
+
38
+ ## 1. Over-block
39
+
40
+ **No block/allow surface — over-block not applicable.** Nothing in this change can
41
+ reject, block, delay, or gate a message or an operation. The backlog/drain only
42
+ move an internal observe-only record (a distilled correction) from a deferred state
43
+ to the ledger. The worst over-reach is a redundant LLM distill call on an entry that
44
+ would have been noise — bounded by `captureBacklogDrainPerTick` (5) per sweep and by
45
+ the per-sentinel daily LLM cap (the drain shares the same `correctionLlmQueue`
46
+ budget, so it cannot exceed the feature's existing spend ceiling).
47
+
48
+ ---
49
+
50
+ ## 2. Under-block
51
+
52
+ **What does it still miss?** `isCapacityThrow` is conservative — an unrecognized
53
+ error string is treated as a non-capacity fault and DROPS (preserving old behavior),
54
+ so a novel provider rate-limit phrasing not in the matcher would still be dropped
55
+ rather than backlogged. That is the safe direction (no false persistence). A capture
56
+ also still drops if the backlog enqueue itself faults (disk full) — again fail-open,
57
+ no worse than today. Entries that exhaust `captureBacklogMaxRetries` or age past the
58
+ TTL are intentionally discarded (bounded retention), so a persistently-un-distillable
59
+ capture is eventually dropped by design.
60
+
61
+ ---
62
+
63
+ ## 3. Level-of-abstraction fit
64
+
65
+ Correct layer. The backlog mirrors `CorrectionLedger`'s own SQLite discipline (WAL,
66
+ prune-in-transaction, indexes, fail-open, `NativeModuleHealer` open, `SqliteRegistry`
67
+ close-on-exit) and lives beside it in `src/monitoring/`. The drain reuses the existing
68
+ `buildDistillPrompt` / `parseDistillEnvelope` rather than inventing a second distill
69
+ path, and rides the existing account-global `LlmCircuitBreaker` via its pure
70
+ `llmCircuitAvailable()` read rather than adding a parallel availability notion.
71
+
72
+ ---
73
+
74
+ ## 4. Signal vs authority compliance
75
+
76
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
77
+
78
+ - [x] No authority added — this change produces and defers a SIGNAL (a distilled
79
+ correction record) consumed by the existing `CorrectionAnalyzer` / `CorrectionLoopDriver`,
80
+ which own every downstream decision. The backlog cannot mint a proposal, write a
81
+ preference, post feedback, or change policy; it only delays then completes the same
82
+ ledger write the hot path would have done. The `CorrectionLoopDriver`'s
83
+ by-construction authority guard (no proposal-mint, no memory-write) is untouched.
84
+
85
+ ---
86
+
87
+ ## 5. Interactions
88
+
89
+ - **Shadowing:** none — the backlog is a NEW db file (`correction-capture-backlog.db`),
90
+ separate from `correction-ledger.db`; no existing query path changes.
91
+ - **LLM budget:** the drain shares the per-sentinel `correctionLlmQueue` daily cap, so
92
+ it competes with (never exceeds) the existing distill budget — and it only runs when
93
+ `llmCircuitAvailable()` is true, so it cannot pile onto an already-throttled account.
94
+ - **Circuit breaker:** the drain is a pure consumer of the breaker's read state; it does
95
+ not trip, reset, or consume a half-open probe slot.
96
+ - **Multi-machine:** the db is per-stateDir (per machine), like the ledger; no mesh
97
+ coordination needed (the worst case is each machine independently distilling its own
98
+ backlogged captures, which dedupe-collapse in the ledger by `dedupeKey`).
99
+
100
+ ---
101
+
102
+ ## 6. Privacy / data exposure
103
+
104
+ **This is the load-bearing dimension and the central design constraint.**
105
+
106
+ - **Persist-pre-scrubbed-only posture.** The backlog persists ONLY the
107
+ already-pre-scrubbed turns. The §3.3 deterministic `scrubSecrets` runs inside
108
+ `buildDistillPrompt` BEFORE the catch that enqueues, and `enqueue` re-scrubs every
109
+ turn defensively (belt-and-suspenders) so even a mis-wired caller cannot write raw
110
+ text. Unit-proven: a `ghp_…` token in a turn is `gh***_REDACTED` on disk
111
+ (`CorrectionCaptureBacklog.test.ts` + `CorrectionCaptureBacklog-drain.test.ts`).
112
+ - **Bounded retention.** Max-entries cap (oldest evicted) AND a TTL (stale pruned),
113
+ and every entry is DELETED the instant it distills (`markDistilled`) or exhausts its
114
+ retries (`bumpAttempt`). It is a bounded, time-limited extension of the existing
115
+ ephemeral look-back ring — not a new long-lived data sink.
116
+ - **No new exposure surface.** No API route serves backlog row content; the scrubbed
117
+ turn text never crosses HTTP. The only observable is a count. The E2E pins that the
118
+ drained record surfaces on GET /corrections with ONLY its scrubbed summary (raw
119
+ learning absent from the payload), exactly like the existing ledger guarantee.
120
+
121
+ ---
122
+
123
+ ## 7. Failure modes / rollback
124
+
125
+ - **Fail-open everywhere.** Every backlog method swallows storage errors and returns a
126
+ safe default; `captureAndDistill`'s backlog enqueue is wrapped in try/catch and falls
127
+ back to the old drop; `drainBacklog` is fully detached (`void`/async), single-flight
128
+ guarded, and its top-level catch can never throw into a seam. A backlog fault degrades
129
+ to exactly the pre-change behavior (drop-on-throttle).
130
+ - **Rollback.** Per-agent: set `monitoring.correctionLearning.captureBacklogMaxEntries`
131
+ to 0 — the backlog is not constructed and the loop reverts to the old drop. Whole
132
+ feature: the existing `monitoring.correctionLearning.enabled` dark gate. No schema
133
+ migration is destructive (a new db file); deleting `correction-capture-backlog.db`
134
+ is safe and just discards any pending retries.
135
+ - **Boot cost.** The store opens an empty WAL db with two small indexes — no boot-time
136
+ full-scan (the `TokenLedger` backfill-boot-hang class is explicitly avoided; there is
137
+ no startup scan, only on-demand claim/prune).