@telora/daemon 0.22.97 → 0.22.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-info.json +2 -2
- package/dist/cli/verify-setup-config.d.ts +4 -3
- package/dist/cli/verify-setup-config.d.ts.map +1 -1
- package/dist/cli/verify-setup-config.js.map +1 -1
- package/dist/git/exec.d.ts.map +1 -1
- package/dist/git/exec.js +2 -1
- package/dist/git/exec.js.map +1 -1
- package/dist/queries/delivery-gate-state.d.ts +8 -0
- package/dist/queries/delivery-gate-state.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state.js.map +1 -1
- package/dist/queries/verification.d.ts +15 -0
- package/dist/queries/verification.d.ts.map +1 -1
- package/dist/queries/verification.js +1 -0
- package/dist/queries/verification.js.map +1 -1
- package/dist/shell/config.d.ts.map +1 -1
- package/dist/shell/config.js +10 -9
- package/dist/shell/config.js.map +1 -1
- package/dist/shell/unified-shell-status.d.ts +6 -0
- package/dist/shell/unified-shell-status.d.ts.map +1 -1
- package/dist/shell/unified-shell-status.js +9 -2
- package/dist/shell/unified-shell-status.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/types/config.d.ts +9 -6
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/verification-baseline.d.ts +63 -16
- package/dist/verify/verification-baseline.d.ts.map +1 -1
- package/dist/verify/verification-baseline.js +74 -34
- package/dist/verify/verification-baseline.js.map +1 -1
- package/dist/verify/verification-checkout.d.ts +19 -6
- package/dist/verify/verification-checkout.d.ts.map +1 -1
- package/dist/verify/verification-checkout.js +95 -8
- package/dist/verify/verification-checkout.js.map +1 -1
- package/dist/verify/verification-config.d.ts +76 -0
- package/dist/verify/verification-config.d.ts.map +1 -1
- package/dist/verify/verification-config.js +100 -12
- package/dist/verify/verification-config.js.map +1 -1
- package/dist/verify/verification-default-on.d.ts +75 -8
- package/dist/verify/verification-default-on.d.ts.map +1 -1
- package/dist/verify/verification-default-on.js +155 -12
- package/dist/verify/verification-default-on.js.map +1 -1
- package/dist/verify/verification-deps-default.js +1 -1
- package/dist/verify/verification-deps-default.js.map +1 -1
- package/dist/verify/verification-deps.d.ts +17 -3
- package/dist/verify/verification-deps.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.d.ts +41 -0
- package/dist/verify/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.js +32 -22
- package/dist/verify/verification-deterministic.js.map +1 -1
- package/dist/verify/verification-engine.d.ts.map +1 -1
- package/dist/verify/verification-engine.js +10 -12
- package/dist/verify/verification-engine.js.map +1 -1
- package/dist/verify/verification-evidence-unavailable-feedback.d.ts.map +1 -1
- package/dist/verify/verification-evidence-unavailable-feedback.js +6 -1
- package/dist/verify/verification-evidence-unavailable-feedback.js.map +1 -1
- package/dist/verify/verification-manifest.d.ts.map +1 -1
- package/dist/verify/verification-manifest.js +1 -0
- package/dist/verify/verification-manifest.js.map +1 -1
- package/dist/verify/verification-timeout-fault.d.ts +147 -0
- package/dist/verify/verification-timeout-fault.d.ts.map +1 -0
- package/dist/verify/verification-timeout-fault.js +211 -0
- package/dist/verify/verification-timeout-fault.js.map +1 -0
- package/dist/verify/verify-gate-stall.d.ts +5 -1
- package/dist/verify/verify-gate-stall.d.ts.map +1 -1
- package/dist/verify/verify-gate-stall.js +10 -1
- package/dist/verify/verify-gate-stall.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,22 @@
|
|
|
18
18
|
* cli/verify-setup.ts:218 writes to ~/.telora/daemon.json), so without it no PR
|
|
19
19
|
* could arm the gate and a fresh clone was ungated by construction.
|
|
20
20
|
*
|
|
21
|
+
* WHERE the manifest layer is read. The verification tick resolves once per
|
|
22
|
+
* product against `repoPath` -- the operator's checkout -- and that resolution
|
|
23
|
+
* owns the posture and the daemon-wide concurrency cap, and arms the default-on
|
|
24
|
+
* gate for every delivery when it resolves a command. When it resolves none, a
|
|
25
|
+
* delivery is still armed by the manifest its own judged commit ships
|
|
26
|
+
* (verify/verification-default-on.ts), unless the operator declined. The
|
|
27
|
+
* command + timeout a run APPLIES are re-resolved at
|
|
28
|
+
* dispatch against the code under verification, the detached checkout of the
|
|
29
|
+
* focus HEAD (resolveAppliedVerificationConfig, called from
|
|
30
|
+
* verify/verification-checkout.ts). Taking them from repoPath made a command or
|
|
31
|
+
* timeout committed on the verified branch inert until it reached the operator's
|
|
32
|
+
* checkout: full-suite runs were killed at a stale repoPath timeout while the
|
|
33
|
+
* branch declared a longer one. The repoPath manifest stays a RECORDED fallback
|
|
34
|
+
* for verified code that ships none; a malformed manifest in the verified code
|
|
35
|
+
* never falls back.
|
|
36
|
+
*
|
|
21
37
|
* The seam stays OPT-IN: a repo shipping no manifest still resolves to ''
|
|
22
38
|
* (disabled). No default command is ever hard-coded here -- the daemon manages
|
|
23
39
|
* products that have no whole-repo verification command at all.
|
|
@@ -32,6 +48,7 @@
|
|
|
32
48
|
*/
|
|
33
49
|
import type { DaemonConfig, DefaultVerificationConfig } from '../types/index.js';
|
|
34
50
|
import { type VerifyManifestReader } from './verification-manifest.js';
|
|
51
|
+
import type { StrategyResult } from './verification-deterministic.js';
|
|
35
52
|
/** Default timeout for the default-on deterministic run: 30 min (full build+test sweep). */
|
|
36
53
|
export declare const DEFAULT_VERIFY_TIMEOUT_MS: number;
|
|
37
54
|
/** Default max concurrent daemon-side verification runs. */
|
|
@@ -42,6 +59,42 @@ export declare const VERIFY_ENV: {
|
|
|
42
59
|
readonly TIMEOUT_MS: "TELORA_DEFAULT_VERIFY_TIMEOUT_MS";
|
|
43
60
|
readonly MAX_CONCURRENT: "TELORA_DEFAULT_VERIFY_MAX_CONCURRENT";
|
|
44
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* The layer a resolved verify value was read from.
|
|
64
|
+
*
|
|
65
|
+
* Why it is carried at all: a verify run killed by its timeout used to name
|
|
66
|
+
* neither the value applied nor where it came from, so a reader could not tell a
|
|
67
|
+
* stale operator override from a manifest committed on the branch from the typed
|
|
68
|
+
* default -- and each of those is fixed in a different place. `manifest_fallback`
|
|
69
|
+
* is the recorded case where the verified commit shipped no manifest and the
|
|
70
|
+
* product repoPath manifest was applied instead; `delivery` is an explicit-method
|
|
71
|
+
* row's own config, which no resolver layer produced.
|
|
72
|
+
*/
|
|
73
|
+
export type VerifyConfigSource = {
|
|
74
|
+
layer: 'env';
|
|
75
|
+
envVar: string;
|
|
76
|
+
} | {
|
|
77
|
+
layer: 'daemon.json';
|
|
78
|
+
} | {
|
|
79
|
+
layer: 'manifest';
|
|
80
|
+
path: string;
|
|
81
|
+
} | {
|
|
82
|
+
layer: 'manifest_fallback';
|
|
83
|
+
path: string;
|
|
84
|
+
verifiedPath: string;
|
|
85
|
+
} | {
|
|
86
|
+
layer: 'default';
|
|
87
|
+
} | {
|
|
88
|
+
layer: 'delivery';
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* A source as one human-readable label, the form every surface prints (gate
|
|
92
|
+
* state, escalations, `telora-daemon status`), so the same layer reads the same
|
|
93
|
+
* everywhere. A manifest names its absolute path, which also answers WHICH
|
|
94
|
+
* checkout's manifest applied. The `default` label names the typed timeout
|
|
95
|
+
* default: a defaulted command is '' (verification disabled), never printed.
|
|
96
|
+
*/
|
|
97
|
+
export declare function formatVerifyConfigSource(src: VerifyConfigSource): string;
|
|
45
98
|
/**
|
|
46
99
|
* Fully-resolved default-on verification settings. `enabled` is a convenience
|
|
47
100
|
* flag: true iff a non-empty command is configured (the default-on path only
|
|
@@ -52,6 +105,11 @@ export interface ResolvedDefaultVerification {
|
|
|
52
105
|
timeoutMs: number;
|
|
53
106
|
maxConcurrent: number;
|
|
54
107
|
enabled: boolean;
|
|
108
|
+
/** Which layer supplied the command and the timeout (see VerifyConfigSource). */
|
|
109
|
+
sources: {
|
|
110
|
+
command: VerifyConfigSource;
|
|
111
|
+
timeoutMs: VerifyConfigSource;
|
|
112
|
+
};
|
|
55
113
|
}
|
|
56
114
|
/**
|
|
57
115
|
* The config slice these resolvers need: the (already per-product-selected)
|
|
@@ -95,6 +153,22 @@ export type VerificationConfigScope = Pick<DaemonConfig, 'defaultVerification'>
|
|
|
95
153
|
* unchanged).
|
|
96
154
|
*/
|
|
97
155
|
export declare function resolveDefaultVerification(config: VerificationConfigScope, env?: NodeJS.ProcessEnv, readManifest?: VerifyManifestReader): ResolvedDefaultVerification;
|
|
156
|
+
/** What a deterministic run applied, and where it was read (StrategyResult.appliedConfig). */
|
|
157
|
+
export type AppliedVerificationConfig = NonNullable<StrategyResult['appliedConfig']>;
|
|
158
|
+
/**
|
|
159
|
+
* Resolve the command + timeout a deterministic run APPLIES, from the code it
|
|
160
|
+
* runs in: env > operator block > the manifest at `runPath` > the manifest at
|
|
161
|
+
* `source.repoPath` (recorded fallback) > typed default.
|
|
162
|
+
*
|
|
163
|
+
* The fallback is taken ONLY when the code at `runPath` ships no manifest, and
|
|
164
|
+
* it is recorded on the result (`manifestFallback`; `manifestPath` names the
|
|
165
|
+
* repoPath manifest, `verifiedManifestPath` where the verified code was read), so
|
|
166
|
+
* a value from another checkout is never applied silently. A MALFORMED manifest
|
|
167
|
+
* at `runPath` throws (readVerifyManifest names the file) and never falls back:
|
|
168
|
+
* the branch declared something unreadable, and substituting the operator
|
|
169
|
+
* checkout's value is exactly the silent swap this resolution removes.
|
|
170
|
+
*/
|
|
171
|
+
export declare function resolveAppliedVerificationConfig(source: VerificationConfigScope, runPath: string, env?: NodeJS.ProcessEnv, readManifest?: VerifyManifestReader): AppliedVerificationConfig;
|
|
98
172
|
/**
|
|
99
173
|
* Declarative verification posture, derived at read time from config (never a
|
|
100
174
|
* filed event, so it cannot spam and self-clears once configured):
|
|
@@ -130,6 +204,8 @@ export interface ProductVerificationPosture {
|
|
|
130
204
|
command: string;
|
|
131
205
|
/** The resolved timeout (ms) for the command; meaningful when `configured`. */
|
|
132
206
|
timeoutMs: number;
|
|
207
|
+
/** Where that timeout was read (formatVerifyConfigSource label), resolved against the product repoPath. */
|
|
208
|
+
timeoutSource?: string;
|
|
133
209
|
}
|
|
134
210
|
/**
|
|
135
211
|
* Build a `{ [productId]: { posture, command } }` map across products, applying
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-config.d.ts","sourceRoot":"","sources":["../../src/verify/verification-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification-config.d.ts","sourceRoot":"","sources":["../../src/verify/verification-config.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB,QAAiB,CAAC;AAExD,4DAA4D;AAC5D,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,2DAA2D;AAC3D,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,GACxB;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,KAAK,EAAE,mBAAmB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAClE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,GACpB;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC;AAE1B;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAexE;AAED;;;;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ACzE,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,2GAA2G;IAC3G,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,aAAa,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,yBAAyB,CAAA;CAAE,CAAC,EAC3G,WAAW,EAAE,yBAAyB,GAAG,SAAS,EAClD,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,YAAY,GAAE,oBAAyC,GACtD,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAkB5C"}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
// packages/daemon/src/verify/verification-default-on.test.ts,
|
|
5
5
|
// packages/daemon/src/verify/verification-manifest.test.ts,
|
|
6
6
|
// packages/daemon/src/verify/verification-posture.test.ts,
|
|
7
|
+
// packages/daemon/src/verify/verification-run-config-source.test.ts,
|
|
7
8
|
// packages/daemon/src/verify/verification-tick-product-scoping.test.ts
|
|
8
9
|
// PINNED-BY-END
|
|
9
10
|
import { loadEnvConfig } from '@telora/daemon-core';
|
|
10
|
-
import { readVerifyManifest } from './verification-manifest.js';
|
|
11
|
+
import { readVerifyManifest, resolveVerifyManifestPath, VERIFY_MANIFEST_FILENAME, } from './verification-manifest.js';
|
|
11
12
|
/** Default timeout for the default-on deterministic run: 30 min (full build+test sweep). */
|
|
12
13
|
export const DEFAULT_VERIFY_TIMEOUT_MS = 30 * 60 * 1000;
|
|
13
14
|
/** Default max concurrent daemon-side verification runs. */
|
|
@@ -18,6 +19,37 @@ export const VERIFY_ENV = {
|
|
|
18
19
|
TIMEOUT_MS: 'TELORA_DEFAULT_VERIFY_TIMEOUT_MS',
|
|
19
20
|
MAX_CONCURRENT: 'TELORA_DEFAULT_VERIFY_MAX_CONCURRENT',
|
|
20
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* A source as one human-readable label, the form every surface prints (gate
|
|
24
|
+
* state, escalations, `telora-daemon status`), so the same layer reads the same
|
|
25
|
+
* everywhere. A manifest names its absolute path, which also answers WHICH
|
|
26
|
+
* checkout's manifest applied. The `default` label names the typed timeout
|
|
27
|
+
* default: a defaulted command is '' (verification disabled), never printed.
|
|
28
|
+
*/
|
|
29
|
+
export function formatVerifyConfigSource(src) {
|
|
30
|
+
switch (src.layer) {
|
|
31
|
+
case 'env':
|
|
32
|
+
return `env ${src.envVar}`;
|
|
33
|
+
case 'daemon.json':
|
|
34
|
+
return 'daemon.json defaultVerification';
|
|
35
|
+
case 'manifest':
|
|
36
|
+
return src.path;
|
|
37
|
+
case 'manifest_fallback':
|
|
38
|
+
return `${src.path} (fallback: the verified commit ships no telora.verify.json)`;
|
|
39
|
+
case 'default':
|
|
40
|
+
return `default (${DEFAULT_VERIFY_TIMEOUT_MS}ms)`;
|
|
41
|
+
case 'delivery':
|
|
42
|
+
return 'delivery verification config';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** The first layer that supplies a value, else the fallback -- precedence and provenance in one read. */
|
|
46
|
+
function pickLayer(layers, fallback) {
|
|
47
|
+
for (const layer of layers) {
|
|
48
|
+
if (layer.value !== undefined)
|
|
49
|
+
return { value: layer.value, source: layer.source };
|
|
50
|
+
}
|
|
51
|
+
return fallback;
|
|
52
|
+
}
|
|
21
53
|
/**
|
|
22
54
|
* Resolve the default-on verification config from
|
|
23
55
|
* env > operator file > repo manifest > typed default.
|
|
@@ -53,23 +85,78 @@ export function resolveDefaultVerification(config, env = process.env, readManife
|
|
|
53
85
|
: undefined;
|
|
54
86
|
// An explicit operator decline outranks the repo manifest (see docstring).
|
|
55
87
|
const manifestCommand = file?.declined === true ? undefined : manifest?.command;
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
88
|
+
const daemonJson = { layer: 'daemon.json' };
|
|
89
|
+
const manifestSource = {
|
|
90
|
+
layer: 'manifest',
|
|
91
|
+
path: config.repoPath !== undefined ? resolveVerifyManifestPath(config.repoPath) : VERIFY_MANIFEST_FILENAME,
|
|
92
|
+
};
|
|
93
|
+
const command = pickLayer([
|
|
94
|
+
{ value: envCommand !== undefined && envCommand.trim() !== '' ? envCommand : undefined, source: { layer: 'env', envVar: VERIFY_ENV.COMMAND } },
|
|
95
|
+
{ value: fileCommand, source: daemonJson },
|
|
96
|
+
{ value: manifestCommand, source: manifestSource },
|
|
97
|
+
], { value: '', source: { layer: 'default' } });
|
|
98
|
+
const timeoutMs = pickLayer([
|
|
99
|
+
{ value: envCfg.TELORA_DEFAULT_VERIFY_TIMEOUT_MS, source: { layer: 'env', envVar: VERIFY_ENV.TIMEOUT_MS } },
|
|
100
|
+
{ value: typeof file?.timeoutMs === 'number' && file.timeoutMs > 0 ? file.timeoutMs : undefined, source: daemonJson },
|
|
101
|
+
{ value: manifest?.timeoutMs, source: manifestSource },
|
|
102
|
+
], { value: DEFAULT_VERIFY_TIMEOUT_MS, source: { layer: 'default' } });
|
|
64
103
|
const maxConcurrent = envCfg.TELORA_DEFAULT_VERIFY_MAX_CONCURRENT
|
|
65
104
|
?? (typeof file?.maxConcurrent === 'number' && file.maxConcurrent > 0 ? file.maxConcurrent : undefined)
|
|
66
105
|
?? manifest?.maxConcurrent
|
|
67
106
|
?? DEFAULT_VERIFY_MAX_CONCURRENT;
|
|
68
107
|
return {
|
|
69
|
-
command,
|
|
70
|
-
timeoutMs,
|
|
108
|
+
command: command.value,
|
|
109
|
+
timeoutMs: timeoutMs.value,
|
|
71
110
|
maxConcurrent,
|
|
72
|
-
enabled: command.trim().length > 0,
|
|
111
|
+
enabled: command.value.trim().length > 0,
|
|
112
|
+
sources: { command: command.source, timeoutMs: timeoutMs.source },
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Resolve the command + timeout a deterministic run APPLIES, from the code it
|
|
117
|
+
* runs in: env > operator block > the manifest at `runPath` > the manifest at
|
|
118
|
+
* `source.repoPath` (recorded fallback) > typed default.
|
|
119
|
+
*
|
|
120
|
+
* The fallback is taken ONLY when the code at `runPath` ships no manifest, and
|
|
121
|
+
* it is recorded on the result (`manifestFallback`; `manifestPath` names the
|
|
122
|
+
* repoPath manifest, `verifiedManifestPath` where the verified code was read), so
|
|
123
|
+
* a value from another checkout is never applied silently. A MALFORMED manifest
|
|
124
|
+
* at `runPath` throws (readVerifyManifest names the file) and never falls back:
|
|
125
|
+
* the branch declared something unreadable, and substituting the operator
|
|
126
|
+
* checkout's value is exactly the silent swap this resolution removes.
|
|
127
|
+
*/
|
|
128
|
+
export function resolveAppliedVerificationConfig(source, runPath, env = process.env, readManifest = readVerifyManifest) {
|
|
129
|
+
const verifiedManifestPath = resolveVerifyManifestPath(runPath);
|
|
130
|
+
const read = { fallback: false };
|
|
131
|
+
const readVerifiedThenFallback = (path) => {
|
|
132
|
+
const own = readManifest(path);
|
|
133
|
+
if (own !== undefined) {
|
|
134
|
+
read.manifestPath = verifiedManifestPath;
|
|
135
|
+
return own;
|
|
136
|
+
}
|
|
137
|
+
if (!source.repoPath || resolveVerifyManifestPath(source.repoPath) === verifiedManifestPath)
|
|
138
|
+
return undefined;
|
|
139
|
+
const fallback = readManifest(source.repoPath);
|
|
140
|
+
if (fallback !== undefined) {
|
|
141
|
+
read.manifestPath = resolveVerifyManifestPath(source.repoPath);
|
|
142
|
+
read.fallback = true;
|
|
143
|
+
}
|
|
144
|
+
return fallback;
|
|
145
|
+
};
|
|
146
|
+
const resolved = resolveDefaultVerification({ defaultVerification: source.defaultVerification, repoPath: runPath }, env, readVerifiedThenFallback);
|
|
147
|
+
// The resolver named the manifest it was ASKED for (the verified checkout's);
|
|
148
|
+
// when the fallback answered instead, the label must name the repoPath manifest
|
|
149
|
+
// that actually supplied the timeout.
|
|
150
|
+
const timeoutSource = resolved.sources.timeoutMs.layer === 'manifest' && read.fallback && read.manifestPath !== undefined
|
|
151
|
+
? { layer: 'manifest_fallback', path: read.manifestPath, verifiedPath: verifiedManifestPath }
|
|
152
|
+
: resolved.sources.timeoutMs;
|
|
153
|
+
return {
|
|
154
|
+
command: resolved.command,
|
|
155
|
+
timeoutMs: resolved.timeoutMs,
|
|
156
|
+
timeoutSource: formatVerifyConfigSource(timeoutSource),
|
|
157
|
+
verifiedManifestPath,
|
|
158
|
+
...(read.manifestPath !== undefined ? { manifestPath: read.manifestPath } : {}),
|
|
159
|
+
...(read.fallback ? { manifestFallback: true } : {}),
|
|
73
160
|
};
|
|
74
161
|
}
|
|
75
162
|
/**
|
|
@@ -116,6 +203,7 @@ export function buildProductPostureMap(products, globalBlock, env = process.env,
|
|
|
116
203
|
posture: deriveVerificationPosture(scoped, env, readManifest),
|
|
117
204
|
command: resolved.command,
|
|
118
205
|
timeoutMs: resolved.timeoutMs,
|
|
206
|
+
timeoutSource: formatVerifyConfigSource(resolved.sources.timeoutMs),
|
|
119
207
|
};
|
|
120
208
|
}
|
|
121
209
|
return map;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-config.js","sourceRoot":"","sources":["../../src/verify/verification-config.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+EAA+E;AAC/E,wEAAwE;AACxE,gEAAgE;AAChE,8DAA8D;AAC9D,6DAA6D;AAC7D,yEAAyE;AACzE,gBAAgB;
|
|
1
|
+
{"version":3,"file":"verification-config.js","sourceRoot":"","sources":["../../src/verify/verification-config.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+EAA+E;AAC/E,wEAAwE;AACxE,gEAAgE;AAChE,8DAA8D;AAC9D,6DAA6D;AAC7D,uEAAuE;AACvE,yEAAyE;AACzE,gBAAgB;AAoDhB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,wB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S,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9D,CAAC;QACF,MAAM,QAAQ,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;QACvE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG;YACV,OAAO,EAAE,yBAAyB,CAAC,MAAM,EAAE,GAAG,EAAE,YAAY,CAAC;YAC7D,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,aAAa,EAAE,wBAAwB,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC;SACpE,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -18,6 +18,7 @@ import { type ProductEntry } from '@telora/daemon-core';
|
|
|
18
18
|
import type { DaemonConfig } from '../types/index.js';
|
|
19
19
|
import type { PendingVerification } from '../queries/verification.js';
|
|
20
20
|
import { type ResolvedDefaultVerification } from './verification-config.js';
|
|
21
|
+
import { type VerifyManifest, type VerifyManifestReader } from './verification-manifest.js';
|
|
21
22
|
import type { getActiveFocuses } from '../queries/focus-discovery.js';
|
|
22
23
|
import type { getFocusDeliveries } from '../queries/focuses.js';
|
|
23
24
|
/**
|
|
@@ -34,6 +35,13 @@ export interface DefaultOnScanDeps {
|
|
|
34
35
|
* recorded failure suppressed: only a KNOWN different commit re-arms it.
|
|
35
36
|
*/
|
|
36
37
|
resolveFocusHeadSha?: (focusId: string) => string | null;
|
|
38
|
+
/**
|
|
39
|
+
* The telora.verify.json the focus's judged commit (its worktree HEAD) ships,
|
|
40
|
+
* read when the product repoPath resolves no command; null when the focus has
|
|
41
|
+
* no worktree, `unreadable` when git could not answer. Defaults to a git read
|
|
42
|
+
* of that commit.
|
|
43
|
+
*/
|
|
44
|
+
readJudgedCommitManifest?: (focusId: string) => JudgedCommitRead | null;
|
|
37
45
|
}
|
|
38
46
|
/**
|
|
39
47
|
* Counting semaphore capping concurrent daemon-side verification runs.
|
|
@@ -80,11 +88,17 @@ export interface ProductVerificationScope {
|
|
|
80
88
|
productConfig: DaemonConfig;
|
|
81
89
|
/**
|
|
82
90
|
* The resolved default-on config, or `undefined` when resolution FAILED (a
|
|
83
|
-
* malformed repo manifest). Undefined means "
|
|
84
|
-
*
|
|
85
|
-
*
|
|
91
|
+
* malformed repo manifest). Undefined means "the repoPath gate is off this
|
|
92
|
+
* tick" -- never "verification is disabled here", which is what a silent
|
|
93
|
+
* degrade to '' would have said.
|
|
86
94
|
*/
|
|
87
95
|
resolved: ResolvedDefaultVerification | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Present only beside an undefined `resolved`: what the default-on scan runs
|
|
98
|
+
* with instead -- no command, so each delivery is armed by its judged commit
|
|
99
|
+
* alone. Absent when even that resolution failed.
|
|
100
|
+
*/
|
|
101
|
+
judgedCommitOnly?: ResolvedDefaultVerification;
|
|
88
102
|
}
|
|
89
103
|
/**
|
|
90
104
|
* Resolve the default-on verification config for every product, from each
|
|
@@ -106,12 +120,21 @@ export interface ProductVerificationScope {
|
|
|
106
120
|
* product including healthy ones, so it is contained HERE: logged at ERROR
|
|
107
121
|
* naming the product and the manifest path (every tick -- a persistent,
|
|
108
122
|
* operator-visible state, never a debug line), and that product's `resolved`
|
|
109
|
-
* comes back `undefined
|
|
110
|
-
*
|
|
123
|
+
* comes back `undefined`: it contributes no cap while other products keep
|
|
124
|
+
* gating. The product's EXPLICIT-method deliveries still verify: they carry
|
|
111
125
|
* their own command on the delivery row, so a repo-root manifest typo has no
|
|
112
126
|
* bearing on them and must not disarm them.
|
|
127
|
+
*
|
|
128
|
+
* Nor does the typo disarm a branch that ships a working gate. repoPath is the
|
|
129
|
+
* operator's checkout, which may lag the code under verification, so the product
|
|
130
|
+
* is resolved again with that manifest set aside (`judgedCommitOnly`) and its
|
|
131
|
+
* scan still arms each delivery from the manifest its judged commit ships. That
|
|
132
|
+
* resolution carries no command even when env or daemon.json declare one: a
|
|
133
|
+
* delivery whose commit ships no manifest would fall back at dispatch to the
|
|
134
|
+
* broken repoPath file and fail on it, so until the file is fixed only
|
|
135
|
+
* branch-declared gates arm.
|
|
113
136
|
*/
|
|
114
|
-
export declare function resolveProductVerificationScopes(config: DaemonConfig, resolve: (c: DaemonConfig) => ResolvedDefaultVerification): ProductVerificationScope[];
|
|
137
|
+
export declare function resolveProductVerificationScopes(config: DaemonConfig, resolve: (c: DaemonConfig, readManifest?: VerifyManifestReader) => ResolvedDefaultVerification): ProductVerificationScope[];
|
|
115
138
|
/**
|
|
116
139
|
* Resolve the ONE daemon-wide concurrency cap for the shared semaphore.
|
|
117
140
|
*
|
|
@@ -166,6 +189,40 @@ export interface DefaultOnResultFacts {
|
|
|
166
189
|
* - a pass -> forget any recorded failure.
|
|
167
190
|
*/
|
|
168
191
|
export declare function noteDefaultOnResult(deliveryId: string, result: DefaultOnResultFacts): void;
|
|
192
|
+
/**
|
|
193
|
+
* What the commit a delivery is judged on declares in telora.verify.json, read
|
|
194
|
+
* from git AT that sha -- never the worktree's files, which may hold edits the
|
|
195
|
+
* verify never sees. No `manifest` and no `malformed` means the commit ships none.
|
|
196
|
+
*/
|
|
197
|
+
export interface JudgedCommitManifest {
|
|
198
|
+
sha: string;
|
|
199
|
+
/** Where the manifest sits in the focus worktree (the path a source label names). */
|
|
200
|
+
manifestPath: string;
|
|
201
|
+
manifest?: VerifyManifest;
|
|
202
|
+
/** The reader's error when the committed file exists but cannot be used. */
|
|
203
|
+
malformed?: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Git could not say what the judged commit ships (a failed rev-parse, ls-tree or
|
|
207
|
+
* show). That is neither "ships none" nor malformed -- it is no answer -- so it
|
|
208
|
+
* is never remembered: the next tick asks again.
|
|
209
|
+
*/
|
|
210
|
+
export interface JudgedCommitUnreadable {
|
|
211
|
+
unreadable: string;
|
|
212
|
+
}
|
|
213
|
+
export type JudgedCommitRead = JudgedCommitManifest | JudgedCommitUnreadable;
|
|
214
|
+
type GitRun = (args: string[], cwd: string) => {
|
|
215
|
+
success: boolean;
|
|
216
|
+
output: string;
|
|
217
|
+
error?: string;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Build the judged-commit manifest reader over a focus -> worktree lookup. A file
|
|
221
|
+
* is immutable at a sha, so each worktree's last read is reused while its HEAD
|
|
222
|
+
* is unchanged rather than re-running git every tick. Only reads git answered
|
|
223
|
+
* are kept; an unreadable one is retried on the next call.
|
|
224
|
+
*/
|
|
225
|
+
export declare function buildJudgedCommitManifestReader(resolveWorktreePath?: (focusId: string) => string | null, runGit?: GitRun): (focusId: string) => JudgedCommitRead | null;
|
|
169
226
|
/**
|
|
170
227
|
* Discover deliveries that should receive a DEFAULT-ON deterministic run: in
|
|
171
228
|
* `verify` status, anchored to an injection, with no explicit verification
|
|
@@ -175,10 +232,20 @@ export declare function noteDefaultOnResult(deliveryId: string, result: DefaultO
|
|
|
175
232
|
* focus's unchanged HEAD (HEAD-keyed guard).
|
|
176
233
|
*
|
|
177
234
|
* Synthesizes a `deterministic` PendingVerification carrying the resolved
|
|
178
|
-
* config-default command + timeout
|
|
179
|
-
*
|
|
235
|
+
* config-default command + timeout and a `defaultOnSource` marker. Those values
|
|
236
|
+
* are PROVISIONAL -- resolved against the product repoPath, which may lag the
|
|
237
|
+
* branch -- and a run on a detached checkout re-resolves both from the verified
|
|
238
|
+
* code (verify/verification-checkout.ts).
|
|
239
|
+
*
|
|
240
|
+
* Arming does not wait on repoPath either. When no command resolves there, each
|
|
241
|
+
* delivery is armed from the telora.verify.json its judged commit ships
|
|
242
|
+
* (armFromJudgedCommit), so a branch that introduces the gate is verified on its
|
|
243
|
+
* next run. An operator's `declined` marker is the exception: it suppresses the
|
|
244
|
+
* repo manifest, and no branch overturns it. With no command anywhere the
|
|
245
|
+
* feature stays inert.
|
|
180
246
|
*
|
|
181
247
|
* `config` must be product-scoped (config.productId identifies the product).
|
|
182
248
|
*/
|
|
183
249
|
export declare function collectDefaultOnVerifications(config: DaemonConfig, resolved: ResolvedDefaultVerification, explicitDeliveryIds: ReadonlySet<string>, deps: DefaultOnScanDeps): Promise<PendingVerification[]>;
|
|
250
|
+
export {};
|
|
184
251
|
//# sourceMappingURL=verification-default-on.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-default-on.d.ts","sourceRoot":"","sources":["../../src/verify/verification-default-on.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification-default-on.d.ts","sourceRoot":"","sources":["../../src/verify/verification-default-on.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAIL,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAehE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACzD;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,gBAAgB,GAAG,IAAI,CAAC;CACzE;AAMD;;;;;;;;;;;;;;;GAeG;AAC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