instar 1.3.830 → 1.3.832
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +83 -12
- package/dist/commands/server.js.map +1 -1
- package/dist/core/AutonomousRealCheckAnnotator.d.ts +105 -0
- package/dist/core/AutonomousRealCheckAnnotator.d.ts.map +1 -0
- package/dist/core/AutonomousRealCheckAnnotator.js +122 -0
- package/dist/core/AutonomousRealCheckAnnotator.js.map +1 -0
- package/dist/core/AutonomousRunStore.d.ts +29 -0
- package/dist/core/AutonomousRunStore.d.ts.map +1 -1
- package/dist/core/AutonomousRunStore.js +38 -0
- package/dist/core/AutonomousRunStore.js.map +1 -1
- package/dist/core/BackupManager.d.ts.map +1 -1
- package/dist/core/BackupManager.js +47 -1
- package/dist/core/BackupManager.js.map +1 -1
- package/dist/core/CircuitBreakingIntelligenceProvider.d.ts +12 -0
- package/dist/core/CircuitBreakingIntelligenceProvider.d.ts.map +1 -1
- package/dist/core/CircuitBreakingIntelligenceProvider.js +56 -4
- package/dist/core/CircuitBreakingIntelligenceProvider.js.map +1 -1
- package/dist/core/CompletionEvaluator.d.ts +62 -2
- package/dist/core/CompletionEvaluator.d.ts.map +1 -1
- package/dist/core/CompletionEvaluator.js +124 -6
- package/dist/core/CompletionEvaluator.js.map +1 -1
- package/dist/core/DecisionQualityRecorderImpl.d.ts +192 -0
- package/dist/core/DecisionQualityRecorderImpl.d.ts.map +1 -0
- package/dist/core/DecisionQualityRecorderImpl.js +363 -0
- package/dist/core/DecisionQualityRecorderImpl.js.map +1 -0
- package/dist/core/IntelligenceRouter.d.ts +33 -0
- package/dist/core/IntelligenceRouter.d.ts.map +1 -1
- package/dist/core/IntelligenceRouter.js +240 -54
- package/dist/core/IntelligenceRouter.js.map +1 -1
- package/dist/core/JudgmentProvenanceLog.d.ts +102 -2
- package/dist/core/JudgmentProvenanceLog.d.ts.map +1 -1
- package/dist/core/JudgmentProvenanceLog.js +239 -11
- package/dist/core/JudgmentProvenanceLog.js.map +1 -1
- package/dist/core/MessagingToneGate.d.ts +30 -0
- package/dist/core/MessagingToneGate.d.ts.map +1 -1
- package/dist/core/MessagingToneGate.js +63 -0
- package/dist/core/MessagingToneGate.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +11 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +32 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
- package/dist/core/WriteDomainRegistry.js +24 -0
- package/dist/core/WriteDomainRegistry.js.map +1 -1
- package/dist/core/decisionGradingPass.d.ts +89 -0
- package/dist/core/decisionGradingPass.d.ts.map +1 -0
- package/dist/core/decisionGradingPass.js +188 -0
- package/dist/core/decisionGradingPass.js.map +1 -0
- package/dist/core/decisionQualityTypes.d.ts +170 -0
- package/dist/core/decisionQualityTypes.d.ts.map +1 -0
- package/dist/core/decisionQualityTypes.js +85 -0
- package/dist/core/decisionQualityTypes.js.map +1 -0
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +6 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/machineCoherenceManifest.d.ts.map +1 -1
- package/dist/core/machineCoherenceManifest.js +4 -0
- package/dist/core/machineCoherenceManifest.js.map +1 -1
- package/dist/core/types.d.ts +69 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/data/provenanceCoverage.d.ts +156 -0
- package/dist/data/provenanceCoverage.d.ts.map +1 -0
- package/dist/data/provenanceCoverage.js +674 -0
- package/dist/data/provenanceCoverage.js.map +1 -0
- package/dist/monitoring/ExternalHogDecisionStore.d.ts +256 -0
- package/dist/monitoring/ExternalHogDecisionStore.d.ts.map +1 -0
- package/dist/monitoring/ExternalHogDecisionStore.js +481 -0
- package/dist/monitoring/ExternalHogDecisionStore.js.map +1 -0
- package/dist/monitoring/ExternalHogRealAdapters.d.ts +6 -2
- package/dist/monitoring/ExternalHogRealAdapters.d.ts.map +1 -1
- package/dist/monitoring/ExternalHogRealAdapters.js +2 -2
- package/dist/monitoring/ExternalHogRealAdapters.js.map +1 -1
- package/dist/monitoring/ExternalHogScanTick.d.ts +95 -3
- package/dist/monitoring/ExternalHogScanTick.d.ts.map +1 -1
- package/dist/monitoring/ExternalHogScanTick.js +102 -9
- package/dist/monitoring/ExternalHogScanTick.js.map +1 -1
- package/dist/monitoring/ExternalHogSentinel.d.ts +71 -3
- package/dist/monitoring/ExternalHogSentinel.d.ts.map +1 -1
- package/dist/monitoring/ExternalHogSentinel.js +126 -2
- package/dist/monitoring/ExternalHogSentinel.js.map +1 -1
- package/dist/monitoring/ExternalHogServerPrimitives.d.ts +10 -2
- package/dist/monitoring/ExternalHogServerPrimitives.d.ts.map +1 -1
- package/dist/monitoring/ExternalHogServerPrimitives.js +1 -1
- package/dist/monitoring/ExternalHogServerPrimitives.js.map +1 -1
- package/dist/monitoring/FeatureMetricsLedger.d.ts +304 -0
- package/dist/monitoring/FeatureMetricsLedger.d.ts.map +1 -1
- package/dist/monitoring/FeatureMetricsLedger.js +731 -0
- package/dist/monitoring/FeatureMetricsLedger.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +2 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +55 -1
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +15 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/fileRoutes.d.ts.map +1 -1
- package/dist/server/fileRoutes.js +9 -0
- package/dist/server/fileRoutes.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +334 -5
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +65 -65
- package/src/data/provenanceCoverage.ts +850 -0
- package/src/scaffold/templates/jobs/instar/llm-decision-grading.md +32 -0
- package/src/scaffold/templates.ts +2 -1
- package/upgrades/1.3.831.md +30 -0
- package/upgrades/1.3.832.md +22 -0
- package/upgrades/side-effects/llm-decision-quality-meter.md +95 -0
- package/upgrades/side-effects/messaging-tone-gate-provenance-enrollment.md +68 -0
|
@@ -31,6 +31,7 @@ import { EMPTY_SAMPLER_STATE, isSamplerDead } from './ExternalHogSampler.js';
|
|
|
31
31
|
import { EMPTY_KILL_LEDGER } from './ExternalHogKillLedger.js';
|
|
32
32
|
import { EMPTY_SUSTAINED_STATE } from './ExternalHogSustained.js';
|
|
33
33
|
import { externalHogEffectiveState } from './ExternalHogGuardStatus.js';
|
|
34
|
+
import { buildScanEvidenceView, EXTERNAL_HOG_SENTINEL_COMPONENT, HOG_ENACTED_DISPOSITION_RULE_ID, } from './ExternalHogDecisionStore.js';
|
|
34
35
|
const DEFAULT_DEFERRAL_MAP_MAX = 128;
|
|
35
36
|
/** Build a ProcTree (pid → node) from a parsed ps table — the ownership walk's input. */
|
|
36
37
|
export function buildProcTree(table) {
|
|
@@ -53,14 +54,30 @@ function isTerminal(o) {
|
|
|
53
54
|
export class ExternalHogSentinel {
|
|
54
55
|
adapters;
|
|
55
56
|
opts;
|
|
57
|
+
decisionQuality;
|
|
56
58
|
state = { sampler: EMPTY_SAMPLER_STATE, ledger: EMPTY_KILL_LEDGER, sustained: EMPTY_SUSTAINED_STATE };
|
|
57
59
|
/** ledgerKey → how many times this signature has been deferred (persisted across ticks). */
|
|
58
60
|
deferrals = new Map();
|
|
59
61
|
lastTickAt = null;
|
|
60
62
|
lastOutcomes = [];
|
|
61
|
-
|
|
63
|
+
/** Decision-quality counters (Observable Intelligence — visible in status()). */
|
|
64
|
+
dqRecordsWritten = 0;
|
|
65
|
+
dqGradeEvents = 0;
|
|
66
|
+
dqStoreErrors = 0;
|
|
67
|
+
constructor(adapters, opts,
|
|
68
|
+
/** §5.3 decision-quality wiring (optional — absent = no store writes, counted honestly). */
|
|
69
|
+
decisionQuality = {}) {
|
|
62
70
|
this.adapters = adapters;
|
|
63
71
|
this.opts = opts;
|
|
72
|
+
this.decisionQuality = decisionQuality;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The durable §5.3 decision store the P9 grading endpoint reads (window-close
|
|
76
|
+
* `hog-sustained-right-v1` over `list()`); null when the store is unwired
|
|
77
|
+
* (the grade-pass then grades nothing for the hog point — honest). Read-only.
|
|
78
|
+
*/
|
|
79
|
+
decisionStoreRef() {
|
|
80
|
+
return this.decisionQuality.decisionStore ?? null;
|
|
64
81
|
}
|
|
65
82
|
/**
|
|
66
83
|
* Run one scan tick. Reads the real table + owned pids (async, off-loop), then delegates the
|
|
@@ -77,7 +94,7 @@ export class ExternalHogSentinel {
|
|
|
77
94
|
buildOwnership: () => ({ tree, owned }),
|
|
78
95
|
factsFor: (c) => this.adapters.factsFor(c, table),
|
|
79
96
|
identityFor: (c, f) => this.adapters.identityFor(c, f),
|
|
80
|
-
classify: (f) => this.adapters.classify(f),
|
|
97
|
+
classify: (f, p) => this.adapters.classify(f, p),
|
|
81
98
|
killFunnelDeps: this.adapters.killFunnelDeps,
|
|
82
99
|
nowMs: () => this.adapters.nowMs(),
|
|
83
100
|
deferralsFor: (key) => this.deferrals.get(key) ?? 0,
|
|
@@ -87,10 +104,78 @@ export class ExternalHogSentinel {
|
|
|
87
104
|
this.updateDeferrals(result.outcomes);
|
|
88
105
|
this.lastOutcomes = result.outcomes.slice(-16);
|
|
89
106
|
this.lastTickAt = this.adapters.nowMs();
|
|
107
|
+
this.recordDecisions(result.outcomes, table);
|
|
90
108
|
this.adapters.deliverNotices(result.notices);
|
|
91
109
|
this.emitAudit(result.outcomes);
|
|
92
110
|
return result;
|
|
93
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Persist this tick's decisions into the durable §5.3 store and route the resulting
|
|
114
|
+
* annotations. The store's `record()` runs grade-on-supersede — the positive-evidence
|
|
115
|
+
* rules (respawn-wrong / leave-recurrence) fire HERE, because every fully-identified
|
|
116
|
+
* candidate produces exactly one decision write per tick, so a same-commandHash
|
|
117
|
+
* re-flag ALWAYS arrives as a same-ledgerKey supersede (the "scan ticks +
|
|
118
|
+
* grade-on-supersede" §5.3 paths are one funnel by construction). Window-close
|
|
119
|
+
* grading (hog-sustained-right-v1) belongs to the P9 grading job reading the store.
|
|
120
|
+
* Never throws into the tick; failures are counted, never silent (status()).
|
|
121
|
+
*/
|
|
122
|
+
recordDecisions(outcomes, table) {
|
|
123
|
+
const store = this.decisionQuality.decisionStore;
|
|
124
|
+
if (!store || outcomes.length === 0)
|
|
125
|
+
return;
|
|
126
|
+
const scan = buildScanEvidenceView(outcomes, table);
|
|
127
|
+
const events = [];
|
|
128
|
+
for (const o of outcomes) {
|
|
129
|
+
try {
|
|
130
|
+
events.push(...store.record(o.decision, scan));
|
|
131
|
+
this.dqRecordsWritten++;
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
// @silent-fallback-ok: NOT silent — counted in dqStoreErrors and surfaced on
|
|
135
|
+
// status().decisionQuality; a persist failure (disk full/perms) must never
|
|
136
|
+
// break the scan tick it observes. The decision then ages out `unknown`.
|
|
137
|
+
this.dqStoreErrors++;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
this.dqGradeEvents += events.length;
|
|
141
|
+
// §5.3 immediate enacted-disposition self-report (rung self-report, rule
|
|
142
|
+
// hog-enacted-disposition-v1) + the positive-evidence grade annotations.
|
|
143
|
+
// The annotate seam is the §5.4 chokepoint binding; while unbound (P6
|
|
144
|
+
// handoff) the store still carries everything a later grading pass needs.
|
|
145
|
+
const annotate = this.decisionQuality.annotate;
|
|
146
|
+
if (!annotate)
|
|
147
|
+
return;
|
|
148
|
+
for (const o of outcomes) {
|
|
149
|
+
if (!o.decision.correlationId)
|
|
150
|
+
continue; // never fabricate a join key
|
|
151
|
+
this.safeAnnotate(annotate, {
|
|
152
|
+
correlationId: o.decision.correlationId,
|
|
153
|
+
gradedBy: { component: EXTERNAL_HOG_SENTINEL_COMPONENT, ruleId: HOG_ENACTED_DISPOSITION_RULE_ID },
|
|
154
|
+
grade: 'unknown', // a self-report records WHAT WAS ENACTED, never correctness
|
|
155
|
+
evidence: { kind: 'hog-enacted-disposition', enacted: o.enacted, classId: o.classId },
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
for (const ev of events) {
|
|
159
|
+
if (!ev.correlationId)
|
|
160
|
+
continue;
|
|
161
|
+
this.safeAnnotate(annotate, {
|
|
162
|
+
correlationId: ev.correlationId,
|
|
163
|
+
gradedBy: { component: EXTERNAL_HOG_SENTINEL_COMPONENT, ruleId: ev.ruleId },
|
|
164
|
+
grade: ev.grade,
|
|
165
|
+
evidence: { kind: 'hog-evidence', windowMs: ev.windowMs, note: ev.evidenceNote },
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
safeAnnotate(annotate, annotation) {
|
|
170
|
+
try {
|
|
171
|
+
annotate(annotation);
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// @silent-fallback-ok: an annotation write failure must never propagate into the
|
|
175
|
+
// scan tick it observes; the decision then honestly ages out `unknown` (§5.4.6),
|
|
176
|
+
// and the chokepoint counts its own rejections.
|
|
177
|
+
}
|
|
178
|
+
}
|
|
94
179
|
/**
|
|
95
180
|
* The `/guards` runtime getter (GuardRegistry). `lastTickAt` is the last SUCCESSFUL PARSE (the
|
|
96
181
|
* sampler heartbeat), NOT the tick time — so a sentinel that is ticking but BLIND (ps failing,
|
|
@@ -123,6 +208,13 @@ export class ExternalHogSentinel {
|
|
|
123
208
|
lastTickAt: this.lastTickAt,
|
|
124
209
|
recentOutcomes: this.lastOutcomes,
|
|
125
210
|
trackedDeferrals: this.deferrals.size,
|
|
211
|
+
decisionQuality: {
|
|
212
|
+
storeWired: !!this.decisionQuality.decisionStore,
|
|
213
|
+
annotateBound: !!this.decisionQuality.annotate,
|
|
214
|
+
recordsWritten: this.dqRecordsWritten,
|
|
215
|
+
gradeEvents: this.dqGradeEvents,
|
|
216
|
+
storeErrors: this.dqStoreErrors,
|
|
217
|
+
},
|
|
126
218
|
};
|
|
127
219
|
}
|
|
128
220
|
/** Bump deferral counts for live deferrals; clear resolved targets; bound the map. */
|
|
@@ -165,4 +257,36 @@ export class ExternalHogSentinel {
|
|
|
165
257
|
}
|
|
166
258
|
}
|
|
167
259
|
}
|
|
260
|
+
// ── TODO(P6-handoff): production chokepoint binding — SINGLE handoff point ──
|
|
261
|
+
// The hardened §5.4 annotate chokepoint (correlationId keying + registry-
|
|
262
|
+
// derived rung + owner rejection; DecisionQualityRecorderImpl / the upgraded
|
|
263
|
+
// JudgmentProvenanceLog.annotateOutcome) was built CONCURRENTLY with this
|
|
264
|
+
// wiring and was not importable at P7 build time. When it lands, bind BOTH
|
|
265
|
+
// decision-quality arms at the sentinel construction site
|
|
266
|
+
// (commands/server.ts, the `new ExternalHogSentinel(...)` call) — passing
|
|
267
|
+
// EXACTLY:
|
|
268
|
+
//
|
|
269
|
+
// new ExternalHogSentinel(ehAdapters, { ...opts }, {
|
|
270
|
+
// decisionStore: new ExternalHogDecisionStore({
|
|
271
|
+
// stateDir: config.stateDir,
|
|
272
|
+
// config, // reads provenance.quality.{evidenceWindowHours,gradingSlackHours}
|
|
273
|
+
// killLedgerBreakerWindowMs: 3_600_000, // MUST equal opts.breaker.windowMs (§5.3 retention derivation)
|
|
274
|
+
// }),
|
|
275
|
+
// annotate: (a) => decisionQualityRecorder.annotateOutcome({
|
|
276
|
+
// correlationId: a.correlationId, // §5.4.1 keying
|
|
277
|
+
// gradedBy: a.gradedBy, // { component: 'ExternalHogSentinel', ruleId: 'hog-…-v1' }
|
|
278
|
+
// grade: a.grade, // enacted self-reports are 'unknown' + evidence.enacted
|
|
279
|
+
// evidence: a.evidence, // structured, content-free (§5.2 clamp discipline)
|
|
280
|
+
// }),
|
|
281
|
+
// });
|
|
282
|
+
//
|
|
283
|
+
// ALSO required at the same site: the ServerPrimitiveDeps.evaluate lambda must
|
|
284
|
+
// forward the provenance block into the intelligence options —
|
|
285
|
+
// evaluate: (prompt, provenance) => sharedIntelligence.evaluate(prompt, {
|
|
286
|
+
// model: 'fast',
|
|
287
|
+
// attribution: { component: 'ExternalHogClassifier' }, // must stay 1:1 with the census key
|
|
288
|
+
// ...(provenance ? { provenance } : {}),
|
|
289
|
+
// }),
|
|
290
|
+
// Until both land, `decisionQuality` stays {} → the sentinel counts the
|
|
291
|
+
// unwired arms honestly in status() and never fabricates a grade.
|
|
168
292
|
//# sourceMappingURL=ExternalHogSentinel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalHogSentinel.js","sourceRoot":"","sources":["../../src/monitoring/ExternalHogSentinel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wDAAwD;AAExD,OAAO,EAAE,WAAW,EAAmF,MAAM,0BAA0B,CAAC;AACxI,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAOlE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ExternalHogSentinel.js","sourceRoot":"","sources":["../../src/monitoring/ExternalHogSentinel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wDAAwD;AAExD,OAAO,EAAE,WAAW,EAAmF,MAAM,0BAA0B,CAAC;AACxI,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,O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H,CAAC;CACF;AAED,+EAA+E;AAC/E,0EAA0E;AAC1E,6EAA6E;AAC7E,0EAA0E;AAC1E,2EAA2E;AAC3E,0DAA0D;AAC1D,0EAA0E;AAC1E,WAAW;AACX,EAAE;AACF,uDAAuD;AACvD,oDAAoD;AACpD,mCAAmC;AACnC,qHAAqH;AACrH,iHAAiH;AACjH,UAAU;AACV,iEAAiE;AACjE,kEAAkE;AAClE,6GAA6G;AAC7G,0GAA0G;AAC1G,qGAAqG;AACrG,UAAU;AACV,QAAQ;AACR,EAAE;AACF,+EAA+E;AAC/E,+DAA+D;AAC/D,4EAA4E;AAC5E,qBAAqB;AACrB,kGAAkG;AAClG,6CAA6C;AAC7C,QAAQ;AACR,wEAAwE;AACxE,kEAAkE"}
|
|
@@ -8,14 +8,22 @@
|
|
|
8
8
|
* getter, the arm-file loader). The server passes the real implementations; a test passes fakes.
|
|
9
9
|
*/
|
|
10
10
|
import type { ExternalHogPrimitives } from './ExternalHogRealAdapters.js';
|
|
11
|
+
import type { DecisionProvenanceBlock } from '../core/decisionQualityTypes.js';
|
|
11
12
|
/** The low-level deps the server wires in. */
|
|
12
13
|
export interface ServerPrimitiveDeps {
|
|
13
14
|
/** Run a command off the event loop → stdout (execFile-based; rejects on non-zero exit). */
|
|
14
15
|
exec(cmd: string, args: readonly string[]): Promise<string>;
|
|
15
16
|
/** Send a signal (0 = aliveness probe). */
|
|
16
17
|
signal(pid: number, sig: 'SIGTERM' | 'SIGKILL' | 0): boolean;
|
|
17
|
-
/** The classifier model call (intelligence.evaluate, routed off-Claude by default).
|
|
18
|
-
|
|
18
|
+
/** The classifier model call (intelligence.evaluate, routed off-Claude by default).
|
|
19
|
+
* `provenance` (llm-decision-quality-meter §5.3): the server's lambda MUST forward it —
|
|
20
|
+
* `sharedIntelligence.evaluate(prompt, { model: 'fast',
|
|
21
|
+
* attribution: { component: 'ExternalHogClassifier' },
|
|
22
|
+
* ...(provenance ? { provenance } : {}) })`
|
|
23
|
+
* — so the kill/leave verdict is enrolled with the router's correlation spine. A lambda
|
|
24
|
+
* that ignores the second parameter still compiles but silently un-enrolls the sentinel's
|
|
25
|
+
* highest-consequence decision (the wiring-integrity test guards the shipped callsite). */
|
|
26
|
+
evaluate(prompt: string, provenance?: DecisionProvenanceBlock): Promise<string>;
|
|
19
27
|
/** Raise ONE attention item (already mapped to the platform's createAttentionItem in the server). */
|
|
20
28
|
raiseAttention(item: {
|
|
21
29
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalHogServerPrimitives.d.ts","sourceRoot":"","sources":["../../src/monitoring/ExternalHogServerPrimitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ExternalHogServerPrimitives.d.ts","sourceRoot":"","sources":["../../src/monitoring/ExternalHogServerPrimitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,4FAA4F;IAC5F,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5D,2CAA2C;IAC3C,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC;IAC7D;;;;;;;gGAO4F;IAC5F,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAChF,qGAAqG;IACrG,cAAc,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAA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puCoresOver(deps.exec, now, deps.sleep),
|
|
69
|
-
callModel: deps.evaluate,
|
|
69
|
+
callModel: (prompt, provenance) => deps.evaluate(prompt, provenance),
|
|
70
70
|
raiseAttention: deps.raiseAttention,
|
|
71
71
|
now,
|
|
72
72
|
ownEuid: () => deps.ownEuid,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalHogServerPrimitives.js","sourceRoot":"","sources":["../../src/monitoring/ExternalHogServerPrimitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ExternalHogServerPrimitives.js","sourceRoot":"","sources":["../../src/monitoring/ExternalHogServerPrimitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAgCxD,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,qCAAqC,CAAU,CAAC;AAEjF;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAA+D,EAC/D,KAAmB,EACnB,KAAoC;IAEpC,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;QAC7B,MAAM,OAAO,GAAG,KAAK,IAAgE,EAAE;YACrF,IAAI,CAAC;gBACH,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;gBACnB,MAAM,GAAG,GAAG,cAAc,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,iBAAiB,EAA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;gBACtF,mFAAmF;gBACnF,oFAAoF;gBACpF,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC;QACD,OAAO,EAAE,GAA0D,EAAE;YACnE,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACtC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;QAClE,CAAC;QACD,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAC;AACJ,CAAC"}
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
*
|
|
17
17
|
* The per-feature key is the existing IntelligenceOptions.attribution.component
|
|
18
18
|
* tag (e.g. "MessagingToneGate"); calls without one bucket under "unlabeled".
|
|
19
|
+
*
|
|
20
|
+
* Also owns the decision-quality substrate (llm-decision-quality-meter §5.5):
|
|
21
|
+
* the `decision_quality` / `decision_outcomes` / `decision_quality_rollup` /
|
|
22
|
+
* `decision_grading_cursor` tables plus the CANONICAL winning-grade derivation
|
|
23
|
+
* (the `decision_winning_grade` SQL view — the ONE place §5.4's precedence +
|
|
24
|
+
* within-rung rules live; both the read route and the rollup recompute consume
|
|
25
|
+
* it). Same posture as the metrics rows: synchronous WAL writes in isolated
|
|
26
|
+
* try/catch that NEVER throw into a caller, injected now() everywhere.
|
|
19
27
|
*/
|
|
20
28
|
import type { Database as BetterSqliteDatabase } from 'better-sqlite3';
|
|
21
29
|
export type FeatureMetricKind = 'llm' | 'event';
|
|
@@ -165,6 +173,114 @@ export interface SpendTokenBucket {
|
|
|
165
173
|
tokensOut: number;
|
|
166
174
|
tokensCached: number;
|
|
167
175
|
}
|
|
176
|
+
/** FD3: the bounded grade action space. `expired` is derived at READ, never written. */
|
|
177
|
+
export type DecisionGrade = 'right' | 'wrong' | 'unknown';
|
|
178
|
+
/** §5.4.2 — the grading ladder rung a registered evidence rule belongs to. */
|
|
179
|
+
export type GradingRung = 'deterministic-ground-truth' | 'recurrence' | 'llm-interpreter' | 'self-report';
|
|
180
|
+
/** §5.4.2 — evidence-strength class (proof-like vs heuristic are never conflated). */
|
|
181
|
+
export type EvidenceStrength = 'deterministic-proof' | 'negative-evidence' | 'recurrence-proxy' | 'self-report';
|
|
182
|
+
/**
|
|
183
|
+
* One settled ENROLLED decision (§5.5 `decision_quality` — ~250B content-free
|
|
184
|
+
* row, written by the router-settlement path for EVERY enrolled settlement
|
|
185
|
+
* REGARDLESS of volume class; the volume valve governs the provenance JSONL
|
|
186
|
+
* row only). All label fields are clamped content-free labels.
|
|
187
|
+
*/
|
|
188
|
+
export interface DecisionQualityRecord {
|
|
189
|
+
/** The §5.1 correlation id (`d-<machineId8>-<uuid>`); the write-once key. */
|
|
190
|
+
correlationId: string;
|
|
191
|
+
/** Census decision-point id (§5.6). */
|
|
192
|
+
decisionPoint: string;
|
|
193
|
+
/** attribution.component label (the census 1:1 enrollment-key convention). */
|
|
194
|
+
feature?: string;
|
|
195
|
+
/** Bounded §5.2 verdict class label. */
|
|
196
|
+
verdictClass?: string;
|
|
197
|
+
/** Who minted the id ('router' | 'breaker-floor' …) — mintedBy honesty. */
|
|
198
|
+
mintedBy?: string;
|
|
199
|
+
/** Census volume class ('full' | 'sampled:<rate>' | 'budget:<rows/day>'). */
|
|
200
|
+
volumeClass?: string;
|
|
201
|
+
/** 'metadata' | 'content-bearing'. */
|
|
202
|
+
contentClass?: string;
|
|
203
|
+
/** 8-char machine-id segment of the correlation id; nullable. */
|
|
204
|
+
machineId?: string;
|
|
205
|
+
model?: string;
|
|
206
|
+
framework?: string;
|
|
207
|
+
promptId?: string;
|
|
208
|
+
/** Defaults to now(). The rollup bucket is THIS ts's UTC day. */
|
|
209
|
+
ts?: number;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* One outcome annotation upsert (§5.5 `decision_outcomes`). The write key is
|
|
213
|
+
* correlationId × gradedBy (§5.4.4 — a re-run supersedes its own prior grade,
|
|
214
|
+
* never multiplies). Rung/strength arrive DERIVED from the ruleId registry at
|
|
215
|
+
* the annotate chokepoint — this substrate stores them and enum-guards the
|
|
216
|
+
* closed sets; registry/owner rejection-counting is the chokepoint's job.
|
|
217
|
+
*/
|
|
218
|
+
export interface DecisionOutcomeUpsert {
|
|
219
|
+
correlationId: string;
|
|
220
|
+
/** The grading COMPONENT (the ruleId's registered owner). */
|
|
221
|
+
gradedBy: string;
|
|
222
|
+
/** Immutable, versioned evidence-rule id (e.g. 'hog-respawn-wrong-v1'). */
|
|
223
|
+
ruleId: string;
|
|
224
|
+
rung: GradingRung;
|
|
225
|
+
evidenceStrength: EvidenceStrength;
|
|
226
|
+
grade: DecisionGrade;
|
|
227
|
+
/** Effective rule window recorded per outcome (§5.4.5 — semantics never mix silently). */
|
|
228
|
+
effectiveWindowMs?: number;
|
|
229
|
+
/** ≤500 scrubbed chars; NEVER served by /decision-quality. */
|
|
230
|
+
evidenceNote?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Orphan attribution hint (FD10): when no decision_quality parent exists on
|
|
233
|
+
* THIS machine, the orphan counter is bucketed under this decision point.
|
|
234
|
+
*/
|
|
235
|
+
decisionPoint?: string;
|
|
236
|
+
/** Defaults to now(). */
|
|
237
|
+
ts?: number;
|
|
238
|
+
}
|
|
239
|
+
export interface OutcomeUpsertResult {
|
|
240
|
+
/** True = the outcome row landed (orphan or not). */
|
|
241
|
+
applied: boolean;
|
|
242
|
+
/** True = no decision_quality parent on this machine (counted, never an error). */
|
|
243
|
+
orphan: boolean;
|
|
244
|
+
reason?: 'closed' | 'missing-key' | 'invalid-grade' | 'invalid-rung' | 'write-failed';
|
|
245
|
+
}
|
|
246
|
+
/** One row of the canonical winning-grade derivation (the `decision_winning_grade` view). */
|
|
247
|
+
export interface WinningGrade {
|
|
248
|
+
correlationId: string;
|
|
249
|
+
grade: DecisionGrade;
|
|
250
|
+
rung: GradingRung;
|
|
251
|
+
evidenceStrength: string;
|
|
252
|
+
ruleId: string;
|
|
253
|
+
gradedBy: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* One `decision_quality_rollup` bucket: decision_point × UTC day (the
|
|
257
|
+
* DECISION's day) × winning-grade counts + the event counters. `expired` is
|
|
258
|
+
* NOT a column — it is derived at read.
|
|
259
|
+
*/
|
|
260
|
+
export interface DecisionQualityRollupRow {
|
|
261
|
+
decisionPoint: string;
|
|
262
|
+
/** 'YYYY-MM-DD' UTC (the spend_token_rollup convention). */
|
|
263
|
+
day: string;
|
|
264
|
+
dayStartMs: number;
|
|
265
|
+
right: number;
|
|
266
|
+
wrong: number;
|
|
267
|
+
unknown: number;
|
|
268
|
+
orphanOutcomes: number;
|
|
269
|
+
joinMiss: number;
|
|
270
|
+
droppedByBudget: number;
|
|
271
|
+
}
|
|
272
|
+
/** The grading job's durable per-decision-point cursor (§5.5). */
|
|
273
|
+
export interface GradingCursor {
|
|
274
|
+
decisionPoint: string;
|
|
275
|
+
/** Keyset boundary: last graded (ts, correlation_id) compound position. */
|
|
276
|
+
cursorTs: number;
|
|
277
|
+
cursorCorrelationId: string;
|
|
278
|
+
/** P19 recheck backoff: earliest next re-evaluation; null = no backoff armed. */
|
|
279
|
+
nextRecheckTs: number | null;
|
|
280
|
+
attempts: number;
|
|
281
|
+
/** Last cursor write (injected clock) — the staleness key for cursor pruning. */
|
|
282
|
+
updatedAt: number;
|
|
283
|
+
}
|
|
168
284
|
/**
|
|
169
285
|
* Per-framework usage-reporting coverage (the drift tripwire's durable
|
|
170
286
|
* surface). Denominator = SUCCESSFUL llm rows only (fired + noop) — error
|
|
@@ -236,13 +352,23 @@ export interface FeatureMetricsLedgerOptions {
|
|
|
236
352
|
*/
|
|
237
353
|
maintainSpendRollup?: boolean;
|
|
238
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* Rollup event-counter columns (closed map — counter names never interpolate
|
|
357
|
+
* user input into SQL). These are EVENT counters, not derivable from the
|
|
358
|
+
* decisions⋈outcomes join, so the bucket recompute/reconcile preserves them.
|
|
359
|
+
*/
|
|
360
|
+
declare const QUALITY_COUNTER_COLUMNS: Record<'orphanOutcomes' | 'joinMiss' | 'droppedByBudget', string>;
|
|
239
361
|
export declare class FeatureMetricsLedger {
|
|
240
362
|
private db;
|
|
241
363
|
private now;
|
|
242
364
|
private insertStmt;
|
|
243
365
|
private rollupUpsertStmt;
|
|
366
|
+
/** Quality substrate (§5.5): null = the substrate failed to prepare; writes no-op. */
|
|
367
|
+
private decisionInsertStmt;
|
|
368
|
+
private outcomeUpsertStmt;
|
|
244
369
|
private readonly maintainSpendRollup;
|
|
245
370
|
private lastRollupReconcileMs;
|
|
371
|
+
private lastQualityReconcileMsValue;
|
|
246
372
|
private closed;
|
|
247
373
|
constructor(opts: FeatureMetricsLedgerOptions);
|
|
248
374
|
/** Add post-ship columns to an existing table, idempotently (pragma-guarded). */
|
|
@@ -332,6 +458,184 @@ export declare class FeatureMetricsLedger {
|
|
|
332
458
|
spendTokenRollupHourly(opts?: {
|
|
333
459
|
sinceHours?: number;
|
|
334
460
|
}): SpendTokenBucket[];
|
|
461
|
+
/**
|
|
462
|
+
* Record one settled ENROLLED decision (the router-settlement write). Write-
|
|
463
|
+
* once per correlation id (INSERT OR IGNORE — the first settlement wins; a
|
|
464
|
+
* duplicate settle is a no-op, never a rewrite). Synchronous WAL insert in an
|
|
465
|
+
* isolated try/catch — NEVER throws into the decision path (the record()
|
|
466
|
+
* posture), strictly ≤1 per settled decision.
|
|
467
|
+
*/
|
|
468
|
+
recordDecision(rec: DecisionQualityRecord): void;
|
|
469
|
+
/**
|
|
470
|
+
* Indexed COUNT of decision_quality rows for a point since `sinceMs` — the
|
|
471
|
+
* `budget:<rows/day>` volume-class enforcement read (§5.6: UTC-day window,
|
|
472
|
+
* restart-safe, no new state; rides idx_decision_quality_point_ts). Returns
|
|
473
|
+
* null when the count cannot be produced (closed / substrate degraded) —
|
|
474
|
+
* the caller decides the fail direction, honestly, rather than trusting a
|
|
475
|
+
* fabricated 0.
|
|
476
|
+
*/
|
|
477
|
+
countDecisionsSince(decisionPoint: string, sinceMs: number): number | null;
|
|
478
|
+
/**
|
|
479
|
+
* Upsert one outcome annotation (§5.4.4: key = correlationId × gradedBy — a
|
|
480
|
+
* re-run supersedes its own prior grade, never multiplies), then RECOMPUTE
|
|
481
|
+
* the affected (decision_point, decision-UTC-day) rollup bucket from
|
|
482
|
+
* decision_quality ⋈ decision_winning_grade (§5.5 reference implementation —
|
|
483
|
+
* bounded, self-healing; a grade flip decrements the old bucket column and
|
|
484
|
+
* increments the new one by construction). An outcome with no local parent
|
|
485
|
+
* row is an ORPHAN (FD10 cross-machine honesty): stored + counted under the
|
|
486
|
+
* caller's decisionPoint hint, never an error and never a graded decision.
|
|
487
|
+
* Never throws into the caller.
|
|
488
|
+
*/
|
|
489
|
+
upsertOutcome(o: DecisionOutcomeUpsert): OutcomeUpsertResult;
|
|
490
|
+
/**
|
|
491
|
+
* Recompute ONE (decision_point, day) bucket's winning-grade counts from
|
|
492
|
+
* truth via the canonical view. Event counters (orphan/joinMiss/dropped) are
|
|
493
|
+
* preserved — they are not derivable from the join. Caller holds the tx.
|
|
494
|
+
*/
|
|
495
|
+
private recomputeQualityBucketInTx;
|
|
496
|
+
/** In-tx counter bump (column name from the closed map — never interpolated input). */
|
|
497
|
+
private bumpQualityCounterInTx;
|
|
498
|
+
/**
|
|
499
|
+
* Increment a rollup EVENT counter (orphanOutcomes / joinMiss /
|
|
500
|
+
* droppedByBudget) for a decision point's UTC-day bucket. These counters are
|
|
501
|
+
* additive events (not recomputable from the join) and survive bucket
|
|
502
|
+
* recompute + reconcile. Never throws.
|
|
503
|
+
*/
|
|
504
|
+
bumpQualityCounter(decisionPoint: string, counter: keyof typeof QUALITY_COUNTER_COLUMNS, opts?: {
|
|
505
|
+
ts?: number;
|
|
506
|
+
n?: number;
|
|
507
|
+
}): void;
|
|
508
|
+
/**
|
|
509
|
+
* THE canonical winning-grade read (§5.5 — the single derivation API). Reads
|
|
510
|
+
* the `decision_winning_grade` view; chunked IN-lists keep parameter counts
|
|
511
|
+
* bounded. Fail-open to [].
|
|
512
|
+
*/
|
|
513
|
+
getWinningGrades(correlationIds: readonly string[]): WinningGrade[];
|
|
514
|
+
/**
|
|
515
|
+
* Bounded reconcile of the quality rollup's GRADE counts from raw truth
|
|
516
|
+
* (decision_quality ⋈ decision_winning_grade) over the last `days` of
|
|
517
|
+
* DECISION days — the §5.5 self-heal for a crash between the outcome upsert
|
|
518
|
+
* and its bucket recompute (and for a hand-corrupted bucket). Event counters
|
|
519
|
+
* are preserved. Idempotent fold; runs at boot (constructor) AND from the
|
|
520
|
+
* AgentServer 6h prune timer. Returns buckets written.
|
|
521
|
+
*/
|
|
522
|
+
reconcileQualityRollup(days: number): number;
|
|
523
|
+
/** When the quality rollup was last reconciled from raw truth (read-honesty surface). */
|
|
524
|
+
lastQualityReconcileMs(): number | null;
|
|
525
|
+
/** Quality rollup buckets (per decision_point × UTC day), oldest first. Fail-open to []. */
|
|
526
|
+
decisionQualityRollupDaily(opts?: {
|
|
527
|
+
sinceDays?: number;
|
|
528
|
+
decisionPoint?: string;
|
|
529
|
+
}): DecisionQualityRollupRow[];
|
|
530
|
+
/**
|
|
531
|
+
* Keyset walk of `decision_quality` rows for ONE point AFTER the compound
|
|
532
|
+
* cursor `(ts, correlation_id)` — the P9 grade-pass's bounded, same-ms-safe
|
|
533
|
+
* page (§5.5: "keyset pagination ORDER BY (ts, correlation_id) with the
|
|
534
|
+
* compound cursor as the page boundary — same-ms bursts cannot skip rows").
|
|
535
|
+
* Rides idx_decision_quality_point_ts (decision_point, ts, correlation_id).
|
|
536
|
+
* Content-free: only the join key + decision ts. Fail-open to [].
|
|
537
|
+
*/
|
|
538
|
+
walkDecisionsForGrading(decisionPoint: string, cursorTs: number, cursorCorrelationId: string, limit: number): Array<{
|
|
539
|
+
correlationId: string;
|
|
540
|
+
ts: number;
|
|
541
|
+
}>;
|
|
542
|
+
/**
|
|
543
|
+
* Per-decision-point read model for GET /decision-quality (§5.5): decision
|
|
544
|
+
* COUNT + distinct attribution labels (model/framework/prompt_id) over the
|
|
545
|
+
* window. Pure indexed reads. Fail-open to [].
|
|
546
|
+
*/
|
|
547
|
+
decisionPointStats(opts?: {
|
|
548
|
+
sinceHours?: number;
|
|
549
|
+
}): Array<{
|
|
550
|
+
decisionPoint: string;
|
|
551
|
+
decisions: number;
|
|
552
|
+
models: string[];
|
|
553
|
+
frameworks: string[];
|
|
554
|
+
promptIds: string[];
|
|
555
|
+
}>;
|
|
556
|
+
/**
|
|
557
|
+
* Grade breakdown for GET /decision-quality (§5.5): winning grades joined to
|
|
558
|
+
* their decision point over the window, grouped by (decisionPoint, ruleId,
|
|
559
|
+
* rung, evidenceStrength, grade). The route pivots these into
|
|
560
|
+
* by-strength/by-rule/by-rung views (strength FIRST — proof-like and
|
|
561
|
+
* heuristic grades are never conflated). Consumes the CANONICAL
|
|
562
|
+
* `decision_winning_grade` view (one derivation, both consumers). Window is on
|
|
563
|
+
* the DECISION ts. Fail-open to [].
|
|
564
|
+
*/
|
|
565
|
+
decisionGradeBreakdown(opts?: {
|
|
566
|
+
sinceHours?: number;
|
|
567
|
+
}): Array<{
|
|
568
|
+
decisionPoint: string;
|
|
569
|
+
ruleId: string;
|
|
570
|
+
rung: string;
|
|
571
|
+
evidenceStrength: string;
|
|
572
|
+
grade: string;
|
|
573
|
+
n: number;
|
|
574
|
+
}>;
|
|
575
|
+
/**
|
|
576
|
+
* Per-point count of EXPIRED decisions for GET /decision-quality (§5.5 read
|
|
577
|
+
* honesty): in-window decisions whose age exceeds `expiryCutoffMs` (the
|
|
578
|
+
* evidence-carrier horizon — beyond which no window-close grade can arrive)
|
|
579
|
+
* AND which carry NO winning grade. `expired` is derived at READ, never a
|
|
580
|
+
* stored grade. Fail-open to [].
|
|
581
|
+
*/
|
|
582
|
+
countExpiredByPoint(opts: {
|
|
583
|
+
sinceHours?: number;
|
|
584
|
+
expiryCutoffMs: number;
|
|
585
|
+
}): Array<{
|
|
586
|
+
decisionPoint: string;
|
|
587
|
+
expired: number;
|
|
588
|
+
}>;
|
|
589
|
+
/** The grading job's durable per-decision-point cursor. null = no cursor yet (or read failed). */
|
|
590
|
+
getGradingCursor(decisionPoint: string): GradingCursor | null;
|
|
591
|
+
/**
|
|
592
|
+
* Upsert the grading cursor (keyset boundary + P19 recheck backoff).
|
|
593
|
+
* `updated_at` is stamped from the injected clock — it is the staleness key
|
|
594
|
+
* cursor pruning keys on. Never throws.
|
|
595
|
+
*/
|
|
596
|
+
setGradingCursor(decisionPoint: string, c: {
|
|
597
|
+
cursorTs: number;
|
|
598
|
+
cursorCorrelationId: string;
|
|
599
|
+
nextRecheckTs?: number | null;
|
|
600
|
+
attempts?: number;
|
|
601
|
+
}): void;
|
|
602
|
+
/**
|
|
603
|
+
* Retention prune for `decision_quality` (default horizon 90d via
|
|
604
|
+
* provenance.quality.decisionRetentionDays). PRUNE_BATCH-bounded. Fail-open.
|
|
605
|
+
*/
|
|
606
|
+
pruneDecisionQuality(retentionDays: number, opts?: {
|
|
607
|
+
maxBatches?: number;
|
|
608
|
+
}): number;
|
|
609
|
+
/**
|
|
610
|
+
* Retention prune for `decision_outcomes`. Governed by the same
|
|
611
|
+
* decisionRetentionDays knob but FLOORED at 30d — grading evidence windows +
|
|
612
|
+
* slack need the outcomes to outlive the raw metrics horizon, so a
|
|
613
|
+
* mis-tuned low knob can never starve the grade join. Fail-open.
|
|
614
|
+
*/
|
|
615
|
+
pruneDecisionOutcomes(retentionDays: number, opts?: {
|
|
616
|
+
maxBatches?: number;
|
|
617
|
+
}): number;
|
|
618
|
+
/**
|
|
619
|
+
* Retention prune for the quality rollup (provenance.quality.rollupRetentionDays,
|
|
620
|
+
* default 90) — day-keyed like pruneSpendRollup, batch-bounded like the rest. Fail-open.
|
|
621
|
+
*/
|
|
622
|
+
pruneQualityRollup(retentionDays: number, opts?: {
|
|
623
|
+
maxBatches?: number;
|
|
624
|
+
}): number;
|
|
625
|
+
/**
|
|
626
|
+
* Cursor hygiene: a cursor row whose decision_point is REGISTERED is never
|
|
627
|
+
* pruned (pass the census's decision-point ids); an UNKNOWN point's cursor is
|
|
628
|
+
* pruned only once stale past `retentionDays` (updated_at — a live grading
|
|
629
|
+
* job re-stamps it every pass, so only a de-registered/abandoned point ages
|
|
630
|
+
* out; re-grading after a cursor loss converges idempotently). Fail-open.
|
|
631
|
+
*/
|
|
632
|
+
pruneGradingCursors(retentionDays: number, opts?: {
|
|
633
|
+
registeredDecisionPoints?: readonly string[];
|
|
634
|
+
maxBatches?: number;
|
|
635
|
+
}): number;
|
|
636
|
+
/** Shared bounded-DELETE loop (the pruneOlderThan idiom). Fail-open to count-so-far. */
|
|
637
|
+
private batchedPrune;
|
|
335
638
|
close(): void;
|
|
336
639
|
}
|
|
640
|
+
export {};
|
|
337
641
|
//# sourceMappingURL=FeatureMetricsLedger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureMetricsLedger.d.ts","sourceRoot":"","sources":["../../src/monitoring/FeatureMetricsLedger.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"FeatureMetricsLedger.d.ts","sourceRoot":"","sources":["../../src/monitoring/FeatureMetricsLedger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAMH,OAAO,KAAK,EAAE,QAAQ,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGvE,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,OAAO,CAAC;AAChD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,OAAO,EAAE,MAA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