@telora/daemon 0.22.58 → 0.22.62
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 +2 -2
- package/dist/completion/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade.js +29 -4
- package/dist/completion/state-cascade.js.map +1 -1
- package/dist/directive/directive-executor.d.ts.map +1 -1
- package/dist/directive/directive-executor.js +1 -0
- package/dist/directive/directive-executor.js.map +1 -1
- package/dist/focus/focus-phase.d.ts.map +1 -1
- package/dist/focus/focus-phase.js +2 -1
- package/dist/focus/focus-phase.js.map +1 -1
- package/dist/focus/listener-spawn.d.ts +0 -44
- package/dist/focus/listener-spawn.d.ts.map +1 -1
- package/dist/focus/listener-spawn.js +61 -146
- package/dist/focus/listener-spawn.js.map +1 -1
- package/dist/focus-stage-lifecycle/planning-release.d.ts +3 -2
- package/dist/focus-stage-lifecycle/planning-release.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/planning-release.js +3 -2
- package/dist/focus-stage-lifecycle/planning-release.js.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +5 -3
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +8 -5
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/queries/escalation-suppression.d.ts.map +1 -1
- package/dist/queries/escalation-suppression.js +2 -1
- package/dist/queries/escalation-suppression.js.map +1 -1
- package/dist/queries/focuses.d.ts +13 -0
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +18 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/shell/control-state.d.ts +6 -5
- package/dist/shell/control-state.d.ts.map +1 -1
- package/dist/shell/control-state.js +6 -5
- package/dist/shell/control-state.js.map +1 -1
- package/dist/spawn/null-role-spawn.d.ts +109 -0
- package/dist/spawn/null-role-spawn.d.ts.map +1 -0
- package/dist/spawn/null-role-spawn.js +94 -0
- package/dist/spawn/null-role-spawn.js.map +1 -0
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +1 -2
- package/dist/types/session.js.map +1 -1
- package/dist/verify/stall-detectors.d.ts.map +1 -1
- package/dist/verify/stall-detectors.js +2 -1
- package/dist/verify/stall-detectors.js.map +1 -1
- package/dist/verify/unreviewed-settle-detector.d.ts +73 -0
- package/dist/verify/unreviewed-settle-detector.d.ts.map +1 -0
- package/dist/verify/unreviewed-settle-detector.js +147 -0
- package/dist/verify/unreviewed-settle-detector.js.map +1 -0
- package/package.json +1 -1
- package/dist/spawn/review-role-fallback.d.ts +0 -141
- package/dist/spawn/review-role-fallback.d.ts.map +0 -1
- package/dist/spawn/review-role-fallback.js +0 -114
- package/dist/spawn/review-role-fallback.js.map +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Null-role spawn policy: the single authority for whether a focus may run a
|
|
3
|
+
* team, and what to do with a pending spawn directive that resolves to a null
|
|
4
|
+
* (inert) assigned_agent_role_id.
|
|
5
|
+
*
|
|
6
|
+
* THE INVARIANT (focus fa557d6c -- "Arm gate bypassed"): a null
|
|
7
|
+
* assigned_agent_role_id is INERT. No team spawns on it, whatever the directive's
|
|
8
|
+
* origin (coding or review) or the focus's arm history. The sole spawn authority
|
|
9
|
+
* is a NON-NULL role -- a human arm. This module used to hold the opposite: a
|
|
10
|
+
* layered "reviewer-role fallback" that SUBSTITUTED the org's seeded Developer
|
|
11
|
+
* role for a null role and spawned. That substitution was the arm-gate bypass --
|
|
12
|
+
* it let a focus whose arm had been cleared (a lifecycle clear, or new work
|
|
13
|
+
* scoped onto a finished focus) spawn a team with no human go-signal, and it let
|
|
14
|
+
* focus-stage-lifecycle and the listener reach opposite verdicts about the same
|
|
15
|
+
* focus. It has been removed.
|
|
16
|
+
*
|
|
17
|
+
* Both the listener null-role path (focus/listener-spawn.ts) and the wedge
|
|
18
|
+
* watchdog (focus-stage-lifecycle/wedge-watchdog.ts) consult focusMayRunTeam, so
|
|
19
|
+
* the two cannot log contradictory decisions about the same focus in one tick.
|
|
20
|
+
*
|
|
21
|
+
* Continuations are unaffected: a review pass and a review-re-queued (gaps_found)
|
|
22
|
+
* delivery both run while their deliveries sit in verify/verify_failed
|
|
23
|
+
* (non-terminal), so auto_terminate_focus_team() never clears the arm and the
|
|
24
|
+
* continuation spawns under the HELD role -- never a substituted one (pinned by
|
|
25
|
+
* supabase/tests/focus_team_clear_review_window.test.sql). The one place that
|
|
26
|
+
* releases the arm outside that trigger (verify/unreviewed-settle-detector.ts)
|
|
27
|
+
* fires only on a settled focus whose review never ran and files
|
|
28
|
+
* review_window_stalled, so a directive stranded there is correctly refused, not
|
|
29
|
+
* force-spawned.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The single authority for whether a focus may run a team: a non-null assigned
|
|
33
|
+
* agent role. A null role is inert whatever the arm history, the directive
|
|
34
|
+
* origin, or an operator stop. Consulted by every module that asks "may this
|
|
35
|
+
* focus run a team?" so no two modules can disagree from the same row.
|
|
36
|
+
*
|
|
37
|
+
* A type predicate (`is string`) so a caller that gates on it narrows the role
|
|
38
|
+
* to a non-null string in the may-run branch without a second check.
|
|
39
|
+
*
|
|
40
|
+
* Pure and exported for unit testing.
|
|
41
|
+
*/
|
|
42
|
+
export declare function focusMayRunTeam(assignedAgentRoleId: string | null | undefined): assignedAgentRoleId is string;
|
|
43
|
+
/**
|
|
44
|
+
* What to do with a pending spawn directive whose focus has a null
|
|
45
|
+
* assigned_agent_role_id. A null role never spawns, so there is no `spawn`
|
|
46
|
+
* outcome -- only:
|
|
47
|
+
*
|
|
48
|
+
* - skip: an OPERATOR STOP (product_focuses.operator_stopped_at set). The
|
|
49
|
+
* human pulled the Play toggle to halt the focus; the directive is
|
|
50
|
+
* dropped quietly (not carried to resume). Authoritative -- it is
|
|
51
|
+
* its own suppression, distinct from a refusal.
|
|
52
|
+
* - refuse: any other null role -- a lifecycle clear (auto_terminate_focus_team
|
|
53
|
+
* cleared the arm at completion) or a never-armed focus. The directive
|
|
54
|
+
* is REFUSED and the refusal RECORDED (dropped so it cannot re-fire
|
|
55
|
+
* under a substituted role, and logged). The focus stays un-armed with
|
|
56
|
+
* no team until a human arms it.
|
|
57
|
+
*/
|
|
58
|
+
export type NullRoleSpawnDecision = {
|
|
59
|
+
action: 'skip';
|
|
60
|
+
} | {
|
|
61
|
+
action: 'refuse';
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Decide what to do with a null-role pending spawn directive. A null role NEVER
|
|
65
|
+
* spawns; the only question is whether this is an authoritative operator stop
|
|
66
|
+
* (drop quietly) or a refusal to record. Independent of the directive's
|
|
67
|
+
* sessionType and of the focus's arm history -- the arm-gate is unconditional.
|
|
68
|
+
*
|
|
69
|
+
* Pure and exported for unit testing.
|
|
70
|
+
*/
|
|
71
|
+
export declare function decideNullRoleSpawn(input: {
|
|
72
|
+
/**
|
|
73
|
+
* Whether an operator has stopped this focus (product_focuses.
|
|
74
|
+
* operator_stopped_at is set). An operator stop is an authoritative halt: the
|
|
75
|
+
* directive is dropped as a stop suppression rather than recorded as a refusal.
|
|
76
|
+
* A null role WITHOUT an operator stop is a lifecycle clear or a never-armed
|
|
77
|
+
* focus (an API unarm also sets operator_stopped_at -- see
|
|
78
|
+
* product-api focus crud), so `false` here means "refuse and record".
|
|
79
|
+
*/
|
|
80
|
+
operatorStopped: boolean;
|
|
81
|
+
}): NullRoleSpawnDecision;
|
|
82
|
+
/**
|
|
83
|
+
* Re-announce floor for the null-role refusal warning. The warning is emitted on
|
|
84
|
+
* entry and then AT MOST once per this interval while the block persists -- long
|
|
85
|
+
* enough that an inert focus does not spin-log every 30s poll, short enough that
|
|
86
|
+
* a block that persists keeps surfacing in the log for as long as it lasts. 30
|
|
87
|
+
* minutes.
|
|
88
|
+
*/
|
|
89
|
+
export declare const NULL_ROLE_SKIP_REANNOUNCE_FLOOR_MS: number;
|
|
90
|
+
/**
|
|
91
|
+
* Rate-limited re-announce gate for the null-role refusal warning. The listener
|
|
92
|
+
* holds a Map of focus id -> last-announce timestamp (ms) for the current
|
|
93
|
+
* continuous blocked episode; this mutates it and returns whether to emit the
|
|
94
|
+
* warning now:
|
|
95
|
+
*
|
|
96
|
+
* - focus never announced this episode -> record `nowMs` and return true
|
|
97
|
+
* (warn on entry).
|
|
98
|
+
* - last announced >= `floorMs` ago -> record `nowMs` and return true
|
|
99
|
+
* (re-announce: the block persists, keep surfacing it).
|
|
100
|
+
* - last announced < `floorMs` ago -> return false (suppress the repeat).
|
|
101
|
+
*
|
|
102
|
+
* The listener removes the focus from the map when it resumes (role assigned or
|
|
103
|
+
* focus leaves the active set), so a later re-entry warns immediately again.
|
|
104
|
+
* `nowMs`/`floorMs` are injectable so the decision is deterministic under test.
|
|
105
|
+
* Pure w.r.t. its inputs (Map + clock in, boolean out) and exported for unit
|
|
106
|
+
* testing without standing up the poll loop.
|
|
107
|
+
*/
|
|
108
|
+
export declare function shouldWarnNullRoleSkip(lastAnnouncedAt: Map<string, number>, focusId: string, nowMs?: number, floorMs?: number): boolean;
|
|
109
|
+
//# sourceMappingURL=null-role-spawn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-role-spawn.d.ts","sourceRoot":"","sources":["../../src/spawn/null-role-spawn.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,mBAAmB,IAAI,MAAM,CAE7G;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEzB;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC;;;;;;;OAOG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B,GAAG,qBAAqB,CAExB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC,QAAc,CAAC;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAmB,EAC1B,OAAO,GAAE,MAA2C,GACnD,OAAO,CAKT"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/focus/arm-gate-reopen-no-spawn.test.ts,
|
|
3
|
+
// packages/daemon/src/focus/listener-operator-stop-drop.test.ts,
|
|
4
|
+
// packages/daemon/src/spawn/null-role-spawn.test.ts
|
|
5
|
+
// PINNED-BY-END
|
|
6
|
+
/**
|
|
7
|
+
* Null-role spawn policy: the single authority for whether a focus may run a
|
|
8
|
+
* team, and what to do with a pending spawn directive that resolves to a null
|
|
9
|
+
* (inert) assigned_agent_role_id.
|
|
10
|
+
*
|
|
11
|
+
* THE INVARIANT (focus fa557d6c -- "Arm gate bypassed"): a null
|
|
12
|
+
* assigned_agent_role_id is INERT. No team spawns on it, whatever the directive's
|
|
13
|
+
* origin (coding or review) or the focus's arm history. The sole spawn authority
|
|
14
|
+
* is a NON-NULL role -- a human arm. This module used to hold the opposite: a
|
|
15
|
+
* layered "reviewer-role fallback" that SUBSTITUTED the org's seeded Developer
|
|
16
|
+
* role for a null role and spawned. That substitution was the arm-gate bypass --
|
|
17
|
+
* it let a focus whose arm had been cleared (a lifecycle clear, or new work
|
|
18
|
+
* scoped onto a finished focus) spawn a team with no human go-signal, and it let
|
|
19
|
+
* focus-stage-lifecycle and the listener reach opposite verdicts about the same
|
|
20
|
+
* focus. It has been removed.
|
|
21
|
+
*
|
|
22
|
+
* Both the listener null-role path (focus/listener-spawn.ts) and the wedge
|
|
23
|
+
* watchdog (focus-stage-lifecycle/wedge-watchdog.ts) consult focusMayRunTeam, so
|
|
24
|
+
* the two cannot log contradictory decisions about the same focus in one tick.
|
|
25
|
+
*
|
|
26
|
+
* Continuations are unaffected: a review pass and a review-re-queued (gaps_found)
|
|
27
|
+
* delivery both run while their deliveries sit in verify/verify_failed
|
|
28
|
+
* (non-terminal), so auto_terminate_focus_team() never clears the arm and the
|
|
29
|
+
* continuation spawns under the HELD role -- never a substituted one (pinned by
|
|
30
|
+
* supabase/tests/focus_team_clear_review_window.test.sql). The one place that
|
|
31
|
+
* releases the arm outside that trigger (verify/unreviewed-settle-detector.ts)
|
|
32
|
+
* fires only on a settled focus whose review never ran and files
|
|
33
|
+
* review_window_stalled, so a directive stranded there is correctly refused, not
|
|
34
|
+
* force-spawned.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* The single authority for whether a focus may run a team: a non-null assigned
|
|
38
|
+
* agent role. A null role is inert whatever the arm history, the directive
|
|
39
|
+
* origin, or an operator stop. Consulted by every module that asks "may this
|
|
40
|
+
* focus run a team?" so no two modules can disagree from the same row.
|
|
41
|
+
*
|
|
42
|
+
* A type predicate (`is string`) so a caller that gates on it narrows the role
|
|
43
|
+
* to a non-null string in the may-run branch without a second check.
|
|
44
|
+
*
|
|
45
|
+
* Pure and exported for unit testing.
|
|
46
|
+
*/
|
|
47
|
+
export function focusMayRunTeam(assignedAgentRoleId) {
|
|
48
|
+
return assignedAgentRoleId != null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Decide what to do with a null-role pending spawn directive. A null role NEVER
|
|
52
|
+
* spawns; the only question is whether this is an authoritative operator stop
|
|
53
|
+
* (drop quietly) or a refusal to record. Independent of the directive's
|
|
54
|
+
* sessionType and of the focus's arm history -- the arm-gate is unconditional.
|
|
55
|
+
*
|
|
56
|
+
* Pure and exported for unit testing.
|
|
57
|
+
*/
|
|
58
|
+
export function decideNullRoleSpawn(input) {
|
|
59
|
+
return input.operatorStopped ? { action: 'skip' } : { action: 'refuse' };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Re-announce floor for the null-role refusal warning. The warning is emitted on
|
|
63
|
+
* entry and then AT MOST once per this interval while the block persists -- long
|
|
64
|
+
* enough that an inert focus does not spin-log every 30s poll, short enough that
|
|
65
|
+
* a block that persists keeps surfacing in the log for as long as it lasts. 30
|
|
66
|
+
* minutes.
|
|
67
|
+
*/
|
|
68
|
+
export const NULL_ROLE_SKIP_REANNOUNCE_FLOOR_MS = 30 * 60_000;
|
|
69
|
+
/**
|
|
70
|
+
* Rate-limited re-announce gate for the null-role refusal warning. The listener
|
|
71
|
+
* holds a Map of focus id -> last-announce timestamp (ms) for the current
|
|
72
|
+
* continuous blocked episode; this mutates it and returns whether to emit the
|
|
73
|
+
* warning now:
|
|
74
|
+
*
|
|
75
|
+
* - focus never announced this episode -> record `nowMs` and return true
|
|
76
|
+
* (warn on entry).
|
|
77
|
+
* - last announced >= `floorMs` ago -> record `nowMs` and return true
|
|
78
|
+
* (re-announce: the block persists, keep surfacing it).
|
|
79
|
+
* - last announced < `floorMs` ago -> return false (suppress the repeat).
|
|
80
|
+
*
|
|
81
|
+
* The listener removes the focus from the map when it resumes (role assigned or
|
|
82
|
+
* focus leaves the active set), so a later re-entry warns immediately again.
|
|
83
|
+
* `nowMs`/`floorMs` are injectable so the decision is deterministic under test.
|
|
84
|
+
* Pure w.r.t. its inputs (Map + clock in, boolean out) and exported for unit
|
|
85
|
+
* testing without standing up the poll loop.
|
|
86
|
+
*/
|
|
87
|
+
export function shouldWarnNullRoleSkip(lastAnnouncedAt, focusId, nowMs = Date.now(), floorMs = NULL_ROLE_SKIP_REANNOUNCE_FLOOR_MS) {
|
|
88
|
+
const prev = lastAnnouncedAt.get(focusId);
|
|
89
|
+
if (prev !== undefined && nowMs - prev < floorMs)
|
|
90
|
+
return false;
|
|
91
|
+
lastAnnouncedAt.set(focusId, nowMs);
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=null-role-spawn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null-role-spawn.js","sourceRoot":"","sources":["../../src/spawn/null-role-spawn.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yEAAyE;AACzE,mEAAmE;AACnE,sDAAsD;AACtD,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,mBAA8C;IAC5E,OAAO,mBAAmB,IAAI,IAAI,CAAC;AACrC,CAAC;AAqBD;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAUnC;IACC,OAAO,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC3E,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,GAAG,MAAM,CAAC;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,sBAAsB,CACpC,eAAoC,EACpC,OAAe,EACf,QAAgB,IAAI,CAAC,GAAG,EAAE,EAC1B,UAAkB,kCAAkC;IAEpD,MAAM,IAAI,GAAG,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC1C,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,GAAG,IAAI,GAAG,OAAO;QAAE,OAAO,KAAK,CAAC;IAC/D,eAAe,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 114 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/testing/fixtures/index.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/**
|
|
5
5
|
* Build a FocusDeliveryInfo. Default executionStatus is 'queued' (the majority
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAC1B,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GAER,WAAW,GAKX,SAAS,GACT,WAAW,CAAC;AAKhB,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,kBAAkB,GAClB,SAAS,GACT,cAAc,GACd,iBAAiB,GACjB,UAAU,GACV,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,SAAS,GACT,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,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AAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1C,GAAG,EAAE,YAAY,GAAG,IAAI,CAAC;IACzB,GAAG,EAAE,YAAY,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,WAAW,CAAC;IAC7B,YAAY,EAAE,WAAW,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/types/session.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
3
|
-
// packages/daemon/src/spawn/review-role-fallback.test.ts
|
|
2
|
+
// Pinned by: none -- no test imports this module directly (baselined; see lint:pinned-by)
|
|
4
3
|
// PINNED-BY-END
|
|
5
4
|
export {};
|
|
6
5
|
//# sourceMappingURL=session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stall-detectors.d.ts","sourceRoot":"","sources":["../../src/verify/stall-detectors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stall-detectors.d.ts","sourceRoot":"","sources":["../../src/verify/stall-detectors.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAM3D,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACpC,MAAM,sCAAsC,CAAC;AAmB9C;;;;;;;;;;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;AAgCD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACpG,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAIhE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,WAAW,CAAC,EACrF,GAAG,EAAE,MAAM,GACV,OAAO,CAIT;AAED;;;;;;GAM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AA0B,CACxC,GAAG,EAAE,iBAAiB,EACtB,IAAI,GAAE,iBAA4C,GACjD,IAAI,CAwBN;AAID;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,QAAa,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iFAAiF;IACjF,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAYV;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACrD,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACtD,oEAAoE;IACpE,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;IACrD,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAChD,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAcD;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,iBAAiB,EACtB,IAAI,GAAE,oBAAkD,GACvD,IAAI,CA8BN"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// packages/daemon/src/verify/idle-team-stall-detector.test.ts,
|
|
4
4
|
// packages/daemon/src/verify/stall-detectors-clock-wiring.test.ts,
|
|
5
5
|
// packages/daemon/src/verify/stall-detectors.test.ts,
|
|
6
|
-
// packages/daemon/src/verify/team-outcome-stall-detector.test.ts
|
|
6
|
+
// packages/daemon/src/verify/team-outcome-stall-detector.test.ts,
|
|
7
|
+
// packages/daemon/src/verify/unreviewed-settle-detector.test.ts
|
|
7
8
|
// PINNED-BY-END
|
|
8
9
|
import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS, withRetry, } from '@telora/daemon-core';
|
|
9
10
|
import { fileEscalationIdempotent as defaultFileEscalationIdempotent, } from '../queries/escalation-suppression.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stall-detectors.js","sourceRoot":"","sources":["../../src/verify/stall-detectors.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oEAAoE;AACpE,iEAAiE;AACjE,qEAAqE;AACrE,wDAAwD;AACxD,mEAAmE;AACnE,gBAAgB;AAuChB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,IAAI,+BAA+B,GAG5D,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EACzB,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,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I;YAC7E,IAAI,MAAM,oEAAoE;YAC9E,oDAAoD,CACrD,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,IAAI,CACN,0CAA0C,GAAG,CAAC,SAAS,wBAAwB;YAC/E,mEAAmE,CACpE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { FocusDeliveryInfo } from '../types/index.js';
|
|
2
|
+
import { type FileEscalationIdempotentParams, type FileEscalationIdempotentResult } from '../queries/escalation-suppression.js';
|
|
3
|
+
import { type FocusExecutionPhase } from '../focus/focus-phase.js';
|
|
4
|
+
import { type FocusStallContext } from './stall-detectors.js';
|
|
5
|
+
/**
|
|
6
|
+
* The set of inputs that decide an UNREVIEWED SETTLE. Kept as a small named
|
|
7
|
+
* shape so the pure predicate below can be truth-tabled directly.
|
|
8
|
+
*/
|
|
9
|
+
export interface UnreviewedSettleInputs {
|
|
10
|
+
/** The focus's derived execution phase (from deriveFocusPhase). */
|
|
11
|
+
phase: FocusExecutionPhase;
|
|
12
|
+
/** product_focuses.review_requested_at. */
|
|
13
|
+
reviewRequestedAt: string | null;
|
|
14
|
+
/** product_focuses.reviewed_through_sha (the rendered-verdict watermark). */
|
|
15
|
+
reviewedThroughSha: string | null;
|
|
16
|
+
/** product_focuses.assigned_agent_role_id (the stranded arm, when non-null). */
|
|
17
|
+
assignedAgentRoleId: string | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Pure decision: is this focus a SETTLED focus holding an UNRENDERED review
|
|
21
|
+
* verdict with its arm still stranded?
|
|
22
|
+
*
|
|
23
|
+
* True iff ALL hold:
|
|
24
|
+
* - phase === 'winding_down' -- every executable delivery is terminal and
|
|
25
|
+
* verify === 0 (deriveFocusPhase). This is the settle the reviewing-gated
|
|
26
|
+
* staleness detector can never reach.
|
|
27
|
+
* - review_requested_at is set -- a review window was opened,
|
|
28
|
+
* - reviewed_through_sha === null -- but NO verdict was ever rendered
|
|
29
|
+
* (review-exit stamps the watermark only on a routed completion), and
|
|
30
|
+
* - assigned_agent_role_id !== null -- an arm is still held.
|
|
31
|
+
*
|
|
32
|
+
* The role-still-assigned clause is what makes the whole detector idempotent
|
|
33
|
+
* (once released it is null, so a repeated poll is a no-op) and skips the cases
|
|
34
|
+
* that need no action: an operator-stopped focus (role already null) and a focus
|
|
35
|
+
* that settled with a rendered verdict (which clearStaleReviewRequest disarms via
|
|
36
|
+
* the window close). Exported for direct unit testing.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isUnreviewedSettle(inputs: UnreviewedSettleInputs): boolean;
|
|
39
|
+
export interface UnreviewedSettleDeps {
|
|
40
|
+
/**
|
|
41
|
+
* File the review_window_stalled escalation through the cause-keyed idempotent
|
|
42
|
+
* gate: at most one open row per focus, so a repeated poll files no second one.
|
|
43
|
+
*/
|
|
44
|
+
fileEscalation: (params: FileEscalationIdempotentParams) => Promise<FileEscalationIdempotentResult>;
|
|
45
|
+
/**
|
|
46
|
+
* Release the settled focus's stranded arm (assigned_agent_role_id ->
|
|
47
|
+
* null) WITHOUT closing the review window. Defaults to releaseFocusArm.
|
|
48
|
+
*/
|
|
49
|
+
releaseArm: (focusId: string) => Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check ONE focus's ALREADY-FETCHED settle state for an unreviewed settle and,
|
|
53
|
+
* when found, ANNOUNCE it and RELEASE the stranded arm -- keeping the review
|
|
54
|
+
* window OPEN (the deliberate null-watermark hold that surfaces the missing
|
|
55
|
+
* verdict; clearStaleReviewRequest leaves it set on a null watermark).
|
|
56
|
+
*
|
|
57
|
+
* On an unreviewed settle, in order:
|
|
58
|
+
* 1. LOG the settle at the moment it occurs (so it is not readable only from
|
|
59
|
+
* the focus row).
|
|
60
|
+
* 2. File EXACTLY ONE review_window_stalled escalation naming the focus, its
|
|
61
|
+
* settled deliveries, and the verdict that was never rendered. Idempotent
|
|
62
|
+
* by cause key, so a repeated poll files no second one.
|
|
63
|
+
* 3. RELEASE the arm (daemon-owned, window stays open). Done last so a release
|
|
64
|
+
* failure still leaves the escalation filed and retries next poll (the
|
|
65
|
+
* role is still set, so the predicate still holds).
|
|
66
|
+
*
|
|
67
|
+
* Rides the same per-focus cascade seam as the sibling detectors; operates on
|
|
68
|
+
* state the caller (runCascadeChecks) already loaded.
|
|
69
|
+
*/
|
|
70
|
+
export declare function checkUnreviewedSettleForFocus(ctx: FocusStallContext, inputs: UnreviewedSettleInputs & {
|
|
71
|
+
deliveries: FocusDeliveryInfo[];
|
|
72
|
+
}, deps?: UnreviewedSettleDeps): Promise<void>;
|
|
73
|
+
//# sourceMappingURL=unreviewed-settle-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unreviewed-settle-detector.d.ts","sourceRoot":"","sources":["../../src/verify/unreviewed-settle-detector.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACpC,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI1F;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,mEAAmE;IACnE,KAAK,EAAE,mBAAmB,CAAC;IAC3B,2CAA2C;IAC3C,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,6EAA6E;IAC7E,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,gFAAgF;IAChF,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAO1E;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACpG;;;OAGG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAOD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,sBAAsB,GAAG;IAAE,UAAU,EAAE,iBAAiB,EAAE,CAAA;CAAE,EACpE,IAAI,GAAE,oBAAkD,GACvD,OAAO,CAAC,IAAI,CAAC,CAiFf"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/verify/unreviewed-settle-detector.test.ts
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* Unreviewed-settle detector.
|
|
6
|
+
*
|
|
7
|
+
* The residual path of the "verification outruns the review window" defect: a
|
|
8
|
+
* review-enabled focus whose LAST delivery leaves verify before any review
|
|
9
|
+
* renders a verdict settles with review_requested_at set and
|
|
10
|
+
* reviewed_through_sha null. clearStaleReviewRequest (completion/state-cascade.ts)
|
|
11
|
+
* DELIBERATELY keeps that null-watermark window OPEN -- surfacing the missing
|
|
12
|
+
* verdict rather than silently clearing it -- but migration 20260830204654
|
|
13
|
+
* deferred the focus-team arm clear to a trigger that fires only on the window
|
|
14
|
+
* closing (review_requested_at NOT NULL -> NULL). A window that never closes
|
|
15
|
+
* therefore holds the arm forever, an operator view reads "running", and a
|
|
16
|
+
* paid-for review verdict is discarded. And because a settled focus derives
|
|
17
|
+
* winding_down (verify === 0), the reviewing-gated staleness detector in
|
|
18
|
+
* stall-detectors.ts can never reach it.
|
|
19
|
+
*
|
|
20
|
+
* This detector supplies the annunciator that hold always lacked and releases
|
|
21
|
+
* the arm the deferred trigger can no longer reach, WITHOUT closing the window
|
|
22
|
+
* (keeping the hold honest -- announce it, release the arm, do not revert to the
|
|
23
|
+
* census-keyed clear delivery 2 of this focus removed). It rides the same
|
|
24
|
+
* per-focus cascade seam as the sibling stall detectors (runCascadeChecks),
|
|
25
|
+
* operating on state the caller already loaded, and files at most one open
|
|
26
|
+
* escalation per focus (the idempotent cause-keyed gate survives a restart).
|
|
27
|
+
* Pure over injected deps so the cases unit-test without Supabase/MCP.
|
|
28
|
+
*/
|
|
29
|
+
import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS, withRetry, } from '@telora/daemon-core';
|
|
30
|
+
import { fileEscalationIdempotent as defaultFileEscalationIdempotent, } from '../queries/escalation-suppression.js';
|
|
31
|
+
import { focusBlockageCauseKey } from '../queries/cause-key.js';
|
|
32
|
+
import { releaseFocusArm } from '../queries/focuses.js';
|
|
33
|
+
import { isDeliveryTerminal } from '../focus/focus-phase.js';
|
|
34
|
+
import { createLogger } from '../shell/log.js';
|
|
35
|
+
import { REVIEW_WINDOW_STALLED_KIND } from './stall-detectors.js';
|
|
36
|
+
const log = createLogger({ module: 'unreviewed-settle-detector' });
|
|
37
|
+
/**
|
|
38
|
+
* Pure decision: is this focus a SETTLED focus holding an UNRENDERED review
|
|
39
|
+
* verdict with its arm still stranded?
|
|
40
|
+
*
|
|
41
|
+
* True iff ALL hold:
|
|
42
|
+
* - phase === 'winding_down' -- every executable delivery is terminal and
|
|
43
|
+
* verify === 0 (deriveFocusPhase). This is the settle the reviewing-gated
|
|
44
|
+
* staleness detector can never reach.
|
|
45
|
+
* - review_requested_at is set -- a review window was opened,
|
|
46
|
+
* - reviewed_through_sha === null -- but NO verdict was ever rendered
|
|
47
|
+
* (review-exit stamps the watermark only on a routed completion), and
|
|
48
|
+
* - assigned_agent_role_id !== null -- an arm is still held.
|
|
49
|
+
*
|
|
50
|
+
* The role-still-assigned clause is what makes the whole detector idempotent
|
|
51
|
+
* (once released it is null, so a repeated poll is a no-op) and skips the cases
|
|
52
|
+
* that need no action: an operator-stopped focus (role already null) and a focus
|
|
53
|
+
* that settled with a rendered verdict (which clearStaleReviewRequest disarms via
|
|
54
|
+
* the window close). Exported for direct unit testing.
|
|
55
|
+
*/
|
|
56
|
+
export function isUnreviewedSettle(inputs) {
|
|
57
|
+
return (inputs.phase === 'winding_down' &&
|
|
58
|
+
inputs.reviewRequestedAt !== null &&
|
|
59
|
+
inputs.reviewedThroughSha === null &&
|
|
60
|
+
inputs.assignedAgentRoleId !== null);
|
|
61
|
+
}
|
|
62
|
+
const defaultUnreviewedSettleDeps = {
|
|
63
|
+
fileEscalation: defaultFileEscalationIdempotent,
|
|
64
|
+
releaseArm: releaseFocusArm,
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Check ONE focus's ALREADY-FETCHED settle state for an unreviewed settle and,
|
|
68
|
+
* when found, ANNOUNCE it and RELEASE the stranded arm -- keeping the review
|
|
69
|
+
* window OPEN (the deliberate null-watermark hold that surfaces the missing
|
|
70
|
+
* verdict; clearStaleReviewRequest leaves it set on a null watermark).
|
|
71
|
+
*
|
|
72
|
+
* On an unreviewed settle, in order:
|
|
73
|
+
* 1. LOG the settle at the moment it occurs (so it is not readable only from
|
|
74
|
+
* the focus row).
|
|
75
|
+
* 2. File EXACTLY ONE review_window_stalled escalation naming the focus, its
|
|
76
|
+
* settled deliveries, and the verdict that was never rendered. Idempotent
|
|
77
|
+
* by cause key, so a repeated poll files no second one.
|
|
78
|
+
* 3. RELEASE the arm (daemon-owned, window stays open). Done last so a release
|
|
79
|
+
* failure still leaves the escalation filed and retries next poll (the
|
|
80
|
+
* role is still set, so the predicate still holds).
|
|
81
|
+
*
|
|
82
|
+
* Rides the same per-focus cascade seam as the sibling detectors; operates on
|
|
83
|
+
* state the caller (runCascadeChecks) already loaded.
|
|
84
|
+
*/
|
|
85
|
+
export async function checkUnreviewedSettleForFocus(ctx, inputs, deps = defaultUnreviewedSettleDeps) {
|
|
86
|
+
if (!isUnreviewedSettle(inputs))
|
|
87
|
+
return;
|
|
88
|
+
const settled = inputs.deliveries.filter((d) => isDeliveryTerminal(d.executionStatus));
|
|
89
|
+
const settledList = settled.length
|
|
90
|
+
? settled.map((d) => `"${d.name}" (${d.executionStatus})`).join(', ')
|
|
91
|
+
: '(none listed)';
|
|
92
|
+
// (1) Name the unreviewed settle in the log at the moment it occurs.
|
|
93
|
+
log.warn(`[unreviewed-settle] Unreviewed settle on focus "${ctx.focusName}" (${ctx.focusId}): ` +
|
|
94
|
+
`all deliveries terminal with review_requested_at set and reviewed_through_sha null -- ` +
|
|
95
|
+
`a review verdict was never rendered. Announcing and releasing the stranded arm ` +
|
|
96
|
+
`(review window kept open).`);
|
|
97
|
+
// (2) One idempotent review_window_stalled escalation naming the focus, its
|
|
98
|
+
// settled deliveries, and the verdict that was never rendered.
|
|
99
|
+
const causeKey = focusBlockageCauseKey(REVIEW_WINDOW_STALLED_KIND, ctx.focusId, 'unreviewed_settle');
|
|
100
|
+
try {
|
|
101
|
+
await withRetry(() => deps.fileEscalation({
|
|
102
|
+
causeKey,
|
|
103
|
+
organizationId: ctx.organizationId,
|
|
104
|
+
sessionId: '',
|
|
105
|
+
issueId: null,
|
|
106
|
+
reasonType: ESCALATION_REASONS.ERROR_ENCOUNTERED,
|
|
107
|
+
disposition: ESCALATION_DISPOSITIONS.NEEDS_OPERATOR,
|
|
108
|
+
anchor: { focusId: ctx.focusId },
|
|
109
|
+
escalationKind: REVIEW_WINDOW_STALLED_KIND,
|
|
110
|
+
description: `Focus "${ctx.focusName}" settled with every delivery terminal, but its review ` +
|
|
111
|
+
`window opened and NO verdict was ever rendered (reviewed_through_sha is null). ` +
|
|
112
|
+
`The review either never spawned or exited without stamping a verdict, so the ` +
|
|
113
|
+
`deliveries reached done unjudged and the focus-team arm was stranded.\n\n` +
|
|
114
|
+
`**Focus:** ${ctx.focusName}\n` +
|
|
115
|
+
`**Focus ID:** ${ctx.focusId}\n` +
|
|
116
|
+
`**Settled deliveries:** ${settledList}\n` +
|
|
117
|
+
`**Verdict:** none rendered (reviewed_through_sha null while review_requested_at was set)\n\n` +
|
|
118
|
+
`The daemon has released the stranded arm and kept the review window open to ` +
|
|
119
|
+
`surface this. If these deliveries should have been reviewed, request a fresh ` +
|
|
120
|
+
`review; otherwise this focus completed without a review verdict.`,
|
|
121
|
+
whatWasTried: `A review window was opened (review_requested_at set) but the last delivery left ` +
|
|
122
|
+
`verify before any review rendered a verdict; the settled focus derives ` +
|
|
123
|
+
`winding_down, which the reviewing-gated staleness detector never reaches.`,
|
|
124
|
+
helpNeeded: `Decide whether the settled deliveries need a fresh review pass; the arm has ` +
|
|
125
|
+
`already been released so the focus is no longer falsely "running".`,
|
|
126
|
+
metadata: {
|
|
127
|
+
cause: REVIEW_WINDOW_STALLED_KIND,
|
|
128
|
+
subKind: 'unreviewed_settle',
|
|
129
|
+
settledDeliveryIds: settled.map((d) => d.id),
|
|
130
|
+
reviewRequestedAt: inputs.reviewRequestedAt,
|
|
131
|
+
},
|
|
132
|
+
}), { maxAttempts: 3, label: `escalation-unreviewed-settle-${ctx.focusId}` });
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
log.warn(`[unreviewed-settle] failed to file escalation for focus "${ctx.focusName}":`, err.message);
|
|
136
|
+
}
|
|
137
|
+
// (3) Release the stranded arm -- daemon-owned, review window stays open.
|
|
138
|
+
try {
|
|
139
|
+
await withRetry(() => deps.releaseArm(ctx.focusId), { maxAttempts: 3, label: `release-unreviewed-settle-arm-${ctx.focusId}` });
|
|
140
|
+
log.info(`[unreviewed-settle] Released the stranded arm for focus "${ctx.focusName}" ` +
|
|
141
|
+
`-- the consented go-signal no longer outlives the work (review window left open).`);
|
|
142
|
+
}
|
|
143
|
+
catch (err) {
|
|
144
|
+
log.warn(`[unreviewed-settle] failed to release the arm for focus "${ctx.focusName}":`, err.message);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=unreviewed-settle-detector.js.map
|
|
@@ -0,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