@telora/daemon 0.21.98 → 0.21.134
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 +6 -3
- package/dist/audit/audit-hooks.d.ts +106 -0
- package/dist/audit/audit-hooks.d.ts.map +1 -1
- package/dist/audit/audit-hooks.js +149 -17
- package/dist/audit/audit-hooks.js.map +1 -1
- package/dist/ci/ci-sensor-loop.d.ts +6 -0
- package/dist/ci/ci-sensor-loop.d.ts.map +1 -1
- package/dist/ci/ci-sensor-loop.js +50 -3
- package/dist/ci/ci-sensor-loop.js.map +1 -1
- package/dist/completion/coverage-drift-state.d.ts +29 -2
- package/dist/completion/coverage-drift-state.d.ts.map +1 -1
- package/dist/completion/coverage-drift-state.js +42 -2
- package/dist/completion/coverage-drift-state.js.map +1 -1
- package/dist/completion/coverage-stabilized.d.ts +58 -0
- package/dist/completion/coverage-stabilized.d.ts.map +1 -0
- package/dist/completion/coverage-stabilized.js +84 -0
- package/dist/completion/coverage-stabilized.js.map +1 -0
- package/dist/completion/delivery-advancement-guard.d.ts +21 -0
- package/dist/completion/delivery-advancement-guard.d.ts.map +1 -1
- package/dist/completion/delivery-advancement-guard.js +31 -3
- package/dist/completion/delivery-advancement-guard.js.map +1 -1
- package/dist/completion/event-escalations.d.ts +15 -0
- package/dist/completion/event-escalations.d.ts.map +1 -1
- package/dist/completion/event-escalations.js +42 -4
- package/dist/completion/event-escalations.js.map +1 -1
- package/dist/completion/event-phases.d.ts.map +1 -1
- package/dist/completion/event-phases.js +5 -2
- package/dist/completion/event-phases.js.map +1 -1
- package/dist/completion/machine-remediable-demotion.d.ts +74 -0
- package/dist/completion/machine-remediable-demotion.d.ts.map +1 -0
- package/dist/completion/machine-remediable-demotion.js +147 -0
- package/dist/completion/machine-remediable-demotion.js.map +1 -0
- package/dist/completion/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit-phase.js +10 -6
- package/dist/completion/review-exit-phase.js.map +1 -1
- package/dist/completion/settle-injection-sweep.d.ts +55 -0
- package/dist/completion/settle-injection-sweep.d.ts.map +1 -0
- package/dist/completion/settle-injection-sweep.js +88 -0
- package/dist/completion/settle-injection-sweep.js.map +1 -0
- package/dist/completion/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade.js +41 -0
- package/dist/completion/state-cascade.js.map +1 -1
- package/dist/completion/status-advance-phase.d.ts.map +1 -1
- package/dist/completion/status-advance-phase.js +18 -1
- package/dist/completion/status-advance-phase.js.map +1 -1
- package/dist/completion/team-lifecycle.d.ts +42 -0
- package/dist/completion/team-lifecycle.d.ts.map +1 -1
- package/dist/completion/team-lifecycle.js +71 -0
- package/dist/completion/team-lifecycle.js.map +1 -1
- package/dist/delivery/delivery-lifecycle.d.ts +19 -33
- package/dist/delivery/delivery-lifecycle.d.ts.map +1 -1
- package/dist/delivery/delivery-lifecycle.js +19 -147
- package/dist/delivery/delivery-lifecycle.js.map +1 -1
- package/dist/delivery/delivery-merge-ops.d.ts +46 -0
- package/dist/delivery/delivery-merge-ops.d.ts.map +1 -0
- package/dist/delivery/delivery-merge-ops.js +154 -0
- package/dist/delivery/delivery-merge-ops.js.map +1 -0
- package/dist/delivery/delivery-reconciler-apply.d.ts +28 -0
- package/dist/delivery/delivery-reconciler-apply.d.ts.map +1 -1
- package/dist/delivery/delivery-reconciler-apply.js +30 -0
- package/dist/delivery/delivery-reconciler-apply.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts +7 -2
- package/dist/delivery/delivery-reconciler.d.ts.map +1 -1
- package/dist/delivery/delivery-reconciler.js +34 -5
- package/dist/delivery/delivery-reconciler.js.map +1 -1
- package/dist/delivery/external-hold-surface.d.ts +32 -0
- package/dist/delivery/external-hold-surface.d.ts.map +1 -0
- package/dist/delivery/external-hold-surface.js +67 -0
- package/dist/delivery/external-hold-surface.js.map +1 -0
- package/dist/delivery/external-hold.d.ts +21 -0
- package/dist/delivery/external-hold.d.ts.map +1 -1
- package/dist/delivery/external-hold.js +40 -5
- package/dist/delivery/external-hold.js.map +1 -1
- package/dist/delivery/paused-revival.d.ts +140 -0
- package/dist/delivery/paused-revival.d.ts.map +1 -0
- package/dist/delivery/paused-revival.js +229 -0
- package/dist/delivery/paused-revival.js.map +1 -0
- package/dist/delivery/wait-reachability.d.ts.map +1 -1
- package/dist/delivery/wait-reachability.js +11 -0
- package/dist/delivery/wait-reachability.js.map +1 -1
- package/dist/directive/close-loop-dispatcher.d.ts +16 -263
- package/dist/directive/close-loop-dispatcher.d.ts.map +1 -1
- package/dist/directive/close-loop-dispatcher.js +21 -259
- package/dist/directive/close-loop-dispatcher.js.map +1 -1
- package/dist/directive/directive-dispatch.d.ts +19 -0
- package/dist/directive/directive-dispatch.d.ts.map +1 -1
- package/dist/directive/directive-dispatch.js +18 -0
- package/dist/directive/directive-dispatch.js.map +1 -1
- package/dist/directive/directive-executor.d.ts +1 -3
- package/dist/directive/directive-executor.d.ts.map +1 -1
- package/dist/directive/directive-executor.js +23 -21
- package/dist/directive/directive-executor.js.map +1 -1
- package/dist/directive/phase-sync.d.ts +28 -15
- package/dist/directive/phase-sync.d.ts.map +1 -1
- package/dist/directive/phase-sync.js +28 -36
- package/dist/directive/phase-sync.js.map +1 -1
- package/dist/directive/resolver-dispatch.d.ts +19 -92
- package/dist/directive/resolver-dispatch.d.ts.map +1 -1
- package/dist/directive/resolver-dispatch.js +19 -65
- package/dist/directive/resolver-dispatch.js.map +1 -1
- package/dist/focus/focus-engine.d.ts.map +1 -1
- package/dist/focus/focus-engine.js +26 -0
- package/dist/focus/focus-engine.js.map +1 -1
- package/dist/focus/focus-executor.d.ts.map +1 -1
- package/dist/focus/focus-executor.js +290 -256
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-loop-registry.d.ts.map +1 -1
- package/dist/focus/focus-loop-registry.js +43 -1
- package/dist/focus/focus-loop-registry.js.map +1 -1
- package/dist/focus/focus-respawn-guard.d.ts.map +1 -1
- package/dist/focus/focus-respawn-guard.js +11 -2
- package/dist/focus/focus-respawn-guard.js.map +1 -1
- package/dist/focus/focus-team-state.d.ts +11 -0
- package/dist/focus/focus-team-state.d.ts.map +1 -1
- package/dist/focus/focus-team-state.js +17 -0
- package/dist/focus/focus-team-state.js.map +1 -1
- package/dist/focus/listener-auto-advance.d.ts +13 -1
- package/dist/focus/listener-auto-advance.d.ts.map +1 -1
- package/dist/focus/listener-auto-advance.js +103 -22
- package/dist/focus/listener-auto-advance.js.map +1 -1
- package/dist/focus/listener.d.ts.map +1 -1
- package/dist/focus/listener.js +125 -75
- package/dist/focus/listener.js.map +1 -1
- package/dist/focus/tick-deadline.d.ts +55 -0
- package/dist/focus/tick-deadline.d.ts.map +1 -0
- package/dist/focus/tick-deadline.js +91 -0
- package/dist/focus/tick-deadline.js.map +1 -0
- package/dist/focus-stage-lifecycle/index.d.ts +18 -25
- package/dist/focus-stage-lifecycle/index.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/index.js +26 -38
- package/dist/focus-stage-lifecycle/index.js.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-cause-arbiter.d.ts +52 -0
- package/dist/focus-stage-lifecycle/wedge-cause-arbiter.d.ts.map +1 -0
- package/dist/focus-stage-lifecycle/wedge-cause-arbiter.js +94 -0
- package/dist/focus-stage-lifecycle/wedge-cause-arbiter.js.map +1 -0
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +18 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +57 -7
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/guard/condition-evaluators.d.ts +9 -0
- package/dist/guard/condition-evaluators.d.ts.map +1 -1
- package/dist/guard/condition-evaluators.js +15 -0
- package/dist/guard/condition-evaluators.js.map +1 -1
- package/dist/guard/guard-evaluator.d.ts +17 -1
- package/dist/guard/guard-evaluator.d.ts.map +1 -1
- package/dist/guard/guard-evaluator.js +61 -2
- package/dist/guard/guard-evaluator.js.map +1 -1
- package/dist/guard/trigger-executor.d.ts +30 -18
- package/dist/guard/trigger-executor.d.ts.map +1 -1
- package/dist/guard/trigger-executor.js +55 -31
- package/dist/guard/trigger-executor.js.map +1 -1
- package/dist/prompt/team-prompt-base.d.ts +1 -1
- package/dist/prompt/team-prompt-base.d.ts.map +1 -1
- package/dist/prompt/team-prompt-base.js +1 -1
- package/dist/prompt/team-prompt-base.js.map +1 -1
- package/dist/prompt-sections/persona-sections.d.ts +0 -32
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +19 -88
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/queries/deliveries.d.ts +23 -0
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js +6 -0
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/focuses.d.ts +36 -0
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +45 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/guards.d.ts +10 -0
- package/dist/queries/guards.d.ts.map +1 -1
- package/dist/queries/guards.js +14 -1
- package/dist/queries/guards.js.map +1 -1
- package/dist/queries/issues.d.ts +65 -1
- package/dist/queries/issues.d.ts.map +1 -1
- package/dist/queries/issues.js +135 -2
- package/dist/queries/issues.js.map +1 -1
- package/dist/queries/schemas.d.ts +51 -0
- package/dist/queries/schemas.d.ts.map +1 -1
- package/dist/queries/schemas.js +34 -0
- package/dist/queries/schemas.js.map +1 -1
- package/dist/queries/verification.d.ts +5 -6
- package/dist/queries/verification.d.ts.map +1 -1
- package/dist/queries/verification.js +5 -6
- package/dist/queries/verification.js.map +1 -1
- package/dist/resolvers/loop-persona.d.ts +1 -11
- package/dist/resolvers/loop-persona.d.ts.map +1 -1
- package/dist/resolvers/loop-persona.js +2 -16
- package/dist/resolvers/loop-persona.js.map +1 -1
- package/dist/shell/unified-shell-provisioning.d.ts +40 -0
- package/dist/shell/unified-shell-provisioning.d.ts.map +1 -1
- package/dist/shell/unified-shell-provisioning.js +72 -0
- package/dist/shell/unified-shell-provisioning.js.map +1 -1
- package/dist/shell/unified-shell.d.ts.map +1 -1
- package/dist/shell/unified-shell.js +18 -1
- package/dist/shell/unified-shell.js.map +1 -1
- package/dist/spawn/helpers.d.ts.map +1 -1
- package/dist/spawn/helpers.js +6 -1
- package/dist/spawn/helpers.js.map +1 -1
- package/dist/spawn/process-spawn.d.ts.map +1 -1
- package/dist/spawn/process-spawn.js +7 -0
- package/dist/spawn/process-spawn.js.map +1 -1
- package/dist/spawn/spawn-cooldown.d.ts +41 -7
- package/dist/spawn/spawn-cooldown.d.ts.map +1 -1
- package/dist/spawn/spawn-cooldown.js +47 -0
- package/dist/spawn/spawn-cooldown.js.map +1 -1
- package/dist/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +33 -1
- package/dist/spawn/spawn-decision.js.map +1 -1
- package/dist/verify/stall-detectors.d.ts +20 -8
- package/dist/verify/stall-detectors.d.ts.map +1 -1
- package/dist/verify/stall-detectors.js +27 -46
- package/dist/verify/stall-detectors.js.map +1 -1
- package/dist/workflow/gate-failure-policy.d.ts +48 -0
- package/dist/workflow/gate-failure-policy.d.ts.map +1 -0
- package/dist/workflow/gate-failure-policy.js +57 -0
- package/dist/workflow/gate-failure-policy.js.map +1 -0
- package/dist/workflow/pipeline-config.d.ts +2 -2
- package/dist/workflow/pipeline-config.js +2 -2
- package/package.json +1 -1
- package/dist/directive/close-loop-stage.d.ts +0 -50
- package/dist/directive/close-loop-stage.d.ts.map +0 -1
- package/dist/directive/close-loop-stage.js +0 -210
- package/dist/directive/close-loop-stage.js.map +0 -1
- package/dist/focus-stage-lifecycle/review-convergence.d.ts +0 -133
- package/dist/focus-stage-lifecycle/review-convergence.d.ts.map +0 -1
- package/dist/focus-stage-lifecycle/review-convergence.js +0 -237
- package/dist/focus-stage-lifecycle/review-convergence.js.map +0 -1
|
@@ -29,6 +29,18 @@
|
|
|
29
29
|
* @module external-hold
|
|
30
30
|
*/
|
|
31
31
|
import type { ExternalHoldState, updateDeliveryStatus } from '../queries/deliveries.js';
|
|
32
|
+
/**
|
|
33
|
+
* Pure decision: is this held, reference-less external hold now STALE (age-bounded)?
|
|
34
|
+
*
|
|
35
|
+
* True when the hold is reference-less -- its wait is UNREACHABLE (nothing the
|
|
36
|
+
* daemon can re-read will ever fire it: crossProductRequestWait over an empty
|
|
37
|
+
* reference set classifies as not-`canStillFire`) -- AND it has been declared
|
|
38
|
+
* longer ago than the bound. This is the live branch on the wait-reachability
|
|
39
|
+
* verdict (previously render-only): a reachable wait (a hold with a re-readable
|
|
40
|
+
* request reference) is NEVER stale-surfaced, because it self-clears when the
|
|
41
|
+
* request closes. Exported for direct unit testing (no clock, no daemon-core).
|
|
42
|
+
*/
|
|
43
|
+
export declare function isReferenceLessHoldStale(hold: Pick<ExternalHoldState, 'declaredAt' | 'clearsWhenRequestsClosed'>, nowMs: number, boundMs?: number): boolean;
|
|
32
44
|
/** The slice of deps this gate needs (structural, so no import cycle). */
|
|
33
45
|
export interface ExternalHoldDeps {
|
|
34
46
|
updateDeliveryStatus: typeof updateDeliveryStatus;
|
|
@@ -116,6 +128,15 @@ export interface ExternalHold {
|
|
|
116
128
|
* not held, when cleared, or when the hold carries a reference.
|
|
117
129
|
*/
|
|
118
130
|
referenceLess?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* True when the hold is reference-less AND has been held past the staleness
|
|
133
|
+
* age bound (isReferenceLessHoldStale): it can never self-clear and has now sat
|
|
134
|
+
* long enough to be SURFACED so a human re-declares it with a clearing reference
|
|
135
|
+
* or clears it. The caller emits the operator-visible signal (this module stays
|
|
136
|
+
* free of the @telora/daemon-core value import health surfacing needs). Absent/
|
|
137
|
+
* false when not held, reference-less but within the bound, or reference-bearing.
|
|
138
|
+
*/
|
|
139
|
+
staleReferenceLess?: boolean;
|
|
119
140
|
}
|
|
120
141
|
/** Narrow a delivery's `gate_state` JSONB to its externalHold, if any. */
|
|
121
142
|
export declare function readExternalHoldState(gateState: unknown): ExternalHoldState | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-hold.d.ts","sourceRoot":"","sources":["../../src/delivery/external-hold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAqB,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"external-hold.d.ts","sourceRoot":"","sources":["../../src/delivery/external-hold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAqB,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAyC3G;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,0BAA0B,CAAC,EACxE,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,MAAqC,GAC7C,OAAO,CAMT;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB,EAAE,OAAO,oBAAoB,CAAC;CACnD;AAED;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,CACvC,IAAI,EAAE,iBAAiB,KACpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,0BAAwC,CAAC;AAElF;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,UAAU,EAAE,MAAM,EAAE,KACjB,OAAO,CAAC,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CACzC,Y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B,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAmB/D"}
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
* @module external-hold
|
|
30
30
|
*/
|
|
31
31
|
import { createLogger } from '../shell/log.js';
|
|
32
|
-
import { classifyWaitReachability, describeWaitReachability, crossProductRequestWait, } from './wait-reachability.js';
|
|
32
|
+
import { classifyWaitReachability, describeWaitReachability, crossProductRequestWait, canStillFire, } from './wait-reachability.js';
|
|
33
|
+
import { safetyGateFailsClosed } from '../workflow/gate-failure-policy.js';
|
|
33
34
|
const log = createLogger({ module: 'external-hold' });
|
|
34
35
|
// The `verify` status re-asserted by a gate_state write. Daemon-local literal
|
|
35
36
|
// for the same reason as operator-hold.ts's VERIFY_STATUS: this module is
|
|
@@ -48,6 +49,35 @@ const VERIFY_STATUS = 'verify';
|
|
|
48
49
|
// is non-terminal-for-the-source and 'declined' is a terminal exit that is NOT
|
|
49
50
|
// closure -- neither clears the hold, only 'closed' does.
|
|
50
51
|
const REQUEST_STATUS_CLOSED = 'closed';
|
|
52
|
+
/**
|
|
53
|
+
* How long a REFERENCE-LESS external hold may sit before it is surfaced as stale.
|
|
54
|
+
* A reference-less hold has nothing for the daemon to re-read, so it can NEVER
|
|
55
|
+
* self-clear; left silent it withholds the delivery from done -- and the focus
|
|
56
|
+
* from winding_down -- forever. After this age it is surfaced (age-bounded) so a
|
|
57
|
+
* human can re-declare it with a clearing reference or clear it. Daemon-local
|
|
58
|
+
* (this module avoids a bare @telora/daemon-core VALUE import; see VERIFY_STATUS).
|
|
59
|
+
*/
|
|
60
|
+
const REFERENCE_LESS_HOLD_STALE_MS = 24 * 3_600_000;
|
|
61
|
+
/**
|
|
62
|
+
* Pure decision: is this held, reference-less external hold now STALE (age-bounded)?
|
|
63
|
+
*
|
|
64
|
+
* True when the hold is reference-less -- its wait is UNREACHABLE (nothing the
|
|
65
|
+
* daemon can re-read will ever fire it: crossProductRequestWait over an empty
|
|
66
|
+
* reference set classifies as not-`canStillFire`) -- AND it has been declared
|
|
67
|
+
* longer ago than the bound. This is the live branch on the wait-reachability
|
|
68
|
+
* verdict (previously render-only): a reachable wait (a hold with a re-readable
|
|
69
|
+
* request reference) is NEVER stale-surfaced, because it self-clears when the
|
|
70
|
+
* request closes. Exported for direct unit testing (no clock, no daemon-core).
|
|
71
|
+
*/
|
|
72
|
+
export function isReferenceLessHoldStale(hold, nowMs, boundMs = REFERENCE_LESS_HOLD_STALE_MS) {
|
|
73
|
+
const wait = crossProductRequestWait(hold.clearsWhenRequestsClosed ?? []);
|
|
74
|
+
if (canStillFire(wait))
|
|
75
|
+
return false; // has a re-readable reference -> self-clears
|
|
76
|
+
const declaredMs = Date.parse(hold.declaredAt);
|
|
77
|
+
if (Number.isNaN(declaredMs))
|
|
78
|
+
return false;
|
|
79
|
+
return nowMs - declaredMs >= boundMs;
|
|
80
|
+
}
|
|
51
81
|
/**
|
|
52
82
|
* The default production evaluator: an irreducibly-external dependency does not
|
|
53
83
|
* auto-clear from its free-text condition -- there is no generic probe for
|
|
@@ -204,14 +234,19 @@ export async function resolveExternalHold(deps, deliveryId, gateState, evaluateC
|
|
|
204
234
|
// for the daemon to re-read, so it cannot self-clear -- surface it rather than
|
|
205
235
|
// let it read as a normal, self-clearing hold.
|
|
206
236
|
const referenceLess = !hold.clearsWhenRequestsClosed || hold.clearsWhenRequestsClosed.length === 0;
|
|
237
|
+
// Age-bound the reference-less hold (branches on the wait-reachability verdict,
|
|
238
|
+
// previously render-only): once it has sat past REFERENCE_LESS_HOLD_STALE_MS it
|
|
239
|
+
// is surfaced by the caller so it is never a silent permanent hold.
|
|
240
|
+
const staleReferenceLess = isReferenceLessHoldStale(hold, Date.parse(clock()));
|
|
207
241
|
let conditionMet = false;
|
|
208
242
|
try {
|
|
209
243
|
conditionMet = await evaluateCondition(hold);
|
|
210
244
|
}
|
|
211
245
|
catch (err) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
246
|
+
// SAFETY GATE (the external-hold verify->done gate) -> FAIL CLOSED per the
|
|
247
|
+
// stated per-class policy: hold. A missed external hold lets an
|
|
248
|
+
// externally-blocked delivery reach done -- the failure this focus fights.
|
|
249
|
+
return safetyGateFailsClosed(`external-hold verify->done delivery ${deliveryId}`, err, { held: true, hold, cleared: false, referenceLess, staleReferenceLess });
|
|
215
250
|
}
|
|
216
251
|
if (conditionMet) {
|
|
217
252
|
try {
|
|
@@ -226,7 +261,7 @@ export async function resolveExternalHold(deps, deliveryId, gateState, evaluateC
|
|
|
226
261
|
}
|
|
227
262
|
return { held: false, hold, cleared: true };
|
|
228
263
|
}
|
|
229
|
-
return { held: true, hold, cleared: false, referenceLess };
|
|
264
|
+
return { held: true, hold, cleared: false, referenceLess, staleReferenceLess };
|
|
230
265
|
}
|
|
231
266
|
/** Human-readable hold reason for an exit/advance log line. */
|
|
232
267
|
export function describeExternalHold(hold) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-hold.js","sourceRoot":"","sources":["../../src/delivery/external-hold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"external-hold.js","sourceRoot":"","sources":["../../src/delivery/external-hold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC;AAEtD,8EAA8E;AAC9E,0EAA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,IAAI,CAAC,aAAa;YACvB,CAAC,CAAC,GAAG,IAAI,KAAK,MAAM,kEAAkE;YACtF,CAAC,CAAC,GAAG,IAAI,KAAK,MAAM,GAAG,CAAC;IAC5B,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paused-delivery revival -- the daemon-traversable EXIT from `paused` (TEL-1:
|
|
3
|
+
* "Every path into `paused` has a daemon-traversable exit or a named human-act
|
|
4
|
+
* hold").
|
|
5
|
+
*
|
|
6
|
+
* A `paused` delivery is a guard BLOCK on a transition (coding->verify or
|
|
7
|
+
* verify->done), written with an open `transition_blocks` row carrying the
|
|
8
|
+
* blocked transition and its human decision_paths (retry / override). Before
|
|
9
|
+
* this consumer, that block row was written but "nothing read it back": a paused
|
|
10
|
+
* delivery was skipped by every actionable-status pass, never re-evaluated, and
|
|
11
|
+
* -- because paused BLOCKS lower-ranked deliveries -- it wedged the whole ranked
|
|
12
|
+
* queue until a human re-queued it. On an ARMED focus that human never comes
|
|
13
|
+
* (2026-07-28 ruling: an armed focus reaches its terminal without a human;
|
|
14
|
+
* decide-and-record, reversibility as tiebreaker).
|
|
15
|
+
*
|
|
16
|
+
* This module reads the block row back. Each sweep, for every paused delivery it
|
|
17
|
+
* re-evaluates the SAME blocked transition's guards and routes the fresh verdict
|
|
18
|
+
* through the single-writer reconciler (delivery-reconciler `paused` case):
|
|
19
|
+
* - guard CLEARED -> revive `paused` -> `queued` (the canonical revival edge);
|
|
20
|
+
* the normal walk re-drives and re-hits the gate. This is
|
|
21
|
+
* the daemon-traversable exit.
|
|
22
|
+
* - guard STILL blocks -> hold. The pause stays a NAMED human-act hold (its
|
|
23
|
+
* gate_state blocking conditions + the block's `override`
|
|
24
|
+
* decision path name the act only a human can perform), and
|
|
25
|
+
* the wedge watchdog surfaces it. The daemon never OVERRIDES
|
|
26
|
+
* an unclear gate -- that irreversible act is the human's.
|
|
27
|
+
*
|
|
28
|
+
* A paused delivery with NO open block row is NOT abandoned: the blocked FORWARD
|
|
29
|
+
* transition (coding->verify / verify->done) is recovered from the delivery's
|
|
30
|
+
* preserved source stage and re-evaluated the same way -- so a hard-guard pause
|
|
31
|
+
* that wrote no block_transition row still gets a daemon-traversable exit. Only a
|
|
32
|
+
* pause whose stage yields no recoverable forward transition (unknown/ambiguous)
|
|
33
|
+
* stays `no-block` for the watchdog.
|
|
34
|
+
*
|
|
35
|
+
* DI-first: `reconcilePausedDelivery` + `checkPausedDeliveriesForRevival` take a
|
|
36
|
+
* deps object so they unit-test with plain stubs (no `mock.module`, which would
|
|
37
|
+
* poison the daemon-core bare-import loader). `buildDefaultPausedRevivalDeps`
|
|
38
|
+
* wires the real query/guard functions for the listener.
|
|
39
|
+
*/
|
|
40
|
+
/** The minimal paused-delivery shape this consumer reads. */
|
|
41
|
+
export interface PausedDeliveryInfo {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
executionStatus: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* The delivery's workflow stage id. A pause PRESERVES this at the SOURCE stage
|
|
47
|
+
* of the blocked advance (delivery-lifecycle sets deliveryStageId=currentStageId
|
|
48
|
+
* on a guard block), so it recovers the blocked FORWARD transition even when no
|
|
49
|
+
* transition_blocks row was written (a hard guard with no block_transition
|
|
50
|
+
* trigger). Absent => the derived-transition fallback is skipped.
|
|
51
|
+
*/
|
|
52
|
+
currentWorkflowStageId?: string | null;
|
|
53
|
+
}
|
|
54
|
+
/** Per-delivery revival deps (the I/O seam). */
|
|
55
|
+
export interface PausedRevivalDeps {
|
|
56
|
+
/**
|
|
57
|
+
* The open (unresolved) transition block for a paused delivery, yielding the
|
|
58
|
+
* blocked transition id. null when the paused delivery has no block row
|
|
59
|
+
* (nothing to re-evaluate).
|
|
60
|
+
*/
|
|
61
|
+
getActiveTransitionBlock(deliveryId: string): Promise<{
|
|
62
|
+
id: string;
|
|
63
|
+
transitionId: string;
|
|
64
|
+
} | null>;
|
|
65
|
+
/**
|
|
66
|
+
* Fallback transition recovery for a paused delivery with NO open block row:
|
|
67
|
+
* derive the blocked FORWARD transition (coding->verify / verify->done) from
|
|
68
|
+
* the delivery's preserved source stage. Returns the transition id, or null
|
|
69
|
+
* when the stage is unknown/ambiguous (then the delivery stays paused for the
|
|
70
|
+
* watchdog). Only consulted when getActiveTransitionBlock returns null.
|
|
71
|
+
*/
|
|
72
|
+
resolveForwardTransitionId(deliveryId: string, currentStageId: string | null | undefined): Promise<string | null>;
|
|
73
|
+
/**
|
|
74
|
+
* Re-evaluate the blocked transition's guards. Returns whether they STILL
|
|
75
|
+
* block (true = still blocked, false = cleared). Pure measurement -- MUST NOT
|
|
76
|
+
* write the delivery's execution_status.
|
|
77
|
+
*/
|
|
78
|
+
reEvaluateGuardBlocked(deliveryId: string, organizationId: string, transitionId: string): Promise<boolean>;
|
|
79
|
+
/** Resolve the workflow stage id for a status name on this delivery's effective workflow. */
|
|
80
|
+
resolveStageId(deliveryId: string, statusName: string): Promise<string | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* The single physical writer (queries/deliveries.updateDeliveryStatus). Param
|
|
83
|
+
* order mirrors the real writer: (id, status, stageId, gateState,
|
|
84
|
+
* completionArtifacts, transition). Revival passes null gateState +
|
|
85
|
+
* completionArtifacts (clearing the block's gate_state on the way out).
|
|
86
|
+
*/
|
|
87
|
+
updateDeliveryStatus(deliveryId: string, status: string, stageId: string | null | undefined, gateState: unknown, completionArtifacts: unknown, transition: {
|
|
88
|
+
organizationId: string;
|
|
89
|
+
fromStatus: string;
|
|
90
|
+
}): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Close out the transition block this revival acted on (stamps decided_at +
|
|
93
|
+
* decision_path, decided_by stays NULL). Called ONLY on a successful revival
|
|
94
|
+
* that read an open block row; a derived-forward revival (no block row) has
|
|
95
|
+
* nothing to close. Best-effort: a failure is logged, never blocks the
|
|
96
|
+
* already-decided revival.
|
|
97
|
+
*/
|
|
98
|
+
resolveTransitionBlock(blockId: string, decisionPath: string): Promise<boolean>;
|
|
99
|
+
}
|
|
100
|
+
export type PausedRevivalOutcome = 'revived' | 'held' | 'no-block';
|
|
101
|
+
/**
|
|
102
|
+
* Re-evaluate one paused delivery's blocking guard and, if it has cleared,
|
|
103
|
+
* traverse it out of paused via the single-writer reconciler. Returns the
|
|
104
|
+
* outcome for sweep accounting. Never throws for an expected I/O failure -- a
|
|
105
|
+
* guard-reeval failure holds the delivery (safe: stays paused) rather than
|
|
106
|
+
* risking a wrong revival.
|
|
107
|
+
*/
|
|
108
|
+
export declare function reconcilePausedDelivery(delivery: PausedDeliveryInfo, organizationId: string, deps: PausedRevivalDeps): Promise<PausedRevivalOutcome>;
|
|
109
|
+
/** Sweep deps: per-delivery deps plus the focus/delivery fetchers. */
|
|
110
|
+
export interface PausedRevivalSweepDeps extends PausedRevivalDeps {
|
|
111
|
+
getActiveFocuses(organizationId: string, productId: string): Promise<Array<{
|
|
112
|
+
focus_id: string;
|
|
113
|
+
}>>;
|
|
114
|
+
getFocusDeliveries(focusId: string): Promise<PausedDeliveryInfo[]>;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Sweep every active focus's paused deliveries and revive the ones whose
|
|
118
|
+
* blocking guard has cleared. Runs on TEAMLESS focuses too (a paused delivery
|
|
119
|
+
* wedges the queue so no team spawns) -- hence it iterates active focuses, not
|
|
120
|
+
* activeTeams. Best-effort per focus/delivery: one failure never aborts the
|
|
121
|
+
* sweep.
|
|
122
|
+
*/
|
|
123
|
+
export declare function checkPausedDeliveriesForRevival(config: {
|
|
124
|
+
organizationId: string;
|
|
125
|
+
productId: string;
|
|
126
|
+
}, deps: PausedRevivalSweepDeps): Promise<{
|
|
127
|
+
revived: number;
|
|
128
|
+
held: number;
|
|
129
|
+
noBlock: number;
|
|
130
|
+
}>;
|
|
131
|
+
/**
|
|
132
|
+
* Wire the real query + guard functions into a sweep-deps object for the
|
|
133
|
+
* listener. Kept as thin adapters (not direct assignments) so the wide,
|
|
134
|
+
* strictly-typed writer/query signatures reduce to this consumer's narrow seam.
|
|
135
|
+
* `reEvaluateGuardBlocked` is PURE measurement: evaluateGuardsAtTransition
|
|
136
|
+
* fetches guards + builds context and returns a verdict; it does NOT write the
|
|
137
|
+
* delivery's execution_status (that stays the reconciler's job here).
|
|
138
|
+
*/
|
|
139
|
+
export declare function buildDefaultPausedRevivalDeps(): PausedRevivalSweepDeps;
|
|
140
|
+
//# sourceMappingURL=paused-revival.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paused-revival.d.ts","sourceRoot":"","sources":["../../src/delivery/paused-revival.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAgBH,6DAA6D;AAC7D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;AAwBD,gDAAgD;AAChD,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACnG;;;;;;OAMG;IACH,0BAA0B,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClH;;;;OAIG;IACH,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3G,6FAA6F;IAC7F,cAAc,CAA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;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAwC7D;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,IAAI,sBAAsB,CA4CtE"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paused-delivery revival -- the daemon-traversable EXIT from `paused` (TEL-1:
|
|
3
|
+
* "Every path into `paused` has a daemon-traversable exit or a named human-act
|
|
4
|
+
* hold").
|
|
5
|
+
*
|
|
6
|
+
* A `paused` delivery is a guard BLOCK on a transition (coding->verify or
|
|
7
|
+
* verify->done), written with an open `transition_blocks` row carrying the
|
|
8
|
+
* blocked transition and its human decision_paths (retry / override). Before
|
|
9
|
+
* this consumer, that block row was written but "nothing read it back": a paused
|
|
10
|
+
* delivery was skipped by every actionable-status pass, never re-evaluated, and
|
|
11
|
+
* -- because paused BLOCKS lower-ranked deliveries -- it wedged the whole ranked
|
|
12
|
+
* queue until a human re-queued it. On an ARMED focus that human never comes
|
|
13
|
+
* (2026-07-28 ruling: an armed focus reaches its terminal without a human;
|
|
14
|
+
* decide-and-record, reversibility as tiebreaker).
|
|
15
|
+
*
|
|
16
|
+
* This module reads the block row back. Each sweep, for every paused delivery it
|
|
17
|
+
* re-evaluates the SAME blocked transition's guards and routes the fresh verdict
|
|
18
|
+
* through the single-writer reconciler (delivery-reconciler `paused` case):
|
|
19
|
+
* - guard CLEARED -> revive `paused` -> `queued` (the canonical revival edge);
|
|
20
|
+
* the normal walk re-drives and re-hits the gate. This is
|
|
21
|
+
* the daemon-traversable exit.
|
|
22
|
+
* - guard STILL blocks -> hold. The pause stays a NAMED human-act hold (its
|
|
23
|
+
* gate_state blocking conditions + the block's `override`
|
|
24
|
+
* decision path name the act only a human can perform), and
|
|
25
|
+
* the wedge watchdog surfaces it. The daemon never OVERRIDES
|
|
26
|
+
* an unclear gate -- that irreversible act is the human's.
|
|
27
|
+
*
|
|
28
|
+
* A paused delivery with NO open block row is NOT abandoned: the blocked FORWARD
|
|
29
|
+
* transition (coding->verify / verify->done) is recovered from the delivery's
|
|
30
|
+
* preserved source stage and re-evaluated the same way -- so a hard-guard pause
|
|
31
|
+
* that wrote no block_transition row still gets a daemon-traversable exit. Only a
|
|
32
|
+
* pause whose stage yields no recoverable forward transition (unknown/ambiguous)
|
|
33
|
+
* stays `no-block` for the watchdog.
|
|
34
|
+
*
|
|
35
|
+
* DI-first: `reconcilePausedDelivery` + `checkPausedDeliveriesForRevival` take a
|
|
36
|
+
* deps object so they unit-test with plain stubs (no `mock.module`, which would
|
|
37
|
+
* poison the daemon-core bare-import loader). `buildDefaultPausedRevivalDeps`
|
|
38
|
+
* wires the real query/guard functions for the listener.
|
|
39
|
+
*/
|
|
40
|
+
import { DELIVERY_STATUS } from '@telora/daemon-core';
|
|
41
|
+
import { resolveReconciledWrite } from './delivery-reconciler-apply.js';
|
|
42
|
+
import { getActiveTransitionBlock, resolveTransitionBlock } from '../queries/guards.js';
|
|
43
|
+
import { evaluateGuardsAtTransition } from '../guard/guard-evaluator.js';
|
|
44
|
+
import { fetchEffectiveWorkflow } from '../queries/workflows.js';
|
|
45
|
+
import { updateDeliveryStatus, getActiveFocuses } from '../queries/deliveries.js';
|
|
46
|
+
import { getFocusDeliveries } from '../queries/focuses.js';
|
|
47
|
+
import { createLogger } from '../shell/log.js';
|
|
48
|
+
const log = createLogger({ module: 'paused-revival' });
|
|
49
|
+
/**
|
|
50
|
+
* The canonical FORWARD delivery-stage a pause blocks. A `paused` delivery was
|
|
51
|
+
* blocked advancing coding->verify or verify->done (the only two guard-block
|
|
52
|
+
* pause producers, delivery-reconciler.ts:314/329); the blocked transition is the
|
|
53
|
+
* one FROM the source stage TO this forward stage. Used to recover the transition
|
|
54
|
+
* for re-evaluation when there is no transition_blocks row to read it from.
|
|
55
|
+
*/
|
|
56
|
+
const FORWARD_DELIVERY_STAGE = {
|
|
57
|
+
[DELIVERY_STATUS.CODING]: DELIVERY_STATUS.VERIFY,
|
|
58
|
+
[DELIVERY_STATUS.VERIFY]: DELIVERY_STATUS.DONE,
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The `decision_path` stamped on a block the daemon closes on auto-revival. The
|
|
62
|
+
* block leaves `decided_by` NULL (a machine action has no auth.users id), which
|
|
63
|
+
* is what keeps it OUT of the human-routing resolved-block query (that path
|
|
64
|
+
* requires decided_by IS NOT NULL). This value is the audit marker for "the
|
|
65
|
+
* daemon revived past this block because its guard cleared", never a human's
|
|
66
|
+
* retry/override choice.
|
|
67
|
+
*/
|
|
68
|
+
const AUTO_REVIVAL_DECISION_PATH = 'daemon_auto_revival';
|
|
69
|
+
/**
|
|
70
|
+
* Re-evaluate one paused delivery's blocking guard and, if it has cleared,
|
|
71
|
+
* traverse it out of paused via the single-writer reconciler. Returns the
|
|
72
|
+
* outcome for sweep accounting. Never throws for an expected I/O failure -- a
|
|
73
|
+
* guard-reeval failure holds the delivery (safe: stays paused) rather than
|
|
74
|
+
* risking a wrong revival.
|
|
75
|
+
*/
|
|
76
|
+
export async function reconcilePausedDelivery(delivery, organizationId, deps) {
|
|
77
|
+
// Recover the blocked transition: prefer the open block row (the block_transition
|
|
78
|
+
// producer), else derive the forward transition from the preserved source stage
|
|
79
|
+
// (a hard-guard pause with no block row). Either yields the transition whose
|
|
80
|
+
// guards we re-evaluate; neither => nothing recoverable, leave for the watchdog.
|
|
81
|
+
const block = await deps.getActiveTransitionBlock(delivery.id);
|
|
82
|
+
const transitionId = block?.transitionId ??
|
|
83
|
+
(await deps.resolveForwardTransitionId(delivery.id, delivery.currentWorkflowStageId));
|
|
84
|
+
if (!transitionId)
|
|
85
|
+
return 'no-block';
|
|
86
|
+
let stillBlocked;
|
|
87
|
+
try {
|
|
88
|
+
stillBlocked = await deps.reEvaluateGuardBlocked(delivery.id, organizationId, transitionId);
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
log.warn(`[paused-revival] guard re-eval failed for "${delivery.name}" (${delivery.id.slice(0, 8)}): ` +
|
|
92
|
+
`${err.message} -- holding paused this tick`);
|
|
93
|
+
return 'held';
|
|
94
|
+
}
|
|
95
|
+
// Route the fresh verdict through the single reconciler computation. The
|
|
96
|
+
// paused case revives to `queued` only when the guard has cleared; otherwise
|
|
97
|
+
// it stays paused.
|
|
98
|
+
const decision = resolveReconciledWrite({
|
|
99
|
+
input: {
|
|
100
|
+
currentStatus: DELIVERY_STATUS.PAUSED,
|
|
101
|
+
issues: [],
|
|
102
|
+
gitState: { worktreeCommitted: true },
|
|
103
|
+
guardVerdict: { blocked: stillBlocked },
|
|
104
|
+
reviewState: null,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
if (decision.target === DELIVERY_STATUS.PAUSED)
|
|
108
|
+
return 'held';
|
|
109
|
+
// Close out the block this revival acted on BEFORE the status write, so even a
|
|
110
|
+
// crash between the two leaves the block resolved (the next sweep then derives
|
|
111
|
+
// the forward transition from the preserved stage rather than re-reading a
|
|
112
|
+
// stale row). A derived-forward revival (block === null) has nothing to close.
|
|
113
|
+
// Best-effort: a close failure never blocks the already-decided revival.
|
|
114
|
+
if (block) {
|
|
115
|
+
try {
|
|
116
|
+
await deps.resolveTransitionBlock(block.id, AUTO_REVIVAL_DECISION_PATH);
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
log.warn(`[paused-revival] failed to close block ${block.id.slice(0, 8)} for ` +
|
|
120
|
+
`"${delivery.name}" (${delivery.id.slice(0, 8)}): ${err.message} -- ` +
|
|
121
|
+
`revival proceeds; a stale-open block may be re-read on a later pause episode`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const stageId = await deps.resolveStageId(delivery.id, decision.target);
|
|
125
|
+
// Clear gate_state + completion_artifacts explicitly (null, not undefined): the
|
|
126
|
+
// block that held this delivery no longer applies once it leaves paused, so the
|
|
127
|
+
// row must carry no gate state describing the block it has left. queries/
|
|
128
|
+
// deliveries.ts only clears the column on null; undefined would leave it stale.
|
|
129
|
+
await deps.updateDeliveryStatus(delivery.id, decision.target, stageId, null, null, { organizationId, fromStatus: DELIVERY_STATUS.PAUSED });
|
|
130
|
+
log.info(`[paused-revival] revived "${delivery.name}" (${delivery.id.slice(0, 8)}) ` +
|
|
131
|
+
`paused -> ${decision.target}: blocking guard cleared on re-eval`);
|
|
132
|
+
return 'revived';
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Sweep every active focus's paused deliveries and revive the ones whose
|
|
136
|
+
* blocking guard has cleared. Runs on TEAMLESS focuses too (a paused delivery
|
|
137
|
+
* wedges the queue so no team spawns) -- hence it iterates active focuses, not
|
|
138
|
+
* activeTeams. Best-effort per focus/delivery: one failure never aborts the
|
|
139
|
+
* sweep.
|
|
140
|
+
*/
|
|
141
|
+
export async function checkPausedDeliveriesForRevival(config, deps) {
|
|
142
|
+
let revived = 0;
|
|
143
|
+
let held = 0;
|
|
144
|
+
let noBlock = 0;
|
|
145
|
+
let focuses;
|
|
146
|
+
try {
|
|
147
|
+
focuses = await deps.getActiveFocuses(config.organizationId, config.productId);
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
log.warn(`[paused-revival] failed to fetch active focuses: ${err.message}`);
|
|
151
|
+
return { revived, held, noBlock };
|
|
152
|
+
}
|
|
153
|
+
for (const focus of focuses) {
|
|
154
|
+
let deliveries;
|
|
155
|
+
try {
|
|
156
|
+
deliveries = await deps.getFocusDeliveries(focus.focus_id);
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
log.warn(`[paused-revival] failed to fetch deliveries for focus ${focus.focus_id.slice(0, 8)}: ${err.message}`);
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
for (const delivery of deliveries) {
|
|
163
|
+
if ((delivery.executionStatus ?? '') !== DELIVERY_STATUS.PAUSED)
|
|
164
|
+
continue;
|
|
165
|
+
try {
|
|
166
|
+
const outcome = await reconcilePausedDelivery(delivery, config.organizationId, deps);
|
|
167
|
+
if (outcome === 'revived')
|
|
168
|
+
revived++;
|
|
169
|
+
else if (outcome === 'held')
|
|
170
|
+
held++;
|
|
171
|
+
else
|
|
172
|
+
noBlock++;
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
log.warn(`[paused-revival] revival check failed for "${delivery.name}" (${delivery.id.slice(0, 8)}): ${err.message}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return { revived, held, noBlock };
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Wire the real query + guard functions into a sweep-deps object for the
|
|
183
|
+
* listener. Kept as thin adapters (not direct assignments) so the wide,
|
|
184
|
+
* strictly-typed writer/query signatures reduce to this consumer's narrow seam.
|
|
185
|
+
* `reEvaluateGuardBlocked` is PURE measurement: evaluateGuardsAtTransition
|
|
186
|
+
* fetches guards + builds context and returns a verdict; it does NOT write the
|
|
187
|
+
* delivery's execution_status (that stays the reconciler's job here).
|
|
188
|
+
*/
|
|
189
|
+
export function buildDefaultPausedRevivalDeps() {
|
|
190
|
+
return {
|
|
191
|
+
getActiveTransitionBlock: async (deliveryId) => {
|
|
192
|
+
const block = await getActiveTransitionBlock(deliveryId);
|
|
193
|
+
return block ? { id: block.id, transitionId: block.transition_id } : null;
|
|
194
|
+
},
|
|
195
|
+
resolveForwardTransitionId: async (deliveryId, currentStageId) => {
|
|
196
|
+
if (!currentStageId)
|
|
197
|
+
return null;
|
|
198
|
+
const workflow = await fetchEffectiveWorkflow(deliveryId);
|
|
199
|
+
const sourceStage = workflow.stages.find((s) => s.id === currentStageId);
|
|
200
|
+
if (!sourceStage)
|
|
201
|
+
return null;
|
|
202
|
+
const forwardName = FORWARD_DELIVERY_STAGE[sourceStage.name];
|
|
203
|
+
if (!forwardName)
|
|
204
|
+
return null;
|
|
205
|
+
const forwardStage = workflow.stages.find((s) => s.name === forwardName);
|
|
206
|
+
if (!forwardStage)
|
|
207
|
+
return null;
|
|
208
|
+
const transition = (workflow.transitions ?? []).find((t) => t.from_stage_id === currentStageId && t.to_stage_id === forwardStage.id);
|
|
209
|
+
return transition?.id ?? null;
|
|
210
|
+
},
|
|
211
|
+
reEvaluateGuardBlocked: async (deliveryId, organizationId, transitionId) => {
|
|
212
|
+
const result = await evaluateGuardsAtTransition(deliveryId, organizationId, transitionId, 0);
|
|
213
|
+
return !result.should_proceed;
|
|
214
|
+
},
|
|
215
|
+
resolveStageId: async (deliveryId, statusName) => {
|
|
216
|
+
const workflow = await fetchEffectiveWorkflow(deliveryId);
|
|
217
|
+
return workflow.stages.find((s) => s.name === statusName)?.id;
|
|
218
|
+
},
|
|
219
|
+
updateDeliveryStatus: (deliveryId, status, stageId, gateState, completionArtifacts, transition) =>
|
|
220
|
+
// Pass the caller's gate_state + completion_artifacts THROUGH (reconcile-
|
|
221
|
+
// PausedDelivery clears them with null on the way out of paused) instead of
|
|
222
|
+
// hardcoding, so the clear is driven by -- and testable at -- the caller.
|
|
223
|
+
updateDeliveryStatus(deliveryId, status, stageId, gateState, completionArtifacts, transition),
|
|
224
|
+
resolveTransitionBlock: (blockId, decisionPath) => resolveTransitionBlock(blockId, decisionPath),
|
|
225
|
+
getActiveFocuses: (organizationId, productId) => getActiveFocuses(organizationId, productId),
|
|
226
|
+
getFocusDeliveries: (focusId) => getFocusDeliveries(focusId),
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=paused-revival.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paused-revival.js","sourceRoot":"","sources":["../../src/delivery/paused-revival.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO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AED,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAEzD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,CASpE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAEvD;AAOD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,gBAAgB,CAgBvF;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAKpF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAK9D;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAK1E;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,GAAG,gBAAgB,CAK3E;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAUpG"}
|
|
@@ -103,6 +103,17 @@ export function renderWait(wait) {
|
|
|
103
103
|
* external-hold.ts `clearsWhenRequestsClosed`.
|
|
104
104
|
*/
|
|
105
105
|
export function crossProductRequestWait(requestIds) {
|
|
106
|
+
if (requestIds.length === 0) {
|
|
107
|
+
// No request reference: nothing names an actor that could ever close this, so
|
|
108
|
+
// it cannot arrive -- the REFERENCE-LESS external hold. Classifying it as a
|
|
109
|
+
// recorded fact (UNREACHABLE) rather than other_actor is what lets a caller
|
|
110
|
+
// branch on the reachability verdict (e.g. isReferenceLessHoldStale) instead
|
|
111
|
+
// of mistaking a hold with nothing to re-read for one a peer will close.
|
|
112
|
+
return {
|
|
113
|
+
condition: 'cross-product hold with NO request reference to close (nothing to re-read)',
|
|
114
|
+
blockedOn: 'static_fact',
|
|
115
|
+
};
|
|
116
|
+
}
|
|
106
117
|
return {
|
|
107
118
|
condition: `cross-product request(s) to close: ${requestIds.join(', ')}`,
|
|
108
119
|
blockedOn: 'other_actor',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wait-reachability.js","sourceRoot":"","sources":["../../src/delivery/wait-reachability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AA2CH;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,CAAmB;IAC1D,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,aAAa;YAChB,OAAO;gBACL,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,aAAa;gBACxB,MAAM,EAAE,gDAAgD,CAAC,CAAC,SAAS,EAAE;aACtE,CAAC;QACJ,KAAK,MAAM;YACT,OAAO;gBACL,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,MAAM;gBACjB,MAAM,EAAE,iFAAiF,CAAC,CAAC,SAAS,EAAE;aACvG,CAAC;QACJ,KAAK,aAAa;YAChB,OAAO;gBACL,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,aAAa;gBACxB,MAAM,EAAE,8FAA8F,CAAC,CAAC,SAAS,EAAE;aACpH,CAAC;IACN,CAAC;AACH,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,YAAY,CAAC,CAAmB;IAC9C,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,CAAmB;IAC1D,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,aAAa;YAChB,OAAO,mDAAmD,CAAC;QAC7D,KAAK,MAAM;YACT,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AClB,CAAC,CAAC;YACE,SAAS,EAAE,qFAAqF,IAAI,CAAC,MAAM,EAAE;YAC7G,SAAS,EAAE,MAAM;SAClB;QACH,CAAC,CAAC;YACE,SAAS,EAAE,wCAAwC,IAAI,CAAC,MAAM,EAAE;YAChE,SAAS,EAAE,aAAa;SACzB,CAAC;AACR,CAAC"}
|
|
1
|
+
{"version":3,"file":"wait-reachability.js","sourceRoot":"","sources":["../../src/delivery/wait-reachability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AA2CH;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,CAAmB;IAC1D,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,aAAa;YAChB,OAAO;gBACL,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,aAAa;gBACxB,MAAM,EAAE,gDAAgD,CAAC,CAAC,SAAS,EAAE;aACtE,CAAC;QACJ,KAAK,MAAM;YACT,OAAO;gBACL,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,MAAM;gBACjB,MAAM,EAAE,iFAAiF,CAAC,CAAC,SAAS,EAAE;aACvG,CAAC;QACJ,KAAK,aAAa;YAChB,OAAO;gBACL,SAAS,EAAE,KAAK;gBAChB,SAAS,EAAE,aAAa;gBACxB,MAAM,EAAE,8FAA8F,CAAC,CAAC,SAAS,EAAE;aACpH,CAAC;IACN,CAAC;AACH,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,YAAY,CAAC,CAAmB;IAC9C,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,CAAmB;IAC1D,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,aAAa;YAChB,OAAO,mDAAmD,CAAC;QAC7D,KAAK,MAAM;YACT,OAAO,6EAA6E,CAAC;QACvF,KAAK,aAAa;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