@telora/daemon 0.24.39 → 0.24.42
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 +7 -3
- package/dist/composition/daemon-contexts.js +1 -1
- package/dist/composition/runtime-prd-context.d.ts.map +1 -1
- package/dist/composition/runtime-prd-context.js +3 -1
- package/dist/composition/runtime-prd-context.js.map +1 -1
- package/dist/composition/tower-pass-context.d.ts +6 -1
- package/dist/composition/tower-pass-context.d.ts.map +1 -1
- package/dist/composition/tower-pass-context.js +12 -2
- package/dist/composition/tower-pass-context.js.map +1 -1
- package/dist/config/live-daemon-config.js +1 -1
- package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
- package/dist/daemon-state/awaiting-slot.js +2 -0
- package/dist/daemon-state/awaiting-slot.js.map +1 -1
- package/dist/daemon-state/focus-team-state.js +1 -1
- package/dist/directive/directive-queue.js +1 -1
- package/dist/focus/daemon-contexts.js +1 -1
- package/dist/focus/focus-poller-spawn.js +2 -2
- package/dist/focus/focus-poller-spawn.js.map +1 -1
- package/dist/focus/focus-poller-state.js +1 -1
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.js +2 -0
- package/dist/focus/pending-spawn-pass-deps.js.map +1 -1
- package/dist/focus/ready-focus-spawn-action.d.ts.map +1 -1
- package/dist/focus/ready-focus-spawn-action.js +2 -2
- package/dist/focus/ready-focus-spawn-action.js.map +1 -1
- package/dist/nexus/escalation-bridge.d.ts.map +1 -1
- package/dist/nexus/escalation-bridge.js +2 -1
- package/dist/nexus/escalation-bridge.js.map +1 -1
- package/dist/nexus/file-escalation.d.ts.map +1 -1
- package/dist/nexus/file-escalation.js +1 -0
- package/dist/nexus/file-escalation.js.map +1 -1
- package/dist/prd/controller-shared.d.ts +16 -2
- package/dist/prd/controller-shared.d.ts.map +1 -1
- package/dist/prd/frontier-arming.d.ts +4 -4
- package/dist/prd/frontier-arming.d.ts.map +1 -1
- package/dist/prd/frontier-arming.js +46 -7
- package/dist/prd/frontier-arming.js.map +1 -1
- package/dist/queries/api-client/shared.js +1 -1
- package/dist/queries/delivery-gate-state/verify-own-holds.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/verify-own-holds.js +1 -0
- package/dist/queries/delivery-gate-state/verify-own-holds.js.map +1 -1
- package/dist/queries/focuses/focus-discovery.js +1 -1
- package/dist/queries/prd/prd.d.ts +26 -2
- package/dist/queries/prd/prd.d.ts.map +1 -1
- package/dist/queries/prd/prd.js +49 -6
- package/dist/queries/prd/prd.js.map +1 -1
- package/dist/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +1 -18
- package/dist/spawn/spawn-decision.js.map +1 -1
- package/dist/supervision/spawn-cooldown.js +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/review-loop.d.ts.map +1 -1
- package/dist/testing/fixtures/review-loop.js +2 -0
- package/dist/testing/fixtures/review-loop.js.map +1 -1
- package/dist/tower/tower-admission.d.ts +46 -9
- package/dist/tower/tower-admission.d.ts.map +1 -1
- package/dist/tower/tower-admission.js +59 -9
- package/dist/tower/tower-admission.js.map +1 -1
- package/dist/tower/tower-graph.d.ts.map +1 -1
- package/dist/tower/tower-graph.js +2 -1
- package/dist/tower/tower-graph.js.map +1 -1
- package/dist/tower/tower-heartbeat-status.d.ts +1 -1
- package/dist/tower/tower-heartbeat-status.d.ts.map +1 -1
- package/dist/tower/tower-heartbeat-status.js.map +1 -1
- package/dist/tower/tower-pass-standing.d.ts +11 -0
- package/dist/tower/tower-pass-standing.d.ts.map +1 -1
- package/dist/tower/tower-pass-standing.js +33 -1
- package/dist/tower/tower-pass-standing.js.map +1 -1
- package/dist/tower/tower-pass.d.ts +28 -4
- package/dist/tower/tower-pass.d.ts.map +1 -1
- package/dist/tower/tower-pass.js +60 -18
- package/dist/tower/tower-pass.js.map +1 -1
- package/dist/tower/tower-spawn-intent.d.ts.map +1 -1
- package/dist/tower/tower-spawn-intent.js +3 -2
- package/dist/tower/tower-spawn-intent.js.map +1 -1
- package/dist/verify/gate-verdicts/no-verdict-record.d.ts.map +1 -1
- package/dist/verify/gate-verdicts/no-verdict-record.js +2 -1
- package/dist/verify/gate-verdicts/no-verdict-record.js.map +1 -1
- package/dist/verify/outcome-routing/repeating-model-hold.d.ts.map +1 -1
- package/dist/verify/outcome-routing/repeating-model-hold.js +1 -0
- package/dist/verify/outcome-routing/repeating-model-hold.js.map +1 -1
- package/dist/verify/outcome-routing/unjudged-node-hold.d.ts.map +1 -1
- package/dist/verify/outcome-routing/unjudged-node-hold.js +2 -1
- package/dist/verify/outcome-routing/unjudged-node-hold.js.map +1 -1
- package/dist/verify/outcome-routing/verification-model-unavailable-hold.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-model-unavailable-hold.js +1 -0
- package/dist/verify/outcome-routing/verification-model-unavailable-hold.js.map +1 -1
- package/docs/runbook-tower.md +33 -5
- package/package.json +2 -2
|
@@ -10,21 +10,35 @@
|
|
|
10
10
|
* foci before enforcing.
|
|
11
11
|
* enforce -- a holding verdict that is FRESH holds the spawn.
|
|
12
12
|
*
|
|
13
|
+
* NOT YET COMPUTED IS NOT FAILED. A focus armed or re-armed after its
|
|
14
|
+
* product's standing pass read the armed set has no verdict for that arm: the
|
|
15
|
+
* stored one is missing or written under the earlier arm. That is not the
|
|
16
|
+
* tower failing -- no pass has seen the arm yet -- so admission does not fail
|
|
17
|
+
* open on it. While the product's pass stands and no pass of this daemon has
|
|
18
|
+
* computed a verdict for the focus's CURRENT arm (towerVerdictComputedForArm),
|
|
19
|
+
* admission runs the product's pass first (tower-pass.ts
|
|
20
|
+
* computeTowerVerdictForAdmission) and admits against the verdict it computed
|
|
21
|
+
* (admitThroughTower). Both spawn passes -- ready and pending -- admit this way,
|
|
22
|
+
* so a just-armed focus is held from its first poll, whichever pass reaches it.
|
|
23
|
+
*
|
|
13
24
|
* FAIL OPEN. Only an available, holding verdict ever holds, and only while
|
|
14
25
|
* this daemon's tower pass for the focus's product is standing
|
|
15
26
|
* (tower-pass-standing.ts): a pass that failed, or has not yet succeeded,
|
|
16
|
-
* leaves every verdict of that product unobeyed at once
|
|
17
|
-
*
|
|
18
|
-
*
|
|
27
|
+
* leaves every verdict of that product unobeyed at once -- including a
|
|
28
|
+
* computation admission ran itself and that failed. A verdict that is
|
|
29
|
+
* malformed or older than the bounded age is no verdict, and so is a missing
|
|
30
|
+
* one the pass computed as none for this arm (daemon-core readTowerVerdict;
|
|
31
|
+
* tower-verdicts.ts UNAVAILABLE inputs). Either way the focus
|
|
19
32
|
* spawns as it would with the tower off, and the daemon says so. Admission fails open while
|
|
20
33
|
* the merge gates fail closed because the failures are not symmetric: a wrongly
|
|
21
34
|
* blocked merge is visible (a held delivery, a red gate), a wrongly held spawn
|
|
22
35
|
* is SILENT (a focus that simply never runs).
|
|
23
36
|
*
|
|
24
|
-
* The decision is pure (decideTowerAdmission);
|
|
25
|
-
*
|
|
37
|
+
* The decision is pure (decideTowerAdmission); admitThroughTower adds the
|
|
38
|
+
* not-yet-computed step around it; noteTowerAdmission logs it and records the
|
|
39
|
+
* focus's spawn intent once the spawn gate's final action is known.
|
|
26
40
|
*/
|
|
27
|
-
import { type TowerMode, type TowerVerdictReading } from '@telora/daemon-core';
|
|
41
|
+
import { type TowerMode, type TowerVerdict, type TowerVerdictReading } from '@telora/daemon-core';
|
|
28
42
|
import { type SpawnIntentSource } from './tower-spawn-intent.js';
|
|
29
43
|
import type { TowerPassStanding } from './tower-pass-standing.js';
|
|
30
44
|
/** The focus row fields admission reads (ready and active focus rows both carry them). */
|
|
@@ -52,8 +66,30 @@ export interface TowerAdmissionDeps {
|
|
|
52
66
|
mode: () => TowerMode;
|
|
53
67
|
/** This daemon's pass standing for a product (tower-pass-standing.ts). */
|
|
54
68
|
passStanding: (productId: string | null | undefined) => TowerPassStanding;
|
|
69
|
+
/** Whether a pass of this daemon computed the focus's verdict under this arm (tower-pass-standing.ts). */
|
|
70
|
+
computedForArm: (focusId: string, armedAt: string | null | undefined) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Compute the focus's verdict now (its product's pass; tower-pass.ts
|
|
73
|
+
* computeTowerVerdictForAdmission): the verdict, or null for none. Never
|
|
74
|
+
* throws; a failed pass is recorded on the product's standing.
|
|
75
|
+
*/
|
|
76
|
+
computeVerdict: (focus: TowerAdmissionFocus) => Promise<TowerVerdict | null>;
|
|
55
77
|
}
|
|
56
78
|
export declare function decideTowerAdmission(focus: TowerAdmissionFocus, tower: TowerAdmissionDeps, nowMs: number): TowerAdmission;
|
|
79
|
+
/**
|
|
80
|
+
* The stored verdict was never computed for the focus's current arm: the
|
|
81
|
+
* product's pass stands, the verdict is missing or from an earlier arm, and no
|
|
82
|
+
* pass of this daemon has computed one under this arm. Exported for tests.
|
|
83
|
+
*/
|
|
84
|
+
export declare function towerVerdictNotYetComputed(focus: TowerAdmissionFocus, admission: TowerAdmission, tower: TowerAdmissionDeps): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Admission as both spawn passes run it: decideTowerAdmission over the stored
|
|
87
|
+
* verdict, except that a verdict not yet computed for the focus's current arm
|
|
88
|
+
* is computed first (its product's pass) and the spawn is admitted against
|
|
89
|
+
* THAT. A failed computation leaves the product's pass failed, so the second
|
|
90
|
+
* decision fails open on it. Never throws.
|
|
91
|
+
*/
|
|
92
|
+
export declare function admitThroughTower(focus: TowerAdmissionFocus, tower: TowerAdmissionDeps, nowMs: number): Promise<TowerAdmission>;
|
|
57
93
|
/** The outcome the spawn gate reached for a focus, after the tower was consulted. */
|
|
58
94
|
export type TowerGateOutcome = 'spawn' | 'tower_hold' | 'capacity' | 'not_wanting';
|
|
59
95
|
/** The line a decision produces, or null when it is not worth a line. Exported for tests. */
|
|
@@ -84,8 +120,9 @@ export declare function offerForTower<T extends {
|
|
|
84
120
|
/**
|
|
85
121
|
* The pending-spawn pass's tower check (a queued directive -- e.g. a review --
|
|
86
122
|
* on an armed focus): consulted after the cooldown and before the host cap,
|
|
87
|
-
* exactly where the ready pass consults it
|
|
88
|
-
* queued
|
|
123
|
+
* exactly where the ready pass consults it, through the same admitThroughTower
|
|
124
|
+
* -- so a directive queued in the poll that armed the focus waits for the
|
|
125
|
+
* focus's first verdict. True = held; the directive stays queued.
|
|
89
126
|
*/
|
|
90
|
-
export declare function pendingSpawnHeldByTower(focus: TowerAdmissionFocus, atHostCapacity: boolean, tower: TowerAdmissionDeps, nowMs: number): boolean
|
|
127
|
+
export declare function pendingSpawnHeldByTower(focus: TowerAdmissionFocus, atHostCapacity: boolean, tower: TowerAdmissionDeps, nowMs: number): Promise<boolean>;
|
|
91
128
|
//# sourceMappingURL=tower-admission.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-admission.d.ts","sourceRoot":"","sources":["../../src/tower/tower-admission.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"tower-admission.d.ts","sourceRoot":"","sources":["../../src/tower/tower-admission.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAA2C,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,C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AAG,UAAU,GAAG,aAAa,CAAC;AAYnF,6FAA6F;AAC7F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAsBrI;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,cAAc,EACzB,OAAO,EAAE,gBAAgB,EACzB,KAAK,GAAE,MAAmB,EAC1B,MAAM,GAAE,iBAA2B,GAClC,IAAI,CAWN;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,GAAG,CAAC,EAAE,CAInH;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACvE,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,EACtB,IAAI,EAAE,SAAS,GACd,CAAC,EAAE,CAGL;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,mBAAmB,EAC1B,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,kBAAkB,EACzB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC,CAIlB"}
|
|
@@ -13,19 +13,33 @@
|
|
|
13
13
|
* foci before enforcing.
|
|
14
14
|
* enforce -- a holding verdict that is FRESH holds the spawn.
|
|
15
15
|
*
|
|
16
|
+
* NOT YET COMPUTED IS NOT FAILED. A focus armed or re-armed after its
|
|
17
|
+
* product's standing pass read the armed set has no verdict for that arm: the
|
|
18
|
+
* stored one is missing or written under the earlier arm. That is not the
|
|
19
|
+
* tower failing -- no pass has seen the arm yet -- so admission does not fail
|
|
20
|
+
* open on it. While the product's pass stands and no pass of this daemon has
|
|
21
|
+
* computed a verdict for the focus's CURRENT arm (towerVerdictComputedForArm),
|
|
22
|
+
* admission runs the product's pass first (tower-pass.ts
|
|
23
|
+
* computeTowerVerdictForAdmission) and admits against the verdict it computed
|
|
24
|
+
* (admitThroughTower). Both spawn passes -- ready and pending -- admit this way,
|
|
25
|
+
* so a just-armed focus is held from its first poll, whichever pass reaches it.
|
|
26
|
+
*
|
|
16
27
|
* FAIL OPEN. Only an available, holding verdict ever holds, and only while
|
|
17
28
|
* this daemon's tower pass for the focus's product is standing
|
|
18
29
|
* (tower-pass-standing.ts): a pass that failed, or has not yet succeeded,
|
|
19
|
-
* leaves every verdict of that product unobeyed at once
|
|
20
|
-
*
|
|
21
|
-
*
|
|
30
|
+
* leaves every verdict of that product unobeyed at once -- including a
|
|
31
|
+
* computation admission ran itself and that failed. A verdict that is
|
|
32
|
+
* malformed or older than the bounded age is no verdict, and so is a missing
|
|
33
|
+
* one the pass computed as none for this arm (daemon-core readTowerVerdict;
|
|
34
|
+
* tower-verdicts.ts UNAVAILABLE inputs). Either way the focus
|
|
22
35
|
* spawns as it would with the tower off, and the daemon says so. Admission fails open while
|
|
23
36
|
* the merge gates fail closed because the failures are not symmetric: a wrongly
|
|
24
37
|
* blocked merge is visible (a held delivery, a red gate), a wrongly held spawn
|
|
25
38
|
* is SILENT (a focus that simply never runs).
|
|
26
39
|
*
|
|
27
|
-
* The decision is pure (decideTowerAdmission);
|
|
28
|
-
*
|
|
40
|
+
* The decision is pure (decideTowerAdmission); admitThroughTower adds the
|
|
41
|
+
* not-yet-computed step around it; noteTowerAdmission logs it and records the
|
|
42
|
+
* focus's spawn intent once the spawn gate's final action is known.
|
|
29
43
|
*/
|
|
30
44
|
import { describeTowerHold, describeTowerUnavailable, readTowerVerdict, towerReadingHolds, } from '@telora/daemon-core';
|
|
31
45
|
import { createLogger } from '../log/daemon-log.js';
|
|
@@ -42,6 +56,41 @@ export function decideTowerAdmission(focus, tower, nowMs) {
|
|
|
42
56
|
const enforceWouldHold = towerReadingHolds(reading);
|
|
43
57
|
return { mode, holds: mode === 'enforce' && enforceWouldHold, enforceWouldHold, reading, passNotStanding: null };
|
|
44
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* The stored verdict was never computed for the focus's current arm: the
|
|
61
|
+
* product's pass stands, the verdict is missing or from an earlier arm, and no
|
|
62
|
+
* pass of this daemon has computed one under this arm. Exported for tests.
|
|
63
|
+
*/
|
|
64
|
+
export function towerVerdictNotYetComputed(focus, admission, tower) {
|
|
65
|
+
const { reading } = admission;
|
|
66
|
+
if (admission.mode === 'off' || admission.passNotStanding !== null || !reading || reading.status !== 'unavailable')
|
|
67
|
+
return false;
|
|
68
|
+
if (reading.why !== 'missing' && reading.why !== 'prior_arm')
|
|
69
|
+
return false;
|
|
70
|
+
return !tower.computedForArm(focus.focus_id, focus.agent_assigned_at);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Admission as both spawn passes run it: decideTowerAdmission over the stored
|
|
74
|
+
* verdict, except that a verdict not yet computed for the focus's current arm
|
|
75
|
+
* is computed first (its product's pass) and the spawn is admitted against
|
|
76
|
+
* THAT. A failed computation leaves the product's pass failed, so the second
|
|
77
|
+
* decision fails open on it. Never throws.
|
|
78
|
+
*/
|
|
79
|
+
export async function admitThroughTower(focus, tower, nowMs) {
|
|
80
|
+
const stored = decideTowerAdmission(focus, tower, nowMs);
|
|
81
|
+
if (!towerVerdictNotYetComputed(focus, stored, tower))
|
|
82
|
+
return stored;
|
|
83
|
+
log.info(`[tower] "${focus.focus_name}" (${focus.focus_id.slice(0, 8)}): no verdict computed for its current arm yet -- ` +
|
|
84
|
+
`computing it before admission`);
|
|
85
|
+
let computed = null;
|
|
86
|
+
try {
|
|
87
|
+
computed = await tower.computeVerdict(focus);
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
// computeVerdict records its own failure; an unexpected throw costs no spawn (fail open below).
|
|
91
|
+
}
|
|
92
|
+
return decideTowerAdmission({ ...focus, tower_verdict: computed }, tower, nowMs);
|
|
93
|
+
}
|
|
45
94
|
/** One log line per focus per distinct message (a held focus is not re-logged every poll). */
|
|
46
95
|
const lastLogged = new Map();
|
|
47
96
|
function logOnce(focusId, message, level) {
|
|
@@ -126,11 +175,12 @@ export function offerForTower(source, foci, idOf, mode) {
|
|
|
126
175
|
/**
|
|
127
176
|
* The pending-spawn pass's tower check (a queued directive -- e.g. a review --
|
|
128
177
|
* on an armed focus): consulted after the cooldown and before the host cap,
|
|
129
|
-
* exactly where the ready pass consults it
|
|
130
|
-
* queued
|
|
178
|
+
* exactly where the ready pass consults it, through the same admitThroughTower
|
|
179
|
+
* -- so a directive queued in the poll that armed the focus waits for the
|
|
180
|
+
* focus's first verdict. True = held; the directive stays queued.
|
|
131
181
|
*/
|
|
132
|
-
export function pendingSpawnHeldByTower(focus, atHostCapacity, tower, nowMs) {
|
|
133
|
-
const admission =
|
|
182
|
+
export async function pendingSpawnHeldByTower(focus, atHostCapacity, tower, nowMs) {
|
|
183
|
+
const admission = await admitThroughTower(focus, tower, nowMs);
|
|
134
184
|
noteTowerAdmission(focus, admission, admission.holds ? 'tower_hold' : atHostCapacity ? 'capacity' : 'spawn', nowMs, 'pending');
|
|
135
185
|
return admission.holds;
|
|
136
186
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-admission.js","sourceRoot":"","sources":["../../src/tower/tower-admission.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0DAA0D;AAC1D,gBAAgB;AAEhB
|
|
1
|
+
{"version":3,"file":"tower-admission.js","sourceRoot":"","sources":["../../src/tower/tower-admission.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0DAA0D;AAC1D,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;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CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC/H,OAAO,SAAS,CAAC,KAAK,CAAC;AACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-graph.d.ts","sourceRoot":"","sources":["../../src/tower/tower-graph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tower-graph.d.ts","sourceRoot":"","sources":["../../src/tower/tower-graph.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,KAAK,EAA4C,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEvG,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,UAAU,GAAG,qBAAqB,CAAC,CAAC;AAEvG,wBAAgB,eAAe,CAC7B,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC,EAC9D,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,sBAAsB,GACvF,gBAAgB,CA0ClB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/tower/focus-landed.test.ts,
|
|
2
|
+
// Pinned by: packages/daemon/src/tower/focus-landed.test.ts,
|
|
3
|
+
// packages/daemon/src/tower/tower-arm-admission.test.ts, packages/daemon/src/tower/tower-pass.test.ts,
|
|
3
4
|
// packages/daemon/src/tower/tower-state-ingestion.test.ts
|
|
4
5
|
// PINNED-BY-END
|
|
5
6
|
import { judgeFocusLanded } from './focus-landed.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-graph.js","sourceRoot":"","sources":["../../src/tower/tower-graph.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"tower-graph.js","sourceRoot":"","sources":["../../src/tower/tower-graph.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6DAA6D;AAC7D,yGAAyG;AACzG,4DAA4D;AAC5D,gBAAgB;AAsBhB,OAAO,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAKvE,MAAM,UAAU,eAAe,CAC7B,KAA8D,EAC9D,aAAwF;IAExF,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAuB,CAAC;IACnD,MAAM,MAAM,GAAG,CAAC,OAAe,EAAe,EAAE;QAC9C,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;QAC1B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,MAAmB,CAAC;QACxB,IAAI,CAAC,CAAC;YAAE,MAAM,GAAG,SAAS,CAAC;aACtB,IAAI,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,EAAE,WAAW,CAAC,KAAK,QAAQ;YAAE,MAAM,GAAG,YAAY,CAAC;;YAC1F,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjC,OAAO,MAAM,CAAC;IAChB,C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E,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;YAAE,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/F,CAAC;IAED,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU;YAAE,SAAS;QACpC,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;YAC1C,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;YACxF,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC3B,CAAC,CAAC;QACF,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;QAChC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -24,5 +24,5 @@ export interface TowerHeartbeatStatus {
|
|
|
24
24
|
}
|
|
25
25
|
export declare function buildTowerStatusByProduct(products: ReadonlyArray<{
|
|
26
26
|
id: string;
|
|
27
|
-
}>, tower: TowerAdmissionDeps): Record<string, TowerHeartbeatStatus>;
|
|
27
|
+
}>, tower: Pick<TowerAdmissionDeps, 'mode' | 'passStanding'>): Record<string, TowerHeartbeatStatus>;
|
|
28
28
|
//# sourceMappingURL=tower-heartbeat-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-heartbeat-status.d.ts","sourceRoot":"","sources":["../../src/tower/tower-heartbeat-status.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,aAAa,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EACvC,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"tower-heartbeat-status.d.ts","sourceRoot":"","sources":["../../src/tower/tower-heartbeat-status.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,aAAa,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EACvC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,cAAc,CAAC,GACvD,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAKtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-heartbeat-status.js","sourceRoot":"","sources":["../../src/tower/tower-heartbeat-status.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sEAAsE;AACtE,gBAAgB;AA6BhB,MAAM,UAAU,yBAAyB,CACvC,QAAuC,EACvC,
|
|
1
|
+
{"version":3,"file":"tower-heartbeat-status.js","sourceRoot":"","sources":["../../src/tower/tower-heartbeat-status.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sEAAsE;AACtE,gBAAgB;AA6BhB,MAAM,UAAU,yBAAyB,CACvC,QAAuC,EACvC,KAAwD;IAExD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1B,MAAM,GAAG,GAAyC,EAAE,CAAC;IACrD,KAAK,MAAM,CAAC,IAAI,QAAQ;QAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC/E,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -3,6 +3,17 @@ export type TowerPassStanding = 'ok' | 'failed' | 'not_run';
|
|
|
3
3
|
export declare function recordTowerPassOutcome(productId: string, ok: boolean, nowMs?: number): void;
|
|
4
4
|
/** The product's pass standing now. A focus with no product cannot be judged: not_run. */
|
|
5
5
|
export declare function towerPassStanding(productId: string | null | undefined, nowMs?: number): TowerPassStanding;
|
|
6
|
+
/**
|
|
7
|
+
* Record the arms a successful product pass computed verdicts for (every armed
|
|
8
|
+
* focus it read, whatever verdict -- or none -- it computed). Merged, never
|
|
9
|
+
* replaced: a later arm of the same focus overwrites its entry.
|
|
10
|
+
*/
|
|
11
|
+
export declare function recordTowerComputedArms(arms: Iterable<{
|
|
12
|
+
focusId: string;
|
|
13
|
+
armedAt: string | null;
|
|
14
|
+
}>): void;
|
|
15
|
+
/** Whether a pass of this process has computed the focus's verdict under this arm. */
|
|
16
|
+
export declare function towerVerdictComputedForArm(focusId: string, armedAt: string | null | undefined): boolean;
|
|
6
17
|
/** Test-only reset. */
|
|
7
18
|
export declare function resetTowerPassStanding(): void;
|
|
8
19
|
//# sourceMappingURL=tower-pass-standing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-pass-standing.d.ts","sourceRoot":"","sources":["../../src/tower/tower-pass-standing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tower-pass-standing.d.ts","sourceRoot":"","sources":["../../src/tower/tower-pass-standing.ts"],"names":[],"mappings":"AAyCA,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,QAAQ,GAAG,SAAS,CAAC;AAY5D,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,GAAE,MAAmB,GAAG,IAAI,CAEvG;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,GAAE,MAAmB,GAAG,iBAAiB,CAMrH;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,GAAG,IAAI,CAEzG;AAED,sFAAsF;AACtF,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGvG;AAED,uBAAuB;AACvB,wBAAgB,sBAAsB,IAAI,IAAI,CAG7C"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/tower/tower-
|
|
2
|
+
// Pinned by: packages/daemon/src/tower/tower-arm-admission.test.ts,
|
|
3
|
+
// packages/daemon/src/tower/tower-depends-on-admission.test.ts,
|
|
4
|
+
// packages/daemon/src/tower/tower-entrypoints.test.ts,
|
|
3
5
|
// packages/daemon/src/tower/tower-heartbeat-status.test.ts, packages/daemon/src/tower/tower-pass.test.ts,
|
|
4
6
|
// packages/daemon/src/tower/tower-prd-arm.test.ts,
|
|
5
7
|
// packages/daemon/src/tower/tower-ready-row-ingestion.test.ts,
|
|
@@ -23,11 +25,25 @@
|
|
|
23
25
|
* not_run -- no pass for the product has succeeded within the bound (daemon
|
|
24
26
|
* start before the first pass, or a pass that stopped running).
|
|
25
27
|
*
|
|
28
|
+
* And which ARM each focus's verdict was last computed for. A focus armed (or
|
|
29
|
+
* re-armed) after the product's standing pass read its foci has no verdict for
|
|
30
|
+
* that arm yet -- not because the tower failed, but because no pass has seen
|
|
31
|
+
* the arm. Admission tells that NOT-YET-COMPUTED case apart from a failed or
|
|
32
|
+
* stale one by asking towerVerdictComputedForArm, and computes the verdict
|
|
33
|
+
* before it admits the spawn instead of failing open (tower-admission.ts).
|
|
34
|
+
*
|
|
26
35
|
* A leaf: in-process state, written by tower-pass.ts and read by admission
|
|
27
36
|
* through the spawn passes' deps (composition/spawn-pass-deps.ts).
|
|
28
37
|
*/
|
|
29
38
|
import { TOWER_VERDICT_MAX_AGE_MS } from '@telora/daemon-core';
|
|
30
39
|
const lastOutcome = new Map();
|
|
40
|
+
/** focusId -> the arm (agent_assigned_at) a pass of this process last computed its verdict for. */
|
|
41
|
+
const computedArm = new Map();
|
|
42
|
+
function sameInstant(a, b) {
|
|
43
|
+
if (a === null || b === null)
|
|
44
|
+
return a === b;
|
|
45
|
+
return Date.parse(a) === Date.parse(b);
|
|
46
|
+
}
|
|
31
47
|
/** Record one product pass's outcome (tower-pass.ts runTowerPass). */
|
|
32
48
|
export function recordTowerPassOutcome(productId, ok, nowMs = Date.now()) {
|
|
33
49
|
lastOutcome.set(productId, { ok, atMs: nowMs });
|
|
@@ -43,8 +59,24 @@ export function towerPassStanding(productId, nowMs = Date.now()) {
|
|
|
43
59
|
return 'failed';
|
|
44
60
|
return nowMs - last.atMs > TOWER_VERDICT_MAX_AGE_MS ? 'not_run' : 'ok';
|
|
45
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Record the arms a successful product pass computed verdicts for (every armed
|
|
64
|
+
* focus it read, whatever verdict -- or none -- it computed). Merged, never
|
|
65
|
+
* replaced: a later arm of the same focus overwrites its entry.
|
|
66
|
+
*/
|
|
67
|
+
export function recordTowerComputedArms(arms) {
|
|
68
|
+
for (const { focusId, armedAt } of arms)
|
|
69
|
+
computedArm.set(focusId, armedAt);
|
|
70
|
+
}
|
|
71
|
+
/** Whether a pass of this process has computed the focus's verdict under this arm. */
|
|
72
|
+
export function towerVerdictComputedForArm(focusId, armedAt) {
|
|
73
|
+
if (!computedArm.has(focusId))
|
|
74
|
+
return false;
|
|
75
|
+
return sameInstant(computedArm.get(focusId) ?? null, armedAt ?? null);
|
|
76
|
+
}
|
|
46
77
|
/** Test-only reset. */
|
|
47
78
|
export function resetTowerPassStanding() {
|
|
48
79
|
lastOutcome.clear();
|
|
80
|
+
computedArm.clear();
|
|
49
81
|
}
|
|
50
82
|
//# sourceMappingURL=tower-pass-standing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-pass-standing.js","sourceRoot":"","sources":["../../src/tower/tower-pass-standing.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,kEAAkE;AAClE,4GAA4G;AAC5G,qDAAqD;AACrD,iEAAiE;AACjE,wDAAwD;AACxD,gBAAgB;AAEhB
|
|
1
|
+
{"version":3,"file":"tower-pass-standing.js","sourceRoot":"","sources":["../../src/tower/tower-pass-standing.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oEAAoE;AACpE,kEAAkE;AAClE,yDAAyD;AACzD,4GAA4G;AAC5G,qDAAqD;AACrD,iEAAiE;AACjE,wDAAwD;AACxD,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAI/D,MAAM,WAAW,GAAG,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AkC;IAC5F,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;AACxE,CAAC;AAED,uBAAuB;AACvB,MAAM,UAAU,sBAAsB;IACpC,WAAW,CAAC,KAAK,EAAE,CAAC;IACpB,WAAW,CAAC,KAAK,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* product_focuses.tower_verdict.
|
|
4
4
|
*
|
|
5
5
|
* It runs at the head of every ready-focus pass (so on daemon start and every
|
|
6
|
-
* poll),
|
|
6
|
+
* poll) -- and, for ONE product, on demand when a spawn pass reaches a focus
|
|
7
|
+
* whose current arm no pass has computed a verdict for yet
|
|
8
|
+
* (computeTowerVerdictForAdmission; tower-admission.ts) -- reads the product's limit and armed foci, computes every verdict
|
|
7
9
|
* (tower-verdicts.ts) from the armed set, the limit, focus rank, team presence
|
|
8
10
|
* and the spawn passes' last record of demand, and writes only what changed --
|
|
9
11
|
* or what is aging toward the bounded freshness age. So any change to those
|
|
@@ -17,9 +19,9 @@
|
|
|
17
19
|
*
|
|
18
20
|
* The tower never arms or un-arms: nothing here writes assigned_agent_role_id.
|
|
19
21
|
*/
|
|
20
|
-
import type { TowerMode } from '@telora/daemon-core';
|
|
22
|
+
import type { TowerMode, TowerVerdict } from '@telora/daemon-core';
|
|
21
23
|
import type { TowerProductState } from '../queries/tower/tower-state.js';
|
|
22
|
-
import { type TowerVerdictWrite } from './tower-verdicts.js';
|
|
24
|
+
import { type TowerComputed, type TowerFocusInput, type TowerVerdictWrite } from './tower-verdicts.js';
|
|
23
25
|
import type { TowerGraphInputs } from './tower-graph.js';
|
|
24
26
|
export interface TowerPassDeps {
|
|
25
27
|
products: ReadonlyArray<{
|
|
@@ -48,8 +50,30 @@ export interface TowerProductOutcome {
|
|
|
48
50
|
writes: number;
|
|
49
51
|
error?: string;
|
|
50
52
|
}
|
|
53
|
+
/** What one product's pass computed and wrote. */
|
|
54
|
+
export interface TowerProductPassResult {
|
|
55
|
+
writes: number;
|
|
56
|
+
/** focusId -> the verdict computed (null = none), for every armed focus read. */
|
|
57
|
+
computed: TowerComputed;
|
|
58
|
+
/** The armed foci the pass read, each with the arm its verdict was computed for. */
|
|
59
|
+
foci: readonly TowerFocusInput[];
|
|
60
|
+
}
|
|
51
61
|
/** Run one product's pass. Throws on a read/compute/write failure (the caller isolates it). */
|
|
52
|
-
export declare function runTowerProductPass(productId: string, deps: TowerPassDeps): Promise<
|
|
62
|
+
export declare function runTowerProductPass(productId: string, deps: TowerPassDeps): Promise<TowerProductPassResult>;
|
|
53
63
|
/** Run every product's pass; one product's failure never stops another's. */
|
|
54
64
|
export declare function runTowerPass(deps: TowerPassDeps): Promise<TowerProductOutcome[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Compute a focus's verdict NOW, for admission: one pass over the focus's
|
|
67
|
+
* product -- the same pass, writing every verdict of the product that changed --
|
|
68
|
+
* with the focus counted as wanting a team (it is at a spawn gate). Returns the
|
|
69
|
+
* verdict computed for the focus, or null for none: the pass failed (recorded,
|
|
70
|
+
* so admission reads the product's pass as failed and fails open), no live
|
|
71
|
+
* deps, or the focus is not among the product's armed foci (recorded as
|
|
72
|
+
* computed for its arm, so the next poll does not run the pass again for it).
|
|
73
|
+
*/
|
|
74
|
+
export declare function computeTowerVerdictForAdmission(focus: {
|
|
75
|
+
focus_id: string;
|
|
76
|
+
product_id?: string | null;
|
|
77
|
+
agent_assigned_at?: string | null;
|
|
78
|
+
}, source: TowerPassDepsSource): Promise<TowerVerdict | null>;
|
|
55
79
|
//# sourceMappingURL=tower-pass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-pass.d.ts","sourceRoot":"","sources":["../../src/tower/tower-pass.ts"],"names":[],"mappings":"AAOA
|
|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;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,kDAAkD;AAClD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,QAAQ,EAAE,aAAa,CAAC;IACxB,oFAAoF;IACpF,IAAI,EAAE,SAAS,eAAe,EAAE,CAAC;CAClC;AAED,+FAA+F;AAC/F,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAwBjH;AAwBD,6EAA6E;AAC7E,wBAAsB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAStF;AAED;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,CACnD,KAAK,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAC1F,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAiB9B"}
|
package/dist/tower/tower-pass.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/tower/tower-
|
|
3
|
-
// packages/daemon/src/tower/tower-
|
|
4
|
-
// packages/daemon/src/tower/tower-spawn-modes.test.ts,
|
|
2
|
+
// Pinned by: packages/daemon/src/tower/tower-arm-admission.test.ts,
|
|
3
|
+
// packages/daemon/src/tower/tower-entrypoints.test.ts, packages/daemon/src/tower/tower-pass.test.ts,
|
|
4
|
+
// packages/daemon/src/tower/tower-prd-arm.test.ts, packages/daemon/src/tower/tower-spawn-modes.test.ts,
|
|
5
5
|
// packages/daemon/src/tower/tower-state-ingestion.test.ts
|
|
6
6
|
// PINNED-BY-END
|
|
7
7
|
import { createLogger } from '../log/daemon-log.js';
|
|
8
8
|
import { computeTowerVerdicts, planTowerWrites, } from './tower-verdicts.js';
|
|
9
|
-
import { recordTowerPassOutcome } from './tower-pass-standing.js';
|
|
9
|
+
import { recordTowerComputedArms, recordTowerPassOutcome } from './tower-pass-standing.js';
|
|
10
10
|
const log = createLogger({ module: 'tower' });
|
|
11
11
|
/** Run one product's pass. Throws on a read/compute/write failure (the caller isolates it). */
|
|
12
12
|
export async function runTowerProductPass(productId, deps) {
|
|
13
13
|
if (deps.mode === 'off')
|
|
14
|
-
return 0;
|
|
14
|
+
return { writes: 0, computed: new Map(), foci: [] };
|
|
15
15
|
const state = await deps.readState(productId);
|
|
16
16
|
const foci = state.foci.map((f) => ({
|
|
17
17
|
focusId: f.focusId,
|
|
@@ -33,7 +33,27 @@ export async function runTowerProductPass(productId, deps) {
|
|
|
33
33
|
});
|
|
34
34
|
const writes = planTowerWrites(foci, computed, state.unarmedWithVerdictFocusIds ?? [], now.getTime());
|
|
35
35
|
await deps.writeVerdicts(productId, writes);
|
|
36
|
-
return writes.length;
|
|
36
|
+
return { writes: writes.length, computed, foci };
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* One product's pass, isolated: its outcome is recorded (tower-pass-standing.ts)
|
|
40
|
+
* -- the standing, and on success the arms it computed verdicts for -- and a
|
|
41
|
+
* failure is logged and returned, never thrown.
|
|
42
|
+
*/
|
|
43
|
+
async function runIsolatedProductPass(productId, deps) {
|
|
44
|
+
try {
|
|
45
|
+
const result = await runTowerProductPass(productId, deps);
|
|
46
|
+
recordTowerPassOutcome(productId, true, deps.now().getTime());
|
|
47
|
+
recordTowerComputedArms(result.foci.map((f) => ({ focusId: f.focusId, armedAt: f.armedAt })));
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
52
|
+
recordTowerPassOutcome(productId, false, deps.now().getTime());
|
|
53
|
+
log.warn(`[tower] pass failed for product ${productId.slice(0, 8)}: ${error} -- admission fails open on its foci ` +
|
|
54
|
+
`until a pass for it succeeds (tower-pass-standing.ts)`);
|
|
55
|
+
return { error };
|
|
56
|
+
}
|
|
37
57
|
}
|
|
38
58
|
/** Run every product's pass; one product's failure never stops another's. */
|
|
39
59
|
export async function runTowerPass(deps) {
|
|
@@ -41,19 +61,41 @@ export async function runTowerPass(deps) {
|
|
|
41
61
|
return [];
|
|
42
62
|
const outcomes = [];
|
|
43
63
|
for (const product of deps.products) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
catch (err) {
|
|
50
|
-
const error = err instanceof Error ? err.message : String(err);
|
|
51
|
-
recordTowerPassOutcome(product.id, false, deps.now().getTime());
|
|
52
|
-
log.warn(`[tower] pass failed for product ${product.id.slice(0, 8)}: ${error} -- admission fails open on its foci ` +
|
|
53
|
-
`until a pass for it succeeds (tower-pass-standing.ts)`);
|
|
54
|
-
outcomes.push({ productId: product.id, ok: false, writes: 0, error });
|
|
55
|
-
}
|
|
64
|
+
const result = await runIsolatedProductPass(product.id, deps);
|
|
65
|
+
if ('error' in result)
|
|
66
|
+
outcomes.push({ productId: product.id, ok: false, writes: 0, error: result.error });
|
|
67
|
+
else
|
|
68
|
+
outcomes.push({ productId: product.id, ok: true, writes: result.writes });
|
|
56
69
|
}
|
|
57
70
|
return outcomes;
|
|
58
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Compute a focus's verdict NOW, for admission: one pass over the focus's
|
|
74
|
+
* product -- the same pass, writing every verdict of the product that changed --
|
|
75
|
+
* with the focus counted as wanting a team (it is at a spawn gate). Returns the
|
|
76
|
+
* verdict computed for the focus, or null for none: the pass failed (recorded,
|
|
77
|
+
* so admission reads the product's pass as failed and fails open), no live
|
|
78
|
+
* deps, or the focus is not among the product's armed foci (recorded as
|
|
79
|
+
* computed for its arm, so the next poll does not run the pass again for it).
|
|
80
|
+
*/
|
|
81
|
+
export async function computeTowerVerdictForAdmission(focus, source) {
|
|
82
|
+
const productId = focus.product_id;
|
|
83
|
+
const base = productId ? source() : null;
|
|
84
|
+
if (!productId || !base || base.mode === 'off')
|
|
85
|
+
return null;
|
|
86
|
+
const deps = {
|
|
87
|
+
...base,
|
|
88
|
+
wantingFocusIds: () => {
|
|
89
|
+
const wanting = base.wantingFocusIds();
|
|
90
|
+
return wanting === null ? null : new Set([...wanting, focus.focus_id]);
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
const result = await runIsolatedProductPass(productId, deps);
|
|
94
|
+
if ('error' in result)
|
|
95
|
+
return null;
|
|
96
|
+
if (!result.computed.has(focus.focus_id)) {
|
|
97
|
+
recordTowerComputedArms([{ focusId: focus.focus_id, armedAt: focus.agent_assigned_at ?? null }]);
|
|
98
|
+
}
|
|
99
|
+
return result.computed.get(focus.focus_id) ?? null;
|
|
100
|
+
}
|
|
59
101
|
//# sourceMappingURL=tower-pass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-pass.js","sourceRoot":"","sources":["../../src/tower/tower-pass.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"tower-pass.js","sourceRoot":"","sources":["../../src/tower/tower-pass.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oEAAoE;AACpE,uGAAuG;AACvG,0GAA0G;AAC1G,4DAA4D;AAC5D,gBAAgB;AA0BhB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,oBAAoB,EACpB,eAAe,GAIhB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE3F,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAwC9C,+FAA+F;AAC/F,MAAM,CAAC,KAAK,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I,OAAO,IAAI,MAAM;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,uBAAuB,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,iBAAiB,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IACnG,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;AACrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-spawn-intent.d.ts","sourceRoot":"","sources":["../../src/tower/tower-spawn-intent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tower-spawn-intent.d.ts","sourceRoot":"","sources":["../../src/tower/tower-spawn-intent.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAE1C,sEAAsE;AACtE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,CAAC;AAapD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,EAAE,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAEvG;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAmB,EAAE,MAAM,GAAE,iBAA2B,GAAG,IAAI,CASxI;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,GAAE,MAAmB,GAAG,IAAI,CAMjG;AAED,wFAAwF;AACxF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAEtE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC,EAAE,KAAK,GAAE,MAAmB,GAAG,IAAI,CAe1H;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,GAAE,MAAmB,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAWtF;AAED,uBAAuB;AACvB,wBAAgB,gBAAgB,IAAI,IAAI,CAIvC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/tower/tower-
|
|
3
|
-
// packages/daemon/src/tower/tower-
|
|
2
|
+
// Pinned by: packages/daemon/src/tower/tower-arm-admission.test.ts,
|
|
3
|
+
// packages/daemon/src/tower/tower-depends-on-admission.test.ts,
|
|
4
|
+
// packages/daemon/src/tower/tower-entrypoints.test.ts, packages/daemon/src/tower/tower-prd-arm.test.ts,
|
|
4
5
|
// packages/daemon/src/tower/tower-ready-row-ingestion.test.ts,
|
|
5
6
|
// packages/daemon/src/tower/tower-spawn-modes.test.ts
|
|
6
7
|
// PINNED-BY-END
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-spawn-intent.js","sourceRoot":"","sources":["../../src/tower/tower-spawn-intent.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,kEAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"tower-spawn-intent.js","sourceRoot":"","sources":["../../src/tower/tower-spawn-intent.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oEAAoE;AACpE,kEAAkE;AAClE,0GAA0G;AAC1G,iEAAiE;AACjE,wDAAwD;AACxD,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,oFAAoF;AACpF,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