@telora/daemon 0.18.33 → 0.18.37
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 +5 -3
- package/dist/completion/event-escalations.d.ts.map +1 -1
- package/dist/completion/event-escalations.js +25 -17
- package/dist/completion/event-escalations.js.map +1 -1
- package/dist/completion/event.d.ts +3 -12
- package/dist/completion/event.d.ts.map +1 -1
- package/dist/completion/event.js +50 -31
- package/dist/completion/event.js.map +1 -1
- package/dist/completion/progress-snapshot.d.ts +35 -0
- package/dist/completion/progress-snapshot.d.ts.map +1 -0
- package/dist/completion/progress-snapshot.js +105 -0
- package/dist/completion/progress-snapshot.js.map +1 -0
- package/dist/listener.d.ts.map +1 -1
- package/dist/listener.js +4 -0
- package/dist/listener.js.map +1 -1
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +1 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/issues.d.ts +12 -0
- package/dist/queries/issues.d.ts.map +1 -1
- package/dist/queries/issues.js +27 -0
- package/dist/queries/issues.js.map +1 -1
- package/dist/queries/schemas.d.ts +2 -0
- package/dist/queries/schemas.d.ts.map +1 -1
- package/dist/queries/schemas.js +1 -0
- package/dist/queries/schemas.js.map +1 -1
- package/dist/spawn-sandbox.d.ts +12 -8
- package/dist/spawn-sandbox.d.ts.map +1 -1
- package/dist/spawn-sandbox.js +25 -17
- package/dist/spawn-sandbox.js.map +1 -1
- package/dist/stall-detector-config.d.ts +24 -0
- package/dist/stall-detector-config.d.ts.map +1 -0
- package/dist/stall-detector-config.js +44 -0
- package/dist/stall-detector-config.js.map +1 -0
- package/dist/stall-detectors.d.ts +108 -0
- package/dist/stall-detectors.d.ts.map +1 -0
- package/dist/stall-detectors.js +225 -0
- package/dist/stall-detectors.js.map +1 -0
- package/dist/state-cascade.d.ts.map +1 -1
- package/dist/state-cascade.js +21 -0
- package/dist/state-cascade.js.map +1 -1
- package/dist/types/focus.d.ts +21 -0
- package/dist/types/focus.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Targeted daemon-owned stall detectors.
|
|
3
|
+
*
|
|
4
|
+
* The lifecycle-aware no-progress predicate (completion/event.ts) makes the
|
|
5
|
+
* generic watchdog PATIENT: it no longer trips on healthy review/verify/requeue
|
|
6
|
+
* latency. That patience is only safe if the genuinely-wedged daemon-owned
|
|
7
|
+
* cases it would otherwise have (noisily) surfaced are caught by dedicated
|
|
8
|
+
* detectors with their own actionable reasons. This module is that safety
|
|
9
|
+
* backfill:
|
|
10
|
+
*
|
|
11
|
+
* 1. verify_failed cycle cap -- a delivery whose verify_failed re-code cycle
|
|
12
|
+
* count (iteration_count) exceeds TELORA_VERIFY_FAILED_ITERATION_CAP is
|
|
13
|
+
* stuck in an unbounded re-code loop the verify gate will never clear. File
|
|
14
|
+
* ONE verify_gate_unclearable escalation (needs_operator) carrying the
|
|
15
|
+
* gate_state / last failing condition -- not a generic no-progress ping.
|
|
16
|
+
*
|
|
17
|
+
* 2. review-window staleness -- a focus stuck in the `reviewing` phase whose
|
|
18
|
+
* review_requested_at has sat past TELORA_REVIEW_WINDOW_STALE_HOURS with no
|
|
19
|
+
* active review team (a completed review would have cleared
|
|
20
|
+
* review_requested_at) is wedged. File ONE review_window_stalled escalation
|
|
21
|
+
* (needs_operator).
|
|
22
|
+
*
|
|
23
|
+
* BOTH detectors are PER-FOCUS and operate on state the caller already has --
|
|
24
|
+
* they do NOT fan out their own getActiveFocuses / getFocusDeliveries pass.
|
|
25
|
+
* They are driven from state-cascade.ts's runCascadeChecks loop, which already
|
|
26
|
+
* iterates active focuses, fetches each focus's deliveries, and computes the
|
|
27
|
+
* review phase: the detectors RIDE that existing review-handling seam (so there
|
|
28
|
+
* is no redundant per-poll fan-out, and the review-window detector is wired into
|
|
29
|
+
* the same review handling that owns review_requested_at). Each files AT MOST
|
|
30
|
+
* ONE open escalation per entity (per delivery / per focus), mirroring the
|
|
31
|
+
* merge-back stuck_focus_branch idempotency: the dedup queries the DB so it
|
|
32
|
+
* survives a daemon restart. Pure over injected deps so the four cases
|
|
33
|
+
* (under-cap, over-cap, fresh window, stale window) unit-test without
|
|
34
|
+
* Supabase/MCP.
|
|
35
|
+
*/
|
|
36
|
+
import type { FocusDeliveryInfo } from './types.js';
|
|
37
|
+
import { type CreateEscalationParams } from './queries/issues.js';
|
|
38
|
+
/**
|
|
39
|
+
* escalation_kind discriminators for the two stall detectors. Declared as
|
|
40
|
+
* daemon-local string constants (not imported from @telora/daemon-core's
|
|
41
|
+
* ESCALATION_KINDS) on purpose: the daemon consumes the registry-PUBLISHED
|
|
42
|
+
* daemon-core, so it cannot reference newly-added enum members until a build
|
|
43
|
+
* that depends on a daemon-core publish carrying them. They ARE now in
|
|
44
|
+
* daemon-core (ESCALATION_KINDS.VERIFY_GATE_UNCLEARABLE / .REVIEW_WINDOW_STALLED)
|
|
45
|
+
* for other consumers, but the daemon keeps the local strings so this code does
|
|
46
|
+
* not depend on publish ordering. The DB CHECK -- loosened by the
|
|
47
|
+
* agent_escalations_kind_stall_detectors migration -- is the real constraint.
|
|
48
|
+
*/
|
|
49
|
+
export declare const VERIFY_GATE_UNCLEARABLE_KIND = "verify_gate_unclearable";
|
|
50
|
+
export declare const REVIEW_WINDOW_STALLED_KIND = "review_window_stalled";
|
|
51
|
+
/** The per-focus context both detectors need to anchor an escalation. */
|
|
52
|
+
export interface FocusStallContext {
|
|
53
|
+
organizationId: string;
|
|
54
|
+
focusId: string;
|
|
55
|
+
focusName: string;
|
|
56
|
+
}
|
|
57
|
+
export interface VerifyFailedCapDeps {
|
|
58
|
+
hasOpenEscalationForDelivery: (deliveryId: string, escalationKind: string) => Promise<boolean>;
|
|
59
|
+
createEscalation: (params: CreateEscalationParams) => Promise<{
|
|
60
|
+
escalationId: string | null;
|
|
61
|
+
} | void>;
|
|
62
|
+
/** Override the cap for tests; defaults to the resolved env-config value. */
|
|
63
|
+
cap?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Pure decision: does this delivery exceed the verify_failed re-code cap?
|
|
67
|
+
* A terminal delivery (done/cancelled) is never escalated -- it has stopped
|
|
68
|
+
* cycling. Exported for direct unit testing.
|
|
69
|
+
*/
|
|
70
|
+
export declare function exceedsVerifyFailedCap(delivery: Pick<FocusDeliveryInfo, 'executionStatus' | 'iterationCount'>, cap: number): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Check ONE focus's ALREADY-FETCHED deliveries for any whose iteration_count
|
|
73
|
+
* exceeds the verify_failed re-code cap, filing a verify_gate_unclearable
|
|
74
|
+
* escalation (needs_operator) for each -- at most one open per delivery.
|
|
75
|
+
* Operates on the deliveries the caller (runCascadeChecks) already loaded; it
|
|
76
|
+
* does NOT fetch.
|
|
77
|
+
*/
|
|
78
|
+
export declare function checkVerifyFailedCapForFocus(ctx: FocusStallContext, deliveries: FocusDeliveryInfo[], deps?: VerifyFailedCapDeps): Promise<void>;
|
|
79
|
+
export interface ReviewWindowDeps {
|
|
80
|
+
hasOpenFocusEscalation: (focusId: string, escalationKind: string) => Promise<boolean>;
|
|
81
|
+
createEscalation: (params: CreateEscalationParams) => Promise<{
|
|
82
|
+
escalationId: string | null;
|
|
83
|
+
} | void>;
|
|
84
|
+
/** Focus IDs that currently have an active REVIEW team. Defaults to live teams. */
|
|
85
|
+
activeReviewFocusIds: () => Set<string>;
|
|
86
|
+
/** Current epoch ms; injectable for tests. Defaults to Date.now. */
|
|
87
|
+
now: () => number;
|
|
88
|
+
/** Override the staleness threshold (hours) for tests; defaults to env-config. */
|
|
89
|
+
thresholdHours?: number;
|
|
90
|
+
}
|
|
91
|
+
/** Focus IDs that currently have an active REVIEW team (live default). */
|
|
92
|
+
export declare function activeReviewFocusIds(): Set<string>;
|
|
93
|
+
/**
|
|
94
|
+
* Pure decision: is this focus's review window stale? True when a
|
|
95
|
+
* review_requested_at exists, is older than `thresholdMs`, and the focus has no
|
|
96
|
+
* active review team. A completed review clears review_requested_at, so a
|
|
97
|
+
* still-set timestamp older than the threshold with no active review team means
|
|
98
|
+
* the review never ran (or never finished). Exported for direct unit testing.
|
|
99
|
+
*/
|
|
100
|
+
export declare function isReviewWindowStale(reviewRequestedAt: string | null, hasActiveReview: boolean, nowMs: number, thresholdMs: number): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Check ONE focus for a stale review window and file a review_window_stalled
|
|
103
|
+
* escalation (needs_operator) -- at most one open per focus. The caller
|
|
104
|
+
* (runCascadeChecks) passes the focus's review_requested_at, so this rides the
|
|
105
|
+
* existing review-handling seam rather than fanning out its own focus scan.
|
|
106
|
+
*/
|
|
107
|
+
export declare function checkReviewWindowStaleForFocus(ctx: FocusStallContext, reviewRequestedAt: string | null, deps?: ReviewWindowDeps): Promise<void>;
|
|
108
|
+
//# sourceMappingURL=stall-detectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stall-detectors.d.ts","sourceRoot":"","sources":["../src/stall-detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAMpD,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAK7B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AACtE,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAcD,MAAM,WAAW,mBAAmB;IAClC,4BAA4B,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/F,gBAAgB,EAAE,CAAC,M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EACtB,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,IAAI,GAAE,gBAA0C,GAC/C,OAAO,CAAC,IAAI,CAAC,CA8Df"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Targeted daemon-owned stall detectors.
|
|
3
|
+
*
|
|
4
|
+
* The lifecycle-aware no-progress predicate (completion/event.ts) makes the
|
|
5
|
+
* generic watchdog PATIENT: it no longer trips on healthy review/verify/requeue
|
|
6
|
+
* latency. That patience is only safe if the genuinely-wedged daemon-owned
|
|
7
|
+
* cases it would otherwise have (noisily) surfaced are caught by dedicated
|
|
8
|
+
* detectors with their own actionable reasons. This module is that safety
|
|
9
|
+
* backfill:
|
|
10
|
+
*
|
|
11
|
+
* 1. verify_failed cycle cap -- a delivery whose verify_failed re-code cycle
|
|
12
|
+
* count (iteration_count) exceeds TELORA_VERIFY_FAILED_ITERATION_CAP is
|
|
13
|
+
* stuck in an unbounded re-code loop the verify gate will never clear. File
|
|
14
|
+
* ONE verify_gate_unclearable escalation (needs_operator) carrying the
|
|
15
|
+
* gate_state / last failing condition -- not a generic no-progress ping.
|
|
16
|
+
*
|
|
17
|
+
* 2. review-window staleness -- a focus stuck in the `reviewing` phase whose
|
|
18
|
+
* review_requested_at has sat past TELORA_REVIEW_WINDOW_STALE_HOURS with no
|
|
19
|
+
* active review team (a completed review would have cleared
|
|
20
|
+
* review_requested_at) is wedged. File ONE review_window_stalled escalation
|
|
21
|
+
* (needs_operator).
|
|
22
|
+
*
|
|
23
|
+
* BOTH detectors are PER-FOCUS and operate on state the caller already has --
|
|
24
|
+
* they do NOT fan out their own getActiveFocuses / getFocusDeliveries pass.
|
|
25
|
+
* They are driven from state-cascade.ts's runCascadeChecks loop, which already
|
|
26
|
+
* iterates active focuses, fetches each focus's deliveries, and computes the
|
|
27
|
+
* review phase: the detectors RIDE that existing review-handling seam (so there
|
|
28
|
+
* is no redundant per-poll fan-out, and the review-window detector is wired into
|
|
29
|
+
* the same review handling that owns review_requested_at). Each files AT MOST
|
|
30
|
+
* ONE open escalation per entity (per delivery / per focus), mirroring the
|
|
31
|
+
* merge-back stuck_focus_branch idempotency: the dedup queries the DB so it
|
|
32
|
+
* survives a daemon restart. Pure over injected deps so the four cases
|
|
33
|
+
* (under-cap, over-cap, fresh window, stale window) unit-test without
|
|
34
|
+
* Supabase/MCP.
|
|
35
|
+
*/
|
|
36
|
+
import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS, withRetry, } from '@telora/daemon-core';
|
|
37
|
+
import { createEscalation as defaultCreateEscalation, hasOpenEscalationForDelivery as defaultHasOpenEscalationForDelivery, hasOpenFocusEscalation as defaultHasOpenFocusEscalation, } from './queries/issues.js';
|
|
38
|
+
import { getActiveTeams } from './focus-executor.js';
|
|
39
|
+
import { isStatusTerminal } from './stage-classifier.js';
|
|
40
|
+
import { resolveVerifyFailedCap, resolveReviewWindowStaleHours } from './stall-detector-config.js';
|
|
41
|
+
/**
|
|
42
|
+
* escalation_kind discriminators for the two stall detectors. Declared as
|
|
43
|
+
* daemon-local string constants (not imported from @telora/daemon-core's
|
|
44
|
+
* ESCALATION_KINDS) on purpose: the daemon consumes the registry-PUBLISHED
|
|
45
|
+
* daemon-core, so it cannot reference newly-added enum members until a build
|
|
46
|
+
* that depends on a daemon-core publish carrying them. They ARE now in
|
|
47
|
+
* daemon-core (ESCALATION_KINDS.VERIFY_GATE_UNCLEARABLE / .REVIEW_WINDOW_STALLED)
|
|
48
|
+
* for other consumers, but the daemon keeps the local strings so this code does
|
|
49
|
+
* not depend on publish ordering. The DB CHECK -- loosened by the
|
|
50
|
+
* agent_escalations_kind_stall_detectors migration -- is the real constraint.
|
|
51
|
+
*/
|
|
52
|
+
export const VERIFY_GATE_UNCLEARABLE_KIND = 'verify_gate_unclearable';
|
|
53
|
+
export const REVIEW_WINDOW_STALLED_KIND = 'review_window_stalled';
|
|
54
|
+
/** Render gate_state compactly for the escalation body. */
|
|
55
|
+
function formatGateState(gateState) {
|
|
56
|
+
if (gateState == null)
|
|
57
|
+
return '(none recorded)';
|
|
58
|
+
try {
|
|
59
|
+
return JSON.stringify(gateState);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return '(unserializable)';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const defaultVerifyFailedCapDeps = {
|
|
66
|
+
hasOpenEscalationForDelivery: defaultHasOpenEscalationForDelivery,
|
|
67
|
+
createEscalation: defaultCreateEscalation,
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Pure decision: does this delivery exceed the verify_failed re-code cap?
|
|
71
|
+
* A terminal delivery (done/cancelled) is never escalated -- it has stopped
|
|
72
|
+
* cycling. Exported for direct unit testing.
|
|
73
|
+
*/
|
|
74
|
+
export function exceedsVerifyFailedCap(delivery, cap) {
|
|
75
|
+
if (isStatusTerminal(delivery.executionStatus ?? ''))
|
|
76
|
+
return false;
|
|
77
|
+
return (delivery.iterationCount ?? 0) > cap;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check ONE focus's ALREADY-FETCHED deliveries for any whose iteration_count
|
|
81
|
+
* exceeds the verify_failed re-code cap, filing a verify_gate_unclearable
|
|
82
|
+
* escalation (needs_operator) for each -- at most one open per delivery.
|
|
83
|
+
* Operates on the deliveries the caller (runCascadeChecks) already loaded; it
|
|
84
|
+
* does NOT fetch.
|
|
85
|
+
*/
|
|
86
|
+
export async function checkVerifyFailedCapForFocus(ctx, deliveries, deps = defaultVerifyFailedCapDeps) {
|
|
87
|
+
const cap = deps.cap ?? resolveVerifyFailedCap();
|
|
88
|
+
for (const delivery of deliveries) {
|
|
89
|
+
if (!exceedsVerifyFailedCap(delivery, cap))
|
|
90
|
+
continue;
|
|
91
|
+
try {
|
|
92
|
+
if (await deps.hasOpenEscalationForDelivery(delivery.id, VERIFY_GATE_UNCLEARABLE_KIND)) {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
await withRetry(() => deps.createEscalation({
|
|
96
|
+
organizationId: ctx.organizationId,
|
|
97
|
+
sessionId: '',
|
|
98
|
+
issueId: null,
|
|
99
|
+
reasonType: ESCALATION_REASONS.BLOCKED_BY_EXTERNAL,
|
|
100
|
+
// Operator triages the unclearable gate condition from gate_state.
|
|
101
|
+
disposition: ESCALATION_DISPOSITIONS.NEEDS_OPERATOR,
|
|
102
|
+
anchor: { deliveryId: delivery.id, focusId: ctx.focusId },
|
|
103
|
+
escalationKind: VERIFY_GATE_UNCLEARABLE_KIND,
|
|
104
|
+
description: `Delivery "${delivery.name}" has been through ${delivery.iterationCount ?? 0} ` +
|
|
105
|
+
`verify_failed re-code cycles (cap ${cap}) without clearing the verify gate. ` +
|
|
106
|
+
`The gate keeps rejecting the work -- the loop will not converge on its own.\n\n` +
|
|
107
|
+
`**Focus:** ${ctx.focusName}\n` +
|
|
108
|
+
`**Focus ID:** ${ctx.focusId}\n` +
|
|
109
|
+
`**Delivery:** "${delivery.name}" (${delivery.id})\n` +
|
|
110
|
+
`**Status:** ${delivery.executionStatus ?? 'unknown'}\n` +
|
|
111
|
+
`**iteration_count:** ${delivery.iterationCount ?? 0}\n` +
|
|
112
|
+
`**gate_state:** ${formatGateState(delivery.gateState)}\n\n` +
|
|
113
|
+
`Inspect the gate_state / last failing condition above. See docs/runbook-verify-gate.md.`,
|
|
114
|
+
whatWasTried: `The delivery re-entered verify_failed ${delivery.iterationCount ?? 0} times; ` +
|
|
115
|
+
`each verify pass was rejected by the gate and re-queued.`,
|
|
116
|
+
helpNeeded: `Resolve the blocking gate condition (relax the gate, fix the underlying defect ` +
|
|
117
|
+
`manually, or cancel the delivery if it cannot pass).`,
|
|
118
|
+
metadata: {
|
|
119
|
+
cause: VERIFY_GATE_UNCLEARABLE_KIND,
|
|
120
|
+
deliveryName: delivery.name,
|
|
121
|
+
executionStatus: delivery.executionStatus,
|
|
122
|
+
iterationCount: delivery.iterationCount ?? 0,
|
|
123
|
+
cap,
|
|
124
|
+
gateState: delivery.gateState ?? null,
|
|
125
|
+
},
|
|
126
|
+
}), { maxAttempts: 3, label: `escalation-verify-gate-unclearable-${delivery.id}` });
|
|
127
|
+
console.log(`[stall-detectors] Filed verify_gate_unclearable escalation for delivery "${delivery.name}" ` +
|
|
128
|
+
`(iteration_count ${delivery.iterationCount ?? 0} > cap ${cap})`);
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
console.warn(`[stall-detectors] verify-failed-cap: failed to file escalation for delivery "${delivery.name}":`, err.message);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/** Focus IDs that currently have an active REVIEW team (live default). */
|
|
136
|
+
export function activeReviewFocusIds() {
|
|
137
|
+
const ids = new Set();
|
|
138
|
+
for (const [focusId, team] of getActiveTeams()) {
|
|
139
|
+
if (team.sessionType === 'review')
|
|
140
|
+
ids.add(focusId);
|
|
141
|
+
}
|
|
142
|
+
return ids;
|
|
143
|
+
}
|
|
144
|
+
const defaultReviewWindowDeps = {
|
|
145
|
+
hasOpenFocusEscalation: defaultHasOpenFocusEscalation,
|
|
146
|
+
createEscalation: defaultCreateEscalation,
|
|
147
|
+
activeReviewFocusIds,
|
|
148
|
+
now: () => Date.now(),
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Pure decision: is this focus's review window stale? True when a
|
|
152
|
+
* review_requested_at exists, is older than `thresholdMs`, and the focus has no
|
|
153
|
+
* active review team. A completed review clears review_requested_at, so a
|
|
154
|
+
* still-set timestamp older than the threshold with no active review team means
|
|
155
|
+
* the review never ran (or never finished). Exported for direct unit testing.
|
|
156
|
+
*/
|
|
157
|
+
export function isReviewWindowStale(reviewRequestedAt, hasActiveReview, nowMs, thresholdMs) {
|
|
158
|
+
if (!reviewRequestedAt)
|
|
159
|
+
return false;
|
|
160
|
+
if (hasActiveReview)
|
|
161
|
+
return false;
|
|
162
|
+
const requestedMs = Date.parse(reviewRequestedAt);
|
|
163
|
+
if (Number.isNaN(requestedMs))
|
|
164
|
+
return false;
|
|
165
|
+
return nowMs - requestedMs > thresholdMs;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Check ONE focus for a stale review window and file a review_window_stalled
|
|
169
|
+
* escalation (needs_operator) -- at most one open per focus. The caller
|
|
170
|
+
* (runCascadeChecks) passes the focus's review_requested_at, so this rides the
|
|
171
|
+
* existing review-handling seam rather than fanning out its own focus scan.
|
|
172
|
+
*/
|
|
173
|
+
export async function checkReviewWindowStaleForFocus(ctx, reviewRequestedAt, deps = defaultReviewWindowDeps) {
|
|
174
|
+
const thresholdHours = deps.thresholdHours ?? resolveReviewWindowStaleHours();
|
|
175
|
+
const thresholdMs = thresholdHours * 3_600_000;
|
|
176
|
+
const nowMs = deps.now();
|
|
177
|
+
const hasActiveReview = deps.activeReviewFocusIds().has(ctx.focusId);
|
|
178
|
+
if (!isReviewWindowStale(reviewRequestedAt, hasActiveReview, nowMs, thresholdMs)) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
try {
|
|
182
|
+
if (await deps.hasOpenFocusEscalation(ctx.focusId, REVIEW_WINDOW_STALLED_KIND)) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const ageHours = Math.floor((nowMs - Date.parse(reviewRequestedAt)) / 3_600_000);
|
|
186
|
+
await withRetry(() => deps.createEscalation({
|
|
187
|
+
organizationId: ctx.organizationId,
|
|
188
|
+
sessionId: '',
|
|
189
|
+
issueId: null,
|
|
190
|
+
reasonType: ESCALATION_REASONS.BLOCKED_BY_EXTERNAL,
|
|
191
|
+
// Operator triages a review that was requested but never ran/finished.
|
|
192
|
+
disposition: ESCALATION_DISPOSITIONS.NEEDS_OPERATOR,
|
|
193
|
+
anchor: { focusId: ctx.focusId },
|
|
194
|
+
escalationKind: REVIEW_WINDOW_STALLED_KIND,
|
|
195
|
+
description: `Focus "${ctx.focusName}" requested a review ~${ageHours}h ago ` +
|
|
196
|
+
`(threshold ${thresholdHours}h) but no review is running and none has completed ` +
|
|
197
|
+
`(a completed review clears review_requested_at). The focus is wedged in the ` +
|
|
198
|
+
`review window -- its verify deliveries will never route to done/verify_failed ` +
|
|
199
|
+
`on their own.\n\n` +
|
|
200
|
+
`**Focus:** ${ctx.focusName}\n` +
|
|
201
|
+
`**Focus ID:** ${ctx.focusId}\n` +
|
|
202
|
+
`**review_requested_at:** ${reviewRequestedAt}\n\n` +
|
|
203
|
+
`Either re-spawn the review (clear and re-request the review window) or clear the ` +
|
|
204
|
+
`stale request via telora_product_focus update clearReviewRequest=true.`,
|
|
205
|
+
whatWasTried: `The review window was opened (review_requested_at set ~${ageHours}h ago) but no ` +
|
|
206
|
+
`review team is active and review_requested_at was never cleared by a completion.`,
|
|
207
|
+
helpNeeded: `Re-trigger the review or clear the stale review_requested_at ` +
|
|
208
|
+
`(telora_product_focus update clearReviewRequest=true) so the verify deliveries ` +
|
|
209
|
+
`can route forward.`,
|
|
210
|
+
metadata: {
|
|
211
|
+
cause: REVIEW_WINDOW_STALLED_KIND,
|
|
212
|
+
focusName: ctx.focusName,
|
|
213
|
+
reviewRequestedAt,
|
|
214
|
+
ageHours,
|
|
215
|
+
thresholdHours,
|
|
216
|
+
},
|
|
217
|
+
}), { maxAttempts: 3, label: `escalation-review-window-stalled-${ctx.focusId}` });
|
|
218
|
+
console.log(`[stall-detectors] Filed review_window_stalled escalation for focus "${ctx.focusName}" ` +
|
|
219
|
+
`(review_requested_at ~${ageHours}h old > ${thresholdHours}h)`);
|
|
220
|
+
}
|
|
221
|
+
catch (err) {
|
|
222
|
+
console.warn(`[stall-detectors] review-window: failed to file escalation for focus "${ctx.focusName}":`, err.message);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=stall-detectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stall-detectors.js","sourceRoot":"","sources":["../src/stall-detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,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f,KAAK,EAAE,mBAAmB,EAC1B,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,IAAI,GAAE,WAAyB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAyBf;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA2D1E"}
|
package/dist/state-cascade.js
CHANGED
|
@@ -34,6 +34,7 @@ import { configForProduct } from './config.js';
|
|
|
34
34
|
import { emitLoopTrigger } from './loop-event-bus.js';
|
|
35
35
|
import { deriveFocusPhase } from './focus-phase.js';
|
|
36
36
|
import { isReviewEnabled } from './pipeline-config.js';
|
|
37
|
+
import { checkVerifyFailedCapForFocus, checkReviewWindowStaleForFocus } from './stall-detectors.js';
|
|
37
38
|
const defaultDeps = {
|
|
38
39
|
getFocusDeliveries: _getFocusDeliveries,
|
|
39
40
|
setReviewRequestedAt: _setReviewRequestedAt,
|
|
@@ -165,6 +166,26 @@ export async function runCascadeChecks(config) {
|
|
|
165
166
|
});
|
|
166
167
|
await checkAutoReview(focus.focus_id, phase, focus.pipeline_config, focus.review_requested_at, deliveries);
|
|
167
168
|
await clearStaleReviewRequest(focus.focus_id, phase, focus.review_requested_at);
|
|
169
|
+
// Targeted daemon-owned stall detectors RIDE this same review-handling
|
|
170
|
+
// seam: they reuse the deliveries + review phase + review_requested_at
|
|
171
|
+
// already loaded above instead of fanning out a second per-poll
|
|
172
|
+
// getActiveFocuses/getFocusDeliveries pass.
|
|
173
|
+
const stallCtx = {
|
|
174
|
+
organizationId: pc.organizationId,
|
|
175
|
+
focusId: focus.focus_id,
|
|
176
|
+
focusName: focus.focus_name,
|
|
177
|
+
};
|
|
178
|
+
// (1) verify_failed re-code cap -> verify_gate_unclearable (per delivery).
|
|
179
|
+
await checkVerifyFailedCapForFocus(stallCtx, deliveries);
|
|
180
|
+
// (2) review-window staleness -> review_window_stalled (per focus).
|
|
181
|
+
// Gated on the cascade's own derived `reviewing` phase: a focus stuck
|
|
182
|
+
// in the review window is exactly phase === 'reviewing' with
|
|
183
|
+
// review_requested_at still set. (clearStaleReviewRequest above only
|
|
184
|
+
// clears on a coding/kickoff regression, so a still-'reviewing' phase
|
|
185
|
+
// means the request was not cleared this tick.)
|
|
186
|
+
if (phase === 'reviewing') {
|
|
187
|
+
await checkReviewWindowStaleForFocus(stallCtx, focus.review_requested_at);
|
|
188
|
+
}
|
|
168
189
|
}
|
|
169
190
|
catch (err) {
|
|
170
191
|
console.warn(`[state-cascade] Cascade pass failed for focus ${focus.focus_id}:`, err.message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-cascade.js","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACL,kBAAkB,IAAI,mBAAmB,EACzC,oBAAoB,IAAI,qBAAqB,EAC7C,sBAAsB,IAAI,uBAAuB,GAClD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAA4B,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"state-cascade.js","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACL,kBAAkB,IAAI,mBAAmB,EACzC,oBAAoB,IAAI,qBAA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AAC"}
|
package/dist/types/focus.d.ts
CHANGED
|
@@ -197,6 +197,20 @@ export interface ProgressSnapshot {
|
|
|
197
197
|
deliveryStatuses: Record<string, string>;
|
|
198
198
|
/** Total number of issues across all deliveries. */
|
|
199
199
|
totalIssueCount: number;
|
|
200
|
+
/**
|
|
201
|
+
* Map of delivery ID -> a stable fingerprint of its gate_state. Daemon-owned
|
|
202
|
+
* advancement: when the verify gate re-evaluates and the blocking conditions
|
|
203
|
+
* change, the fingerprint moves even though execution_status stays `verify`.
|
|
204
|
+
* Counting that as progress keeps the no-progress watchdog from climbing
|
|
205
|
+
* during healthy gate latency. Empty string when gate_state is null.
|
|
206
|
+
*/
|
|
207
|
+
deliveryGateFingerprints: Record<string, string>;
|
|
208
|
+
/**
|
|
209
|
+
* Map of delivery ID -> iteration_count. Daemon-owned advancement: the count
|
|
210
|
+
* increments each time a delivery enters verify_failed (a re-code cycle), so
|
|
211
|
+
* a moving count is forward motion the daemon drove, not a team stall.
|
|
212
|
+
*/
|
|
213
|
+
deliveryIterations: Record<string, number>;
|
|
200
214
|
}
|
|
201
215
|
/**
|
|
202
216
|
* Summary info about a delivery within the focus.
|
|
@@ -222,6 +236,13 @@ export interface FocusDeliveryInfo {
|
|
|
222
236
|
* the delivery is daemon-gate-stuck rather than team-stuck.
|
|
223
237
|
*/
|
|
224
238
|
gateState?: unknown | null;
|
|
239
|
+
/**
|
|
240
|
+
* Number of verify_failed re-code cycles this delivery has been through.
|
|
241
|
+
* Incremented by the DB trigger each time the delivery enters verify_failed.
|
|
242
|
+
* Read by the lifecycle-aware no-progress snapshot (a moving count is
|
|
243
|
+
* daemon-owned progress) and the verify_failed iteration-cap detector.
|
|
244
|
+
*/
|
|
245
|
+
iterationCount?: number;
|
|
225
246
|
}
|
|
226
247
|
/**
|
|
227
248
|
* Cross-delivery CG dependency declaration from planning output.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/types/focus.ts"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A0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,oEAAoE;IACpE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telora/daemon",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.37",
|
|
4
4
|
"description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"//testRunner": "Uses Node.js built-in test runner (node:test) via tsx for TypeScript support. The root package uses Vitest; this is a deliberate choice for the daemon package to avoid framework dependencies. See src/__tests__/ for test files.",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@telora/daemon-core": "^0.2.
|
|
39
|
+
"@telora/daemon-core": "^0.2.49",
|
|
40
40
|
"@telora/mcp-products": "^0.22.80",
|
|
41
41
|
"commander": "^14.0.3",
|
|
42
42
|
"yaml": "^2.4.0",
|