@telora/daemon 0.21.163 → 0.21.165

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/build-info.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "commitSha": "c3792d41f",
3
- "builtAt": "2026-08-25T13:36:54.563Z",
2
+ "commitSha": "f7b14bb6a",
3
+ "builtAt": "2026-08-25T20:55:04.546Z",
4
4
  "expectedMigrations": [
5
5
  "20250829113330_create_org_nodes_table.sql",
6
6
  "20250829113402_fix_function_security_search_path.sql",
@@ -766,6 +766,7 @@
766
766
  "20260824230956_add_departed_at_to_daemon_connections.sql",
767
767
  "20260824232230_add_stopping_to_daemon_connection_status.sql",
768
768
  "20260824233556_add_belief_expires_at_to_daemon_connections.sql",
769
- "20260824234248_cleanup_daemon_connections_reads_belief_lease.sql"
769
+ "20260824234248_cleanup_daemon_connections_reads_belief_lease.sql",
770
+ "20260825135341_cleanup_daemon_connections_records_sweep.sql"
770
771
  ]
771
772
  }
@@ -70,6 +70,18 @@ export declare function recordDeliveryTransition(params: {
70
70
  toStatus: string;
71
71
  transitionedAt?: string;
72
72
  }): Promise<void>;
73
+ /**
74
+ * Read a delivery's current gate_state (org_nodes.gate_state), or null when the
75
+ * row carries none. Used by the shortfall-repetition discriminator to compare
76
+ * this verify iteration's shortfall set against the one the previous iteration
77
+ * persisted. Reads the same `daemon_get_delivery_context` RPC (which selects the
78
+ * whole org_nodes row) and pulls the raw `gate_state` off it -- deliberately NOT
79
+ * the Zod-validated delivery domain shape, whose transform does not surface the
80
+ * per-origin gate_state detail this comparison needs.
81
+ *
82
+ * Injectable via CallApiDeps so tests exercise it without a live API.
83
+ */
84
+ export declare function getDeliveryGateState(deliveryId: string, deps?: CallApiDeps): Promise<DeliveryGateState | null>;
73
85
  /**
74
86
  * Update a delivery's execution status.
75
87
  * When currentWorkflowStageId is provided, the sync trigger
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.d.ts","sourceRoot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ACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,cAAc,GAAG,IAAI,CAAC;CACxC,CAAC,CAAC,CAcF;AAGD;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAAC,CAY1F"}
@@ -71,6 +71,30 @@ export async function recordDeliveryTransition(params) {
71
71
  ...(params.transitionedAt ? { transitionedAt: params.transitionedAt } : {}),
72
72
  });
73
73
  }
74
+ /**
75
+ * Read a delivery's current gate_state (org_nodes.gate_state), or null when the
76
+ * row carries none. Used by the shortfall-repetition discriminator to compare
77
+ * this verify iteration's shortfall set against the one the previous iteration
78
+ * persisted. Reads the same `daemon_get_delivery_context` RPC (which selects the
79
+ * whole org_nodes row) and pulls the raw `gate_state` off it -- deliberately NOT
80
+ * the Zod-validated delivery domain shape, whose transform does not surface the
81
+ * per-origin gate_state detail this comparison needs.
82
+ *
83
+ * Injectable via CallApiDeps so tests exercise it without a live API.
84
+ */
85
+ export async function getDeliveryGateState(deliveryId, deps = {}) {
86
+ const call = deps.callApi ?? callApi;
87
+ try {
88
+ const result = await call('daemon_get_delivery_context', { deliveryId });
89
+ const gateState = result?.context?.delivery?.gate_state;
90
+ return gateState != null ? gateState : null;
91
+ }
92
+ catch (error) {
93
+ if (error.message?.includes('not found'))
94
+ return null;
95
+ throw error;
96
+ }
97
+ }
74
98
  /**
75
99
  * Update a delivery's execution status.
76
100
  * When currentWorkflowStageId is provided, the sync trigger
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../src/queries/deliveries.ts"],"names":[],"mappings":"AA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AAO;QACL,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI;QACnC,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,IAAI;KAChC,CAAC;AACJ,CAAC"}
@@ -65,6 +65,25 @@ export interface ShortfallReconciliationDetail {
65
65
  /** The diff evidence grounding the shortfall, when the judge cited one. */
66
66
  diffCitation?: string;
67
67
  }>;
68
+ /**
69
+ * Cross-iteration repetition state (verify/shortfall-repeat.ts). Carries a
70
+ * stable signature of this shortfall set plus how many CONSECUTIVE iterations
71
+ * it has stood UNCHANGED. Persisted so the next iteration can tell a genuine
72
+ * (changing) shortfall from an unclearable (identical) one -- the former routes
73
+ * as ordinary re-work, the latter is diagnosed as a defective CLAIM. Absent on
74
+ * a shortfall written before this discriminator existed.
75
+ */
76
+ repeat?: {
77
+ signature: string;
78
+ count: number;
79
+ };
80
+ /**
81
+ * True when the repeat count reached the unclearable threshold: the shortfall
82
+ * reproduced identically enough times that it is a defect in the tree CLAIM,
83
+ * not team re-work. Set on the terminal hold that escalates the tree node and
84
+ * STOPS re-queuing; absent/false while the shortfall is still routing as re-work.
85
+ */
86
+ unclearableClaim?: boolean;
68
87
  }
69
88
  /**
70
89
  * Detail attached to gate_state when the verify path could NOT vouch for the
@@ -1 +1 @@
1
- {"version":3,"file":"delivery-gate-state.d.ts","sourceRoot":"","sources":["../../src/queries/delivery-gate-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,oFAAoF;IACpF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,wCAAwC;IACxC,QAAQ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AE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,uBAAuB,CAAC,EAAE,6BAA6B,CAAC;IACxD;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAC;IAChD;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE;QACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;;;OASG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC"}
1
+ {"version":3,"file":"delivery-gate-state.d.ts","sourceRoot":"","sources":["../../src/queries/delivery-gate-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,oFAAoF;IACpF,O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+1,92 @@
1
+ /**
2
+ * Shortfall REPETITION discriminator for the verify gate.
3
+ *
4
+ * A verify shortfall is, by construction, treated as an EXECUTION gap: the
5
+ * delivery re-queues and the team re-writes code against the declared target,
6
+ * bounded only by the far-off iteration cap (verify_gate_unclearable). But some
7
+ * shortfalls are not execution gaps at all -- the tree assigned the delivery an
8
+ * outcome its diff can NEVER produce (an over-claimed injection, a structurally
9
+ * unflippable UDE). Those manufacture the SAME shortfall every iteration and
10
+ * burn the full re-work cycle to no effect (the 2026-08-25 Tinker Tailor
11
+ * incident: 10 iterations, all correct-but-unclearable).
12
+ *
13
+ * Repetition is the available discriminator: a GENUINE shortfall changes as the
14
+ * team responds to feedback, while an UNCLEARABLE one reproduces identically.
15
+ * This module computes a stable signature of a shortfall set and, comparing it
16
+ * against the signature persisted from the previous iteration (in gate_state),
17
+ * counts how many consecutive iterations the shortfall has stood UNCHANGED. Once
18
+ * that count reaches the threshold, the caller diagnoses a DEFECT IN THE CLAIM
19
+ * (a modelling act for a human) instead of charging the team another re-work.
20
+ *
21
+ * SELF-CONTAINED / mock-safe: this module imports only a TYPE from the gate-state
22
+ * vocabulary (erased at build) and NO daemon-core VALUE, so it never drags the
23
+ * daemon-core mock-loader chain into a test. It is pure and deterministic --
24
+ * tested directly, no DB.
25
+ *
26
+ * @module verify/shortfall-repeat
27
+ */
28
+ import type { DeliveryGateState } from '../queries/delivery-gate-state.js';
29
+ import type { TargetShortfall } from './verify-restatement.js';
30
+ /** The persisted repeat state carried in gate_state (shortfallReconciliation.repeat). */
31
+ export interface ShortfallRepeat {
32
+ /** Stable signature of the shortfall set (see shortfallSignature). */
33
+ signature: string;
34
+ /** How many CONSECUTIVE iterations this exact signature has stood. >= 1. */
35
+ count: number;
36
+ }
37
+ /**
38
+ * How many consecutive identical shortfall iterations mark a claim as unclearable.
39
+ *
40
+ * JUDGMENT CALL (recorded here rather than defaulted silently): too LOW and a team
41
+ * legitimately re-attempting the same area gets cut off before it can respond; too
42
+ * HIGH and the loop stays expensive. The Tinker Tailor case ran to iteration 10
43
+ * and the Telora case to 6, so the current iteration cap is far too high to catch
44
+ * this early. 3 identical occurrences -- i.e. the shortfall survived TWO re-work
45
+ * responses unchanged -- is strong evidence the diff cannot move it, while still
46
+ * giving a responding team two full cycles to change something. Reversible: it is
47
+ * a single constant, tunable later, and overridable per-call for tests. Kept a
48
+ * daemon-local constant (not a TELORA_* env var) deliberately -- adding an env var
49
+ * would require a daemon-core publish; promote it there only if operators need to
50
+ * tune it live.
51
+ */
52
+ export declare const UNCLEARABLE_SHORTFALL_REPEAT_THRESHOLD = 3;
53
+ /**
54
+ * Compute a stable, order-independent signature of a shortfall set.
55
+ *
56
+ * Keyed on (nodeId, declaredStatement, reason) per targeted node, sorted by
57
+ * nodeId -- the fields that define "the same shortfall". DELIBERATELY EXCLUDES:
58
+ * - achievedStatement: the authored-from-evidence side can vary in wording
59
+ * across iterations while the underlying gap is identical;
60
+ * - diffCitation: cites the specific changed hunk, which churns every time the
61
+ * team edits ANYTHING, so including it would make an unclearable shortfall
62
+ * look "changed" and defeat the discriminator.
63
+ * So a team that genuinely changed its approach (different node targeted, or a
64
+ * different reason the gap stands) produces a different signature and keeps
65
+ * routing as ordinary re-work; a team stuck against an impossible claim produces
66
+ * the same signature every time.
67
+ */
68
+ export declare function shortfallSignature(shortfalls: readonly TargetShortfall[]): string;
69
+ /**
70
+ * Read the repeat state persisted on a delivery's gate_state by the previous
71
+ * shortfall iteration. Defensive over the loosely-typed `repeat` slot: returns
72
+ * null when the field is absent or malformed (a first shortfall, or a legacy row
73
+ * written before this field existed).
74
+ */
75
+ export declare function readPriorRepeat(priorGateState: DeliveryGateState | null | undefined): ShortfallRepeat | null;
76
+ /**
77
+ * Classify this iteration's shortfall set against the previous one.
78
+ *
79
+ * Compares the new signature to the prior persisted signature: an UNCHANGED
80
+ * signature increments the consecutive-repeat count; a CHANGED signature resets
81
+ * it to 1 (a team responding to real feedback is never cut short). The shortfall
82
+ * is UNCLEARABLE once the count reaches `threshold`.
83
+ *
84
+ * Pure -- the caller supplies the prior gate_state (read once) and persists the
85
+ * returned `repeat` back into the new gate_state so the next iteration compares
86
+ * against it.
87
+ */
88
+ export declare function classifyShortfallRepeat(priorGateState: DeliveryGateState | null | undefined, shortfalls: readonly TargetShortfall[], threshold?: number): {
89
+ repeat: ShortfallRepeat;
90
+ unclearable: boolean;
91
+ };
92
+ //# sourceMappingURL=shortfall-repeat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortfall-repeat.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-repeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,yFAAyF;AACzF,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAMxD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAKjF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAW5G;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,EACpD,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,SAAS,GAAE,MAA+C,GACzD;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAKnD"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Shortfall REPETITION discriminator for the verify gate.
3
+ *
4
+ * A verify shortfall is, by construction, treated as an EXECUTION gap: the
5
+ * delivery re-queues and the team re-writes code against the declared target,
6
+ * bounded only by the far-off iteration cap (verify_gate_unclearable). But some
7
+ * shortfalls are not execution gaps at all -- the tree assigned the delivery an
8
+ * outcome its diff can NEVER produce (an over-claimed injection, a structurally
9
+ * unflippable UDE). Those manufacture the SAME shortfall every iteration and
10
+ * burn the full re-work cycle to no effect (the 2026-08-25 Tinker Tailor
11
+ * incident: 10 iterations, all correct-but-unclearable).
12
+ *
13
+ * Repetition is the available discriminator: a GENUINE shortfall changes as the
14
+ * team responds to feedback, while an UNCLEARABLE one reproduces identically.
15
+ * This module computes a stable signature of a shortfall set and, comparing it
16
+ * against the signature persisted from the previous iteration (in gate_state),
17
+ * counts how many consecutive iterations the shortfall has stood UNCHANGED. Once
18
+ * that count reaches the threshold, the caller diagnoses a DEFECT IN THE CLAIM
19
+ * (a modelling act for a human) instead of charging the team another re-work.
20
+ *
21
+ * SELF-CONTAINED / mock-safe: this module imports only a TYPE from the gate-state
22
+ * vocabulary (erased at build) and NO daemon-core VALUE, so it never drags the
23
+ * daemon-core mock-loader chain into a test. It is pure and deterministic --
24
+ * tested directly, no DB.
25
+ *
26
+ * @module verify/shortfall-repeat
27
+ */
28
+ /**
29
+ * How many consecutive identical shortfall iterations mark a claim as unclearable.
30
+ *
31
+ * JUDGMENT CALL (recorded here rather than defaulted silently): too LOW and a team
32
+ * legitimately re-attempting the same area gets cut off before it can respond; too
33
+ * HIGH and the loop stays expensive. The Tinker Tailor case ran to iteration 10
34
+ * and the Telora case to 6, so the current iteration cap is far too high to catch
35
+ * this early. 3 identical occurrences -- i.e. the shortfall survived TWO re-work
36
+ * responses unchanged -- is strong evidence the diff cannot move it, while still
37
+ * giving a responding team two full cycles to change something. Reversible: it is
38
+ * a single constant, tunable later, and overridable per-call for tests. Kept a
39
+ * daemon-local constant (not a TELORA_* env var) deliberately -- adding an env var
40
+ * would require a daemon-core publish; promote it there only if operators need to
41
+ * tune it live.
42
+ */
43
+ export const UNCLEARABLE_SHORTFALL_REPEAT_THRESHOLD = 3;
44
+ function byId(a, b) {
45
+ return a < b ? -1 : a > b ? 1 : 0;
46
+ }
47
+ /**
48
+ * Compute a stable, order-independent signature of a shortfall set.
49
+ *
50
+ * Keyed on (nodeId, declaredStatement, reason) per targeted node, sorted by
51
+ * nodeId -- the fields that define "the same shortfall". DELIBERATELY EXCLUDES:
52
+ * - achievedStatement: the authored-from-evidence side can vary in wording
53
+ * across iterations while the underlying gap is identical;
54
+ * - diffCitation: cites the specific changed hunk, which churns every time the
55
+ * team edits ANYTHING, so including it would make an unclearable shortfall
56
+ * look "changed" and defeat the discriminator.
57
+ * So a team that genuinely changed its approach (different node targeted, or a
58
+ * different reason the gap stands) produces a different signature and keeps
59
+ * routing as ordinary re-work; a team stuck against an impossible claim produces
60
+ * the same signature every time.
61
+ */
62
+ export function shortfallSignature(shortfalls) {
63
+ const key = [...shortfalls]
64
+ .map((s) => ({ nodeId: s.nodeId, declared: s.declaredStatement, reason: s.reason }))
65
+ .sort((a, b) => byId(a.nodeId, b.nodeId));
66
+ return JSON.stringify(key);
67
+ }
68
+ /**
69
+ * Read the repeat state persisted on a delivery's gate_state by the previous
70
+ * shortfall iteration. Defensive over the loosely-typed `repeat` slot: returns
71
+ * null when the field is absent or malformed (a first shortfall, or a legacy row
72
+ * written before this field existed).
73
+ */
74
+ export function readPriorRepeat(priorGateState) {
75
+ const repeat = priorGateState?.shortfallReconciliation?.repeat;
76
+ if (repeat &&
77
+ typeof repeat.signature === 'string' &&
78
+ typeof repeat.count === 'number' &&
79
+ Number.isFinite(repeat.count)) {
80
+ return { signature: repeat.signature, count: repeat.count };
81
+ }
82
+ return null;
83
+ }
84
+ /**
85
+ * Classify this iteration's shortfall set against the previous one.
86
+ *
87
+ * Compares the new signature to the prior persisted signature: an UNCHANGED
88
+ * signature increments the consecutive-repeat count; a CHANGED signature resets
89
+ * it to 1 (a team responding to real feedback is never cut short). The shortfall
90
+ * is UNCLEARABLE once the count reaches `threshold`.
91
+ *
92
+ * Pure -- the caller supplies the prior gate_state (read once) and persists the
93
+ * returned `repeat` back into the new gate_state so the next iteration compares
94
+ * against it.
95
+ */
96
+ export function classifyShortfallRepeat(priorGateState, shortfalls, threshold = UNCLEARABLE_SHORTFALL_REPEAT_THRESHOLD) {
97
+ const signature = shortfallSignature(shortfalls);
98
+ const prior = readPriorRepeat(priorGateState);
99
+ const count = prior && prior.signature === signature ? prior.count + 1 : 1;
100
+ return { repeat: { signature, count }, unclearable: count >= threshold };
101
+ }
102
+ //# sourceMappingURL=shortfall-repeat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortfall-repeat.js","sourceRoot":"","sources":["../../src/verify/shortfall-repeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAaH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC;AAExD,SAAS,IAAI,CAAC,CAAS,EAAE,CAAS;IAChC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAsC;IACvE,MAAM,GAAG,GAAG,CAAC,GAAG,UAAU,CAAC;SACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;SACnF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,cAAoD;IAClF,MAAM,MAAM,GAAG,cAAc,EAAE,uBAAuB,EAAE,MAAM,CAAC;IAC/D,IACE,MAAM;QACN,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ;QACpC,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;QAChC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAC7B,CAAC;QACD,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;IAC9D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uBAAuB,CACrC,cAAoD,EACpD,UAAsC,EACtC,YAAoB,sCAAsC;IAE1D,MAAM,SAAS,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,IAAI,SAAS,EAAE,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Default wiring for the verification engine's injectable dependency surface.
3
+ *
4
+ * `verification-deps.ts` declares the CONTRACT (`VerificationDeps`); this module
5
+ * supplies the production implementations bound to a `DaemonConfig`. The two are
6
+ * deliberately separate files: the contract is what tests construct against, and
7
+ * the wiring is a long list of concrete imports that has no business inflating
8
+ * the engine's dispatch logic.
9
+ *
10
+ * Split out of `verification-engine.ts` for the same reason
11
+ * `verification-baseline.ts` keeps its own default wiring -- the engine owns
12
+ * strategy dispatch and the verify-gate decision tree, not the resolution of
13
+ * every collaborator those decisions call into.
14
+ *
15
+ * Direction of dependency is one-way: the engine imports `defaultDeps` from
16
+ * here; nothing here imports the engine. That is what keeps the verify family
17
+ * acyclic under the repo's `import-x/no-cycle` error gate.
18
+ *
19
+ * @module verification-deps-default
20
+ */
21
+ import type { DaemonConfig } from '../types/index.js';
22
+ import type { VerificationDeps } from './verification-deps.js';
23
+ export declare const defaultDeps: (config: DaemonConfig) => VerificationDeps;
24
+ //# sourceMappingURL=verification-deps-default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-deps-default.d.ts","sourceRoot":"","sources":["../../src/verify/verification-deps-default.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAoBH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAatD,OAAO,KAAK,EAA8B,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAoB3F,eAAO,MAAM,WAAW,GAAI,QAAQ,YAAY,KAAG,gBAgJlD,CAAC"}
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Default wiring for the verification engine's injectable dependency surface.
3
+ *
4
+ * `verification-deps.ts` declares the CONTRACT (`VerificationDeps`); this module
5
+ * supplies the production implementations bound to a `DaemonConfig`. The two are
6
+ * deliberately separate files: the contract is what tests construct against, and
7
+ * the wiring is a long list of concrete imports that has no business inflating
8
+ * the engine's dispatch logic.
9
+ *
10
+ * Split out of `verification-engine.ts` for the same reason
11
+ * `verification-baseline.ts` keeps its own default wiring -- the engine owns
12
+ * strategy dispatch and the verify-gate decision tree, not the resolution of
13
+ * every collaborator those decisions call into.
14
+ *
15
+ * Direction of dependency is one-way: the engine imports `defaultDeps` from
16
+ * here; nothing here imports the engine. That is what keeps the verify family
17
+ * acyclic under the repo's `import-x/no-cycle` error gate.
18
+ *
19
+ * @module verification-deps-default
20
+ */
21
+ import { runDeterministicStrategy } from './verification-deterministic.js';
22
+ import { getPendingVerifications, recordDeliveryVerificationOutcome, verifyInjectionOnPass, emitInwardDriftProposals, } from '../queries/verification.js';
23
+ import { configForProduct } from '../shell/config.js';
24
+ import { authorTargetRestatements as defaultAuthorTargetRestatements } from './verify-restatement.js';
25
+ import { fileEscalation as defaultFileEscalation } from '../completion/escalations.js';
26
+ import { getCommitsAhead, filterCommitsByDelivery, selectDeliveryCommitsAcrossBatches, batchHasDeliveryTrailer, batchHasUnattributedCommit, } from '../resolvers/index.js';
27
+ import { getActiveFocuses } from '../queries/focus-discovery.js';
28
+ import { resolveDefaultVerification as defaultResolveDefaultVerification } from './verification-config.js';
29
+ import { getFocusDeliveries } from '../queries/focuses.js';
30
+ import { deliverVerificationFailureFeedback, routeShortfallOutcome, requeueEvidenceUnavailableAsRework, } from './verification-feedback.js';
31
+ import { buildDefaultAttributeFailures, buildResolveVerificationCwd } from './verification-baseline.js';
32
+ import { resolveAiInspectionInputs as defaultResolveAiInspectionInputs } from './ai-inspection-context.js';
33
+ import { runAiInspection as defaultRunAiInspection } from './ai-inspection-runner.js';
34
+ import { buildDefaultSecurityFindingGateDeps } from '../security/security-finding-gate.js';
35
+ import { callApi } from '../queries/shared.js';
36
+ import { recordedMergeShaForVerify as recordedMergeShaForVerifyImpl } from './verification-evidence.js';
37
+ import { getRecordedCommitShasForMerge, getAllRecordedCommitShasForFocus, getRecordedPreMergeRefForMerge, evidenceValueOr, } from '../queries/deliveries.js';
38
+ async function defaultEmitDriftProposal(payload) {
39
+ await callApi('crt_drift_proposal_create', {
40
+ focusId: payload.focusId,
41
+ productId: payload.productId,
42
+ nodeId: payload.observation.nodeId,
43
+ proposalKind: payload.observation.kind,
44
+ observedState: payload.observation.observed,
45
+ proposedCorrection: payload.observation.suggestedCorrection,
46
+ });
47
+ }
48
+ export const defaultDeps = (config) => {
49
+ const resolveCwd = (productId) => {
50
+ if (!productId)
51
+ return config.repoPath;
52
+ const product = config.products.find(p => p.id === productId);
53
+ if (!product)
54
+ return config.repoPath;
55
+ return configForProduct(config, product).repoPath;
56
+ };
57
+ const resolveVerificationCwd = buildResolveVerificationCwd(resolveCwd);
58
+ return {
59
+ getPendingVerifications,
60
+ recordOutcome: recordDeliveryVerificationOutcome,
61
+ verifyInjection: verifyInjectionOnPass,
62
+ authorTargetRestatements: (injectionNodeId, focusId, evidence, evidenceIncomplete) => defaultAuthorTargetRestatements(injectionNodeId, focusId, evidence, {}, evidenceIncomplete),
63
+ fileEscalation: defaultFileEscalation,
64
+ organizationId: config.organizationId,
65
+ emitDriftProposal: defaultEmitDriftProposal,
66
+ emitInwardDrift: emitInwardDriftProposals,
67
+ runDeterministic: runDeterministicStrategy,
68
+ runAiInspection: defaultRunAiInspection,
69
+ resolveAiInspectionInputs: (v) => defaultResolveAiInspectionInputs(v, {
70
+ callApi,
71
+ resolveCwd,
72
+ integrationBranch: config.integrationBranch,
73
+ }),
74
+ resolveCwd,
75
+ integrationBranch: config.integrationBranch,
76
+ securityFindingGate: buildDefaultSecurityFindingGateDeps(),
77
+ resolveDefaultVerification: (c) => defaultResolveDefaultVerification(c),
78
+ getActiveFocuses,
79
+ getFocusDeliveries,
80
+ deliverFailureFeedback: (v, result) => deliverVerificationFailureFeedback(v, result, config.organizationId).then(() => undefined),
81
+ deliverShortfallFeedback: (v, shortfalls) => routeShortfallOutcome(v, shortfalls, config.organizationId).then(() => undefined),
82
+ requeueEvidenceUnavailableAsRework: (v, fault) => requeueEvidenceUnavailableAsRework(v, fault, config.organizationId).then(() => undefined),
83
+ resolveVerificationCwd,
84
+ resolveCommitsAhead: (v) => getCommitsAhead(resolveVerificationCwd(v), config.integrationBranch),
85
+ resolveRecordedCommitShas: async (v) => {
86
+ // Only look up the recorded commit set when the row records a merged-back
87
+ // git state with a merge sha (same gating as recordedMergeShaForVerify); an
88
+ // unmerged delivery has no focus_merges row and stays on the topology path.
89
+ const sha = recordedMergeShaForVerifyImpl(v);
90
+ if (!sha || !v.focusId)
91
+ return [];
92
+ const cwd = resolveVerificationCwd(v);
93
+ // Attribute the delivery from ITS OWN commits across the focus's WHOLE
94
+ // merge history, not just the batch stamped on its row. The stamped sha
95
+ // names the batch merged in the delivery's session, which is NOT
96
+ // necessarily the batch that carried its own commits: a delivery whose work
97
+ // landed in an EARLIER batch (or split across batches) is filtered to zero
98
+ // by a single-row lookup, and on a fast-forward merge-back that leaves the
99
+ // gate blind on merged, CI-green work (2026-08-15, delivery 4ab18c49).
100
+ // Searching every batch by the per-commit Telora-Delivery trailer recovers
101
+ // the delivery's commits regardless of which batch its row points at.
102
+ // Branch on the three-state history lookup: only a `found` history is worth
103
+ // partitioning. An `empty` (no history) or `undetermined` (API unreachable)
104
+ // result falls through to the single-row / legacy path -- and an undetermined
105
+ // read is reported as an instrument fault SEPARATELY (resolveEvidenceInstrumentFault),
106
+ // never silently collapsed into "no evidence" here.
107
+ const batches = await getAllRecordedCommitShasForFocus(v.focusId);
108
+ if (batches.state === 'found') {
109
+ const own = selectDeliveryCommitsAcrossBatches(cwd, batches.value, v.deliveryId);
110
+ if (own !== null)
111
+ return own;
112
+ }
113
+ // Total-legacy focus (no Telora-Delivery trailer anywhere -> the history is
114
+ // un-partitionable), no history, or an undetermined read: preserve the
115
+ // single-row behavior and judge against the batch stamped on the row.
116
+ const batch = await getRecordedCommitShasForMerge(v.focusId, sha);
117
+ return filterCommitsByDelivery(cwd, evidenceValueOr(batch, []), v.deliveryId);
118
+ },
119
+ resolveRecordedPreMergeRef: async (v) => {
120
+ // Same gating as resolveRecordedCommitShas: a pre-merge boundary exists only
121
+ // for a merged-back row keyed by the recorded merge sha. The boundary is
122
+ // batch-level (shared across the batch) -- the fast-forward-safe FALLBACK
123
+ // source, used when the per-delivery commit set came back empty.
124
+ const sha = recordedMergeShaForVerifyImpl(v);
125
+ if (!sha || !v.focusId)
126
+ return null;
127
+ const cwd = resolveVerificationCwd(v);
128
+ // But the boundary is only safe when the STAMPED batch actually carries
129
+ // THIS delivery's own commits. When the stamped batch holds NONE of them
130
+ // (its work is in another batch), <preMergeRef>...<stampedSha> would span a
131
+ // SIBLING delivery's work -- converting a blind gate into a confident WRONG
132
+ // verdict (tree node #19 / AC #4). Suppress the boundary in that case so the
133
+ // gate stays honestly blind and re-enters bounded re-work. An EMPTY stamped
134
+ // batch is exactly the fast-forward incident the boundary exists to cure
135
+ // (the per-delivery set came back empty) -- keep offering it there; a
136
+ // total-legacy (untrailered) batch also keeps it (no regression).
137
+ const batchShas = evidenceValueOr(await getRecordedCommitShasForMerge(v.focusId, sha), []);
138
+ if (batchShas.length > 0 && batchHasDeliveryTrailer(cwd, batchShas)) {
139
+ const own = filterCommitsByDelivery(cwd, batchShas, v.deliveryId);
140
+ if (own.length === 0)
141
+ return null;
142
+ }
143
+ const ref = await getRecordedPreMergeRefForMerge(v.focusId, sha);
144
+ return ref.state === 'found' ? ref.value : null;
145
+ },
146
+ resolveAttributionFailure: async (v) => {
147
+ // TOTAL ATTRIBUTION FAILURE: a recorded batch that carries NO delivery anchor
148
+ // AND contains genuinely UNATTRIBUTED commits, on a focus with MORE THAN ONE
149
+ // delivery. filterCommitsByDelivery returns the whole batch for such a set
150
+ // (its legacy fallback), and coverage then reports complete because the range
151
+ // covers that whole set exactly -- so without this signal the gate would
152
+ // render a confident verdict against the combined sibling diff. A
153
+ // single-delivery focus is genuinely unpartitionable, so it is NOT a failure
154
+ // and keeps today's behavior.
155
+ const sha = recordedMergeShaForVerifyImpl(v);
156
+ if (!sha || !v.focusId)
157
+ return null;
158
+ const batchLookup = await getRecordedCommitShasForMerge(v.focusId, sha);
159
+ // Only a `found` batch (query ran AND the row carries commits) can be a
160
+ // total-attribution failure. An `empty` batch has nothing to misattribute;
161
+ // an `undetermined` batch is a blind instrument, not a partition failure --
162
+ // reported distinctly via resolveEvidenceInstrumentFault, not here.
163
+ if (batchLookup.state !== 'found')
164
+ return null;
165
+ const batch = batchLookup.value;
166
+ const cwd = resolveVerificationCwd(v);
167
+ if (batchHasDeliveryTrailer(cwd, batch))
168
+ return null; // has a delivery to partition -> not a total failure
169
+ // No delivery anchor. A batch that is nonetheless COMPLETELY attributed --
170
+ // every commit an explicit non-delivery sentinel (daemon housekeeping) -- is
171
+ // fully accounted for, NOT a failure: the gate may render a verdict. Only a
172
+ // genuinely UNATTRIBUTED commit makes this the loud failure. The sentinel
173
+ // must never launder missing attribution into apparent completeness.
174
+ if (!batchHasUnattributedCommit(cwd, batch))
175
+ return null; // all-sentinel -> complete, no failure
176
+ const deliveries = await getFocusDeliveries(v.focusId);
177
+ if (deliveries.length <= 1)
178
+ return null; // genuine legacy single-delivery batch
179
+ return { batch: batch.length, deliveries: deliveries.length };
180
+ },
181
+ resolveEvidenceInstrumentFault: async (v) => {
182
+ // Probe whether the durable record could be READ at all. An `undetermined`
183
+ // lookup (the focus_merge_list API unreachable) is the instrument fault the
184
+ // gate must report DISTINCTLY from an honest empty record: it names the seam
185
+ // so a blind gate is diagnosable, rather than collapsing "could not
186
+ // determine" into "there is nothing here". Gated identically to the
187
+ // commit-set lookup -- an unmerged delivery has no record to read and is not
188
+ // a fault.
189
+ const sha = recordedMergeShaForVerifyImpl(v);
190
+ if (!sha || !v.focusId)
191
+ return null;
192
+ const history = await getAllRecordedCommitShasForFocus(v.focusId);
193
+ if (history.state === 'undetermined') {
194
+ return { seam: 'focus_merges (whole-history commit set)', reason: history.reason };
195
+ }
196
+ return null;
197
+ },
198
+ attributeFailures: buildDefaultAttributeFailures(config),
199
+ };
200
+ };
201
+ //# sourceMappingURL=verification-deps-default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-deps-default.js","sourceRoot":"","sources":["../../src/verify/verification-deps-default.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EACL,uBAAuB,EACvB,iCAA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