@telora/daemon 0.23.7 → 0.23.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-info.json +2 -2
- package/dist/completion/state-cascade/review-request-gate.d.ts +59 -0
- package/dist/completion/state-cascade/review-request-gate.d.ts.map +1 -0
- package/dist/completion/state-cascade/review-request-gate.js +56 -0
- package/dist/completion/state-cascade/review-request-gate.js.map +1 -0
- package/dist/completion/state-cascade/state-cascade.d.ts +12 -0
- package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade/state-cascade.js +40 -19
- package/dist/completion/state-cascade/state-cascade.js.map +1 -1
- package/dist/composition/commit-gate-context.d.ts.map +1 -1
- package/dist/composition/commit-gate-context.js +1 -0
- package/dist/composition/commit-gate-context.js.map +1 -1
- package/dist/composition/execution-git-context.d.ts.map +1 -1
- package/dist/composition/execution-git-context.js +1 -0
- package/dist/composition/execution-git-context.js.map +1 -1
- package/dist/composition/execution-spawn-context.d.ts.map +1 -1
- package/dist/composition/execution-spawn-context.js +5 -1
- package/dist/composition/execution-spawn-context.js.map +1 -1
- package/dist/composition/state-cascade-context.d.ts.map +1 -1
- package/dist/composition/state-cascade-context.js +3 -0
- package/dist/composition/state-cascade-context.js.map +1 -1
- package/dist/composition/verify-probe-context.d.ts.map +1 -1
- package/dist/composition/verify-probe-context.js +4 -2
- package/dist/composition/verify-probe-context.js.map +1 -1
- package/dist/config/live-daemon-config.js +1 -1
- package/dist/delivery/recorded-concerns.d.ts.map +1 -1
- package/dist/delivery/recorded-concerns.js +1 -0
- package/dist/delivery/recorded-concerns.js.map +1 -1
- package/dist/focus/focus-lifecycle.d.ts.map +1 -1
- package/dist/focus/focus-lifecycle.js +9 -8
- package/dist/focus/focus-lifecycle.js.map +1 -1
- package/dist/git/daemon-authored-commit.d.ts +19 -0
- package/dist/git/daemon-authored-commit.d.ts.map +1 -0
- package/dist/git/daemon-authored-commit.js +22 -0
- package/dist/git/daemon-authored-commit.js.map +1 -0
- package/dist/git/merge.d.ts.map +1 -1
- package/dist/git/merge.js +4 -1
- package/dist/git/merge.js.map +1 -1
- package/dist/prompt-sections/gate-ownership.d.ts +6 -3
- package/dist/prompt-sections/gate-ownership.d.ts.map +1 -1
- package/dist/prompt-sections/gate-ownership.js +17 -8
- package/dist/prompt-sections/gate-ownership.js.map +1 -1
- package/dist/supervision/stop-rows-verify-rerun.d.ts +6 -0
- package/dist/supervision/stop-rows-verify-rerun.d.ts.map +1 -1
- package/dist/supervision/stop-rows-verify-rerun.js +14 -9
- package/dist/supervision/stop-rows-verify-rerun.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/verification-deps.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/engine/verification-deps.js +1 -1
- package/dist/verify/gate-config/commit-gate-configured.d.ts.map +1 -1
- package/dist/verify/gate-config/commit-gate-configured.js +1 -0
- package/dist/verify/gate-config/commit-gate-configured.js.map +1 -1
- package/dist/verify/gate-config/verification-config.js +1 -1
- package/dist/verify/gate-config/verification-manifest.d.ts +17 -1
- package/dist/verify/gate-config/verification-manifest.d.ts.map +1 -1
- package/dist/verify/gate-config/verification-manifest.js +36 -1
- package/dist/verify/gate-config/verification-manifest.js.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +1 -1
- package/dist/verify/outcome-routing/verification-rework-messages.js +1 -1
- package/dist/verify/outcome-routing/verification-rework-messages.js.map +1 -1
- package/dist/verify/run-selection/default-on-guards.d.ts +7 -4
- package/dist/verify/run-selection/default-on-guards.d.ts.map +1 -1
- package/dist/verify/run-selection/default-on-guards.js +39 -64
- package/dist/verify/run-selection/default-on-guards.js.map +1 -1
- package/dist/verify/run-selection/pre-review-gate-dispatch.d.ts +22 -0
- package/dist/verify/run-selection/pre-review-gate-dispatch.d.ts.map +1 -0
- package/dist/verify/run-selection/pre-review-gate-dispatch.js +59 -0
- package/dist/verify/run-selection/pre-review-gate-dispatch.js.map +1 -0
- package/dist/verify/run-selection/verification-default-on.d.ts +4 -2
- package/dist/verify/run-selection/verification-default-on.d.ts.map +1 -1
- package/dist/verify/run-selection/verification-default-on.js +17 -8
- package/dist/verify/run-selection/verification-default-on.js.map +1 -1
- package/dist/worktree/commit-check-hook.d.ts +17 -0
- package/dist/worktree/commit-check-hook.d.ts.map +1 -0
- package/dist/worktree/commit-check-hook.js +146 -0
- package/dist/worktree/commit-check-hook.js.map +1 -0
- package/dist/worktree/focus-worktree-state.d.ts.map +1 -1
- package/dist/worktree/focus-worktree-state.js +1 -0
- package/dist/worktree/focus-worktree-state.js.map +1 -1
- package/dist/worktree/scratch-guard.d.ts.map +1 -1
- package/dist/worktree/scratch-guard.js +4 -1
- package/dist/worktree/scratch-guard.js.map +1 -1
- package/dist/worktree/worktree-hooks.d.ts +12 -2
- package/dist/worktree/worktree-hooks.d.ts.map +1 -1
- package/dist/worktree/worktree-hooks.js +12 -5
- package/dist/worktree/worktree-hooks.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,13 @@ export interface VerifyManifest {
|
|
|
22
22
|
timeoutMs?: number;
|
|
23
23
|
/** Optional cap on concurrent daemon-side runs. Must be > 0 when present. */
|
|
24
24
|
maxConcurrent?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Optional cheap structural check (lint + ratchets) the daemon installs as a
|
|
27
|
+
* git pre-commit hook in every writable agent worktree
|
|
28
|
+
* (worktree/commit-check-hook.ts). Absent => no commit check: a repo that
|
|
29
|
+
* declares none is unaffected. Rationale: docs/runbook-verify-gate-command.md.
|
|
30
|
+
*/
|
|
31
|
+
commitCheck?: string;
|
|
25
32
|
}
|
|
26
33
|
/**
|
|
27
34
|
* The file-system seam the manifest is read through (existence + read):
|
|
@@ -48,9 +55,18 @@ export declare function resolveVerifyManifestPath(repoPath: string): string;
|
|
|
48
55
|
* @returns The parsed manifest, or `undefined` when no manifest file exists.
|
|
49
56
|
* @throws Error naming the file path when the manifest exists but is
|
|
50
57
|
* unreadable / not JSON / not an object / carries no usable `command`
|
|
51
|
-
* / carries a non-positive `timeoutMs` or `maxConcurrent
|
|
58
|
+
* / carries a non-positive `timeoutMs` or `maxConcurrent` / carries a
|
|
59
|
+
* `commitCheck` that is not a non-empty string.
|
|
52
60
|
*/
|
|
53
61
|
export declare function readVerifyManifestFrom(repoPath: string | undefined, fs: VerifyManifestFs): VerifyManifest | undefined;
|
|
54
62
|
/** Read the repo's verification manifest from the working tree on disk (see readVerifyManifestFrom). */
|
|
55
63
|
export declare const readVerifyManifest: VerifyManifestReader;
|
|
64
|
+
/**
|
|
65
|
+
* The commit check a worktree's own manifest declares, for the pre-commit hook
|
|
66
|
+
* (worktree/commit-check-hook.ts). Read from the worktree, so a branch carries
|
|
67
|
+
* its own declaration. A MALFORMED manifest yields no commit check here and a
|
|
68
|
+
* warning through `warn`: installing guards must not fail a spawn, and the
|
|
69
|
+
* daemon's gate, which reads the same file, reports the malformation loudly.
|
|
70
|
+
*/
|
|
71
|
+
export declare function readCommitCheck(worktreePath: string, warn: (message: string) => void): string | undefined;
|
|
56
72
|
//# sourceMappingURL=verification-manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-manifest.d.ts","sourceRoot":"","sources":["../../../src/verify/gate-config/verification-manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification-manifest.d.ts","sourceRoot":"","sources":["../../../src/verify/gate-config/verification-manifest.ts"],"names":[],"mappings":"AAgFA;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAQD,qFAAqF;AACrF,MAAM,MAAM,oBAAoB,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,KAAK,cAAc,GAAG,SAAS,CAAC;AAEhG,0DAA0D;AAC1D,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAElE;AA6CD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,EAAE,EAAE,gBAAgB,GAAG,cAAc,GAAG,SAAS,CA+CrH;AAED,wGAAwG;AACxG,eAAO,MAAM,kBAAkB,EAAE,oBAAoF,CAAC;AAEtH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,GAAG,SAAS,CAOzG"}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
// packages/daemon/src/integration/explicit-gate-outcome-restart.test.ts,
|
|
6
6
|
// packages/daemon/src/integration/explicit-verdict-invalidation-restart.test.ts,
|
|
7
7
|
// packages/daemon/src/integration/explicit-verdict-reuse.test.ts,
|
|
8
|
+
// packages/daemon/src/integration/manifest-commit-check-composed.test.ts,
|
|
9
|
+
// packages/daemon/src/integration/review-request-verdict-composed.test.ts,
|
|
8
10
|
// packages/daemon/src/shell/verification-posture-surfacing.test.ts,
|
|
9
11
|
// packages/daemon/src/verify/deterministic-gate/verify-unprovisioned-worktree.test.ts,
|
|
10
12
|
// packages/daemon/src/verify/engine/verification-commit-sharing.test.ts,
|
|
@@ -113,6 +115,20 @@ function optionalPositiveNumber(raw, key, path) {
|
|
|
113
115
|
}
|
|
114
116
|
return value;
|
|
115
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Validate an optional command-string field. Present-but-not-a-non-empty-string
|
|
120
|
+
* is malformed (loud), for the same reason `command` is: a typo must never
|
|
121
|
+
* silently disarm a check the repo declared.
|
|
122
|
+
*/
|
|
123
|
+
function optionalCommand(raw, key, path) {
|
|
124
|
+
const value = raw[key];
|
|
125
|
+
if (value === undefined)
|
|
126
|
+
return undefined;
|
|
127
|
+
if (typeof value !== 'string' || value.trim() === '') {
|
|
128
|
+
manifestError(path, `"${key}" must be a non-empty command string when present (got ${JSON.stringify(value)}) -- omit the key to declare no ${key}`);
|
|
129
|
+
}
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
116
132
|
/**
|
|
117
133
|
* Read the repo's verification manifest through `fs`.
|
|
118
134
|
*
|
|
@@ -122,7 +138,8 @@ function optionalPositiveNumber(raw, key, path) {
|
|
|
122
138
|
* @returns The parsed manifest, or `undefined` when no manifest file exists.
|
|
123
139
|
* @throws Error naming the file path when the manifest exists but is
|
|
124
140
|
* unreadable / not JSON / not an object / carries no usable `command`
|
|
125
|
-
* / carries a non-positive `timeoutMs` or `maxConcurrent
|
|
141
|
+
* / carries a non-positive `timeoutMs` or `maxConcurrent` / carries a
|
|
142
|
+
* `commitCheck` that is not a non-empty string.
|
|
126
143
|
*/
|
|
127
144
|
export function readVerifyManifestFrom(repoPath, fs) {
|
|
128
145
|
if (!repoPath)
|
|
@@ -159,12 +176,30 @@ export function readVerifyManifestFrom(repoPath, fs) {
|
|
|
159
176
|
}
|
|
160
177
|
const timeoutMs = optionalPositiveNumber(raw, 'timeoutMs', path);
|
|
161
178
|
const maxConcurrent = optionalPositiveNumber(raw, 'maxConcurrent', path);
|
|
179
|
+
const commitCheck = optionalCommand(raw, 'commitCheck', path);
|
|
162
180
|
return {
|
|
163
181
|
command,
|
|
164
182
|
...(timeoutMs !== undefined ? { timeoutMs } : {}),
|
|
165
183
|
...(maxConcurrent !== undefined ? { maxConcurrent } : {}),
|
|
184
|
+
...(commitCheck !== undefined ? { commitCheck } : {}),
|
|
166
185
|
};
|
|
167
186
|
}
|
|
168
187
|
/** Read the repo's verification manifest from the working tree on disk (see readVerifyManifestFrom). */
|
|
169
188
|
export const readVerifyManifest = (repoPath) => readVerifyManifestFrom(repoPath, workingTreeFs);
|
|
189
|
+
/**
|
|
190
|
+
* The commit check a worktree's own manifest declares, for the pre-commit hook
|
|
191
|
+
* (worktree/commit-check-hook.ts). Read from the worktree, so a branch carries
|
|
192
|
+
* its own declaration. A MALFORMED manifest yields no commit check here and a
|
|
193
|
+
* warning through `warn`: installing guards must not fail a spawn, and the
|
|
194
|
+
* daemon's gate, which reads the same file, reports the malformation loudly.
|
|
195
|
+
*/
|
|
196
|
+
export function readCommitCheck(worktreePath, warn) {
|
|
197
|
+
try {
|
|
198
|
+
return readVerifyManifest(worktreePath)?.commitCheck;
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
warn(`No commit check installed for ${worktreePath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
170
205
|
//# sourceMappingURL=verification-manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-manifest.js","sourceRoot":"","sources":["../../../src/verify/gate-config/verification-manifest.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gGAAgG;AAChG,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,mFAAmF;AACnF,oEAAoE;AACpE,sEAAsE;AACtE,yFAAyF;AACzF,2EAA2E;AAC3E,2EAA2E;AAC3E,uEAAuE;AACvE,oFAAoF;AACpF,0EAA0E;AAC1E,yEAAyE;AACzE,mFAAmF;AACnF,8EAA8E;AAC9E,uFAAuF;AACvF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"verification-manifest.js","sourceRoot":"","sources":["../../../src/verify/gate-config/verification-manifest.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gGAAgG;AAChG,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,mFAAmF;AACnF,oEAAoE;AACpE,4EAA4E;AAC5E,6EAA6E;AAC7E,sEAAsE;AACtE,yFAAyF;AACzF,2EAA2E;AAC3E,2EAA2E;AAC3E,uEAAuE;AACvE,oFAAoF;AACpF,0EAA0E;AAC1E,yEAAyE;AACzE,mFAAmF;AACnF,8EAA8E;AAC9E,uFAAuF;AACvF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAuC7D,gEAAgE;AAChE,MAAM,aAAa,GAAqB;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC;CAChD,CAAC;AAKF,0DAA0D;AAC1D,MAAM,UAAU,yBAAyB,CAAC,QAAgB;IACxD,OAAO,OAAO,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;AACrD,CAAC;AAED,mEAAmE;AACnE,SAAS,aAAa,CAAC,IAAY,EAAE,OA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ned by:
|
|
2
|
+
// Pinned by: 31 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/verify/gate-verdicts/commit-verdict-record.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/**
|
|
5
5
|
* The deterministic gate verdict for a focus commit, recorded durably.
|
|
@@ -34,7 +34,7 @@ export function buildFailureInjectMessage(deliveryName, detail) {
|
|
|
34
34
|
lines.push('', 'Failing tests could not be parsed from the run output -- read the full log.');
|
|
35
35
|
}
|
|
36
36
|
lines.push('', 'Fix the failing tests for the files you changed, then commit. The daemon re-verifies ' +
|
|
37
|
-
'
|
|
37
|
+
'the focus HEAD once the focus is ready for review again -- do NOT run the whole-repo suite yourself.');
|
|
38
38
|
return lines.join('\n');
|
|
39
39
|
}
|
|
40
40
|
/** Build the message injected into a live team for a shortfall hold. Pure -- exported for testing. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-rework-messages.js","sourceRoot":"","sources":["../../../src/verify/outcome-routing/verification-rework-messages.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sFAAsF;AACtF,gBAAgB;AAqBhB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACzG,OAAO,EAAE,8BAA8B,EAAE,MAAM,wDAAwD,CAAC;AAExG,uFAAuF;AACvF,SAAS,YAAY,CAAC,KAAe;IACnC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,yBAAyB,CAAC,YAAoB,EAAE,MAAiC;IAC/F,MAAM,KAAK,GAAa;QACtB,qCAAqC,YAAY,IAAI;QACrD,EAAE;QACF,GAAG,YAAY,CAAC,qBAAqB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC1D,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,sBAAsB;QAClF,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,0BAA0B;KAC5E,CAAC;IACF,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,MAAM,CAAC,YAAY,CAAC,MAAM,IAAI,CAAC,CAAC;QACjE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACvE,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,EAAE,sBAAsB,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;SAAM,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC;QACtD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,yFAAyF;YACvF,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,+BAA+B,QAAQ,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7E,4CAA4C,CAC/C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,6EAA6E,CAAC,CAAC;IAChG,CAAC;IACD,KAAK,CAAC,IAAI,CACR,EAAE,EACF,uFAAuF;QACvF,
|
|
1
|
+
{"version":3,"file":"verification-rework-messages.js","sourceRoot":"","sources":["../../../src/verify/outcome-routing/verification-rework-messages.ts"],"names":[],"mappings":"AAAA,8F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AC,CAAC,YAAY,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,MAAM,aAAa,GAAG,8BAA8B,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAC3E,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,aAAa,CAAC,CAAC;IAC/D,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -79,11 +79,14 @@ export interface DefaultOnResultFacts {
|
|
|
79
79
|
*/
|
|
80
80
|
export declare function noteDefaultOnResult(deliveryId: string, result: DefaultOnResultFacts): void;
|
|
81
81
|
/**
|
|
82
|
-
* True when the delivery's last default-on verify PASSED
|
|
83
|
-
* HEAD
|
|
84
|
-
*
|
|
82
|
+
* True when the delivery's last default-on verify PASSED on the commit the focus
|
|
83
|
+
* HEAD names, or `readHead` names none (skip it). A readable HEAD that differs
|
|
84
|
+
* re-arms it. The scan hands the real HEAD only for a focus awaiting its
|
|
85
|
+
* pre-review run, where a new HEAD is a commit the review request needs a verdict
|
|
86
|
+
* for (verify/run-selection/pre-review-gate-dispatch.ts); for a held route it
|
|
87
|
+
* hands none, so only the pull (which drops the pass) re-arms it.
|
|
85
88
|
*/
|
|
86
|
-
export declare function alreadyPassed(deliveryId: string): boolean;
|
|
89
|
+
export declare function alreadyPassed(deliveryId: string, readHead: () => string | null): boolean;
|
|
87
90
|
/**
|
|
88
91
|
* True when the delivery's last default-on verify failed on the focus's CURRENT
|
|
89
92
|
* HEAD (skip it). The failed sha is the in-memory copy, else the durable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-on-guards.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/default-on-guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default-on-guards.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/default-on-guards.ts"],"names":[],"mappings":"AA4CA,OAAO,EAAkB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AAa,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO,CAaxF;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO,CAqBzH;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO,CAc3F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAuBxG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 22 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/verify/run-selection/default-on-guards.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/**
|
|
5
5
|
* The default-on scan's steady-state re-run guards: what a delivery sitting in
|
|
@@ -8,15 +8,16 @@
|
|
|
8
8
|
* Three questions, asked in this order by collectDefaultOnVerifications
|
|
9
9
|
* (verify/run-selection/verification-default-on.ts), each with its own memory:
|
|
10
10
|
*
|
|
11
|
-
* 1. alreadyPassed -- has this
|
|
12
|
-
*
|
|
11
|
+
* 1. alreadyPassed -- has this delivery's verify passed on the commit HEAD
|
|
12
|
+
* names? The scan asks only for a focus awaiting its pre-review run or a
|
|
13
|
+
* held route (verify/run-selection/pre-review-gate-dispatch.ts), so no
|
|
14
|
+
* sibling's coding commit reaches it; a new HEAD there needs a verdict.
|
|
13
15
|
* 2. ranOnCurrentHead -- does this delivery's dispatch already stand for the
|
|
14
16
|
* focus's current HEAD (in flight, or judged the commit HEAD still names)?
|
|
15
17
|
* 3. failedOnCurrentHead -- did its last verify FAIL on the commit HEAD names?
|
|
16
18
|
*
|
|
17
|
-
* The order is load-bearing: (1)
|
|
18
|
-
*
|
|
19
|
-
* mark and log a re-arm that (1) then silently suppressed.
|
|
19
|
+
* The order is load-bearing: (1) is asked first so a pass on HEAD is reported as
|
|
20
|
+
* a pass, before (2) drops a run mark it would otherwise log as a re-arm.
|
|
20
21
|
*
|
|
21
22
|
* The guards are the rule; the scan is the loop that asks them. A leaf: it reads
|
|
22
23
|
* gate_state and logs, and imports nothing from the scan.
|
|
@@ -102,61 +103,31 @@ function forgetFailedSha(deliveryId, durableSha) {
|
|
|
102
103
|
* Pass memory: delivery id -> the commit its last default-on verify PASSED on
|
|
103
104
|
* (an actual 'passed' outcome at a known judged sha).
|
|
104
105
|
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* WHAT COUNTS AS "ITS OWN WORK" -- the rule is a genuine verify_failed -> coding
|
|
117
|
-
* -> verify re-entry, and nothing else. The alternative considered was a commit
|
|
118
|
-
* carrying this delivery's own Telora-Delivery trailer (verify/shortfalls/delivery-commit-set.ts
|
|
119
|
-
* already reads that set as stable patch ids, and verify/shortfalls/shortfall-park.ts already
|
|
120
|
-
* fingerprints it, so cost was not why it lost). It lost on SOUNDNESS: a trailer is
|
|
121
|
-
* an attribution claim about who a commit is FOR, not a statement about the code
|
|
122
|
-
* the gate judges. The gate runs a whole-repo command over the worktree, so a
|
|
123
|
-
* sibling's commit can break a passed delivery's verdict carrying no trailer of its
|
|
124
|
-
* own, and a commit trailered to a delivery can touch none of the code its verdict
|
|
125
|
-
* depended on. Trailer-keyed re-arm therefore buys imprecise EARLY feedback, not
|
|
126
|
-
* correctness -- and correctness is owned by the done route, which judges the exact
|
|
127
|
-
* tip it is waiting on whatever this rule says (see below). Adding it later is
|
|
128
|
-
* purely additive on top of this rule; nothing here forecloses it.
|
|
129
|
-
*
|
|
130
|
-
* THE BAR IS NOT LOWERED. completion/review-exit-holds/review-exit-verdict-gate.ts still refuses to
|
|
131
|
-
* converge a delivery with no PASSING verdict for the commit it is judged on, and
|
|
132
|
-
* verify/run-selection/commit-verdict-pull.ts makes the held route cause the run that judges that
|
|
133
|
-
* commit. So this removes SPECULATIVE runs only: the commit a route actually needs
|
|
134
|
-
* answered is still answered, on demand, at the tip that turns out to matter.
|
|
106
|
+
* It suppresses selection while the focus HEAD still names that commit (or HEAD
|
|
107
|
+
* is unreadable). A new readable HEAD re-arms it -- and that is safe from the
|
|
108
|
+
* waste a HEAD-keyed pass once caused (a SIBLING's coding commit re-arming a
|
|
109
|
+
* delivery whose own work stood still), because the scan no longer selects
|
|
110
|
+
* anything while a sibling codes: it runs the gate once per focus HEAD, when the
|
|
111
|
+
* focus awaits its pre-review run, or for a held route
|
|
112
|
+
* (verify/run-selection/pre-review-gate-dispatch.ts). There a new HEAD is exactly
|
|
113
|
+
* the commit the review request needs a verdict for; without the re-arm, a commit
|
|
114
|
+
* landing between a pass and the review request would leave that request waiting
|
|
115
|
+
* on a run nothing selects. Two deliveries at one HEAD still cost one run
|
|
116
|
+
* (verify/engine/verification-commit-sharing.ts).
|
|
135
117
|
*
|
|
136
118
|
* Dropped by a genuine re-entry (the prune sweep in collectDefaultOnVerifications,
|
|
137
|
-
* which sees the delivery leave verify),
|
|
138
|
-
*
|
|
139
|
-
* 'pending' is never a pass: a
|
|
140
|
-
* records nothing.
|
|
119
|
+
* which sees the delivery leave verify), when a later run FAILS at a judged sha, or
|
|
120
|
+
* by the demand pull for a held route. It survives a discarded
|
|
121
|
+
* (checkoutUnavailable) run -- not a verdict -- and a 'pending' is never a pass: a
|
|
122
|
+
* pass demoted because injection retirement threw records nothing.
|
|
141
123
|
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* gate_state writer under the per-row write discipline, and the pass is exactly the
|
|
150
|
-
* moment the history is RESET (verify/outcome-routing/verification-history-reset.ts), so the new
|
|
151
|
-
* key would have to be carved out of its own reset -- real perturbation of a
|
|
152
|
-
* load-bearing invariant. What it would buy is bounded and mostly not waste: after
|
|
153
|
-
* a restart this map is empty, so an in-verify delivery is selected once at the
|
|
154
|
-
* current HEAD, and the dispatch takes the recorded per-commit verdict where that
|
|
155
|
-
* commit was judged (verify/gate-verdicts/commit-verdict-record.ts, no run). Where it was NOT
|
|
156
|
-
* judged, the run that follows is the one the done route will ask for anyway as
|
|
157
|
-
* soon as review exits -- early, not wasted. So: at most one gate run per in-verify
|
|
158
|
-
* delivery per restart, usually needed. Making it durable is additive if that ever
|
|
159
|
-
* proves wrong.
|
|
124
|
+
* IN-MEMORY ONLY, deliberately: the durable counterpart (a passed sha in
|
|
125
|
+
* gate_state's verificationHistory) would have to be carved out of the reset the
|
|
126
|
+
* pass itself triggers (verify/outcome-routing/verification-history-reset.ts).
|
|
127
|
+
* After a restart this map is empty, so an in-verify delivery of a ready focus is
|
|
128
|
+
* selected once at the current HEAD, and the dispatch takes the recorded
|
|
129
|
+
* per-commit verdict where that commit was judged (no run).
|
|
130
|
+
* History: docs/daemon/history-verify.md (verify/run-selection/default-on-guards.ts).
|
|
160
131
|
*/
|
|
161
132
|
const passedAtSha = new Map();
|
|
162
133
|
/**
|
|
@@ -306,19 +277,23 @@ export function noteDefaultOnResult(deliveryId, result) {
|
|
|
306
277
|
}
|
|
307
278
|
}
|
|
308
279
|
/**
|
|
309
|
-
* True when the delivery's last default-on verify PASSED
|
|
310
|
-
* HEAD
|
|
311
|
-
*
|
|
280
|
+
* True when the delivery's last default-on verify PASSED on the commit the focus
|
|
281
|
+
* HEAD names, or `readHead` names none (skip it). A readable HEAD that differs
|
|
282
|
+
* re-arms it. The scan hands the real HEAD only for a focus awaiting its
|
|
283
|
+
* pre-review run, where a new HEAD is a commit the review request needs a verdict
|
|
284
|
+
* for (verify/run-selection/pre-review-gate-dispatch.ts); for a held route it
|
|
285
|
+
* hands none, so only the pull (which drops the pass) re-arms it.
|
|
312
286
|
*/
|
|
313
|
-
export function alreadyPassed(deliveryId) {
|
|
287
|
+
export function alreadyPassed(deliveryId, readHead) {
|
|
314
288
|
const passedSha = passedAtSha.get(deliveryId);
|
|
315
|
-
|
|
289
|
+
const head = passedSha === undefined ? null : readHead();
|
|
290
|
+
if (!evaluateStop('verify_rerun_already_passed', { passedSha: passedSha ?? null, head }) || passedSha === undefined)
|
|
316
291
|
return false;
|
|
317
292
|
const key = passSkipKey(deliveryId, passedSha);
|
|
318
293
|
if (!loggedShaSkips.has(key)) {
|
|
319
294
|
loggedShaSkips.add(key);
|
|
320
295
|
log.info(`[verification] default-on: not re-verifying delivery ${deliveryId} -- its verify already passed on `
|
|
321
|
-
+ `${passedSha.slice(0, 8)}
|
|
296
|
+
+ `${passedSha.slice(0, 8)} and no new focus HEAD awaits its pre-review run`);
|
|
322
297
|
}
|
|
323
298
|
return true;
|
|
324
299
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-on-guards.js","sourceRoot":"","sources":["../../../src/verify/run-selection/default-on-guards.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4HAA4H;AAC5H,gBAAgB;AAEhB
|
|
1
|
+
{"version":3,"file":"default-on-guards.js","sourceRoot":"","sources":["../../../src/verify/run-selection/default-on-guards.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4HAA4H;AAC5H,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACpH,OA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,IAAI,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QAClG,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC;YAAE,SAAS;QACzD,MAAM,OAAO,GAAG;YACd,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACpD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SACtD,CAAC;QACF,eAAe,CAAC,EAAE,CAAC,CAAC;QACpB,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACxB,wGAAwG;QACxG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACnC,cAAc,CACZ,gBAAgB,EAAE,EAAE,EACpB,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,6CAA6C;cACnE,GAAG,SAAS,IAAI,gBAAgB,kCAAkC,CACrE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** The slice of a focus row the readiness read takes. */
|
|
2
|
+
export interface PreReviewFocus {
|
|
3
|
+
review_requested_at: string | null;
|
|
4
|
+
}
|
|
5
|
+
/** The slice of a delivery row the readiness read takes. */
|
|
6
|
+
export interface PreReviewDelivery {
|
|
7
|
+
executionStatus: string | null;
|
|
8
|
+
gateState?: unknown;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* True when the focus awaits its pre-review gate run: no delivery active, at
|
|
12
|
+
* least one in verify, and no review window open.
|
|
13
|
+
*/
|
|
14
|
+
export declare function focusAwaitsPreReviewRun(focus: PreReviewFocus, deliveries: readonly PreReviewDelivery[]): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* True when the scan may select this verify delivery: its focus awaits the
|
|
17
|
+
* pre-review run, or a held route asks for a verdict on the commit the focus HEAD
|
|
18
|
+
* names. A hold naming no commit, or another one, asks for no run a dispatch could
|
|
19
|
+
* aim (a run judges HEAD), as the pull itself rules.
|
|
20
|
+
*/
|
|
21
|
+
export declare function mayDispatchGateRun(focusAwaitsRun: boolean, delivery: PreReviewDelivery, readHead: () => string | null): boolean;
|
|
22
|
+
//# sourceMappingURL=pre-review-gate-dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre-review-gate-dispatch.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/pre-review-gate-dispatch.ts"],"names":[],"mappings":"AAuCA,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,iBAAiB,EAAE,GAAG,OAAO,CAKhH;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO,CAI/H"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/verify/run-selection/pre-review-gate-dispatch.test.ts
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* When the default-on scan may select a focus's verify deliveries: the gate runs
|
|
6
|
+
* once per focus HEAD, before review is requested -- not per delivery as each
|
|
7
|
+
* one enters verify.
|
|
8
|
+
*
|
|
9
|
+
* A verify delivery is selectable only when one of two things asks for a verdict:
|
|
10
|
+
*
|
|
11
|
+
* - **The focus awaits its pre-review run.** Its delivery aggregate is
|
|
12
|
+
* `verifying` (no delivery active, at least one in verify, no review window
|
|
13
|
+
* open -- supervision/focus-delivery-aggregate-phase.ts). That is the moment
|
|
14
|
+
* the review request (completion/state-cascade/review-request-gate.ts) needs
|
|
15
|
+
* a passing verdict for HEAD; every verify delivery shares the one run at that
|
|
16
|
+
* HEAD (verify/engine/verification-commit-sharing.ts). A delivery entering
|
|
17
|
+
* verify while a sibling still codes selects nothing: its run is the focus's
|
|
18
|
+
* pre-review run at whatever HEAD the focus reaches.
|
|
19
|
+
* - **A held route pulls it.** A review exit that found no passing verdict for
|
|
20
|
+
* the commit it judged recorded a commit-verdict hold
|
|
21
|
+
* (delivery/commit-verdict-hold.ts); the pull
|
|
22
|
+
* (verify/run-selection/commit-verdict-pull.ts) aims a run at that commit
|
|
23
|
+
* while the focus HEAD names it. A
|
|
24
|
+
* review that committed pays exactly that one run; one that did not reads the
|
|
25
|
+
* pre-review verdict, which is keyed on the same commit.
|
|
26
|
+
*
|
|
27
|
+
* While a review window is open and no route holds, nothing is selected: the
|
|
28
|
+
* review judges the HEAD whose passing verdict opened the window.
|
|
29
|
+
*
|
|
30
|
+
* Rationale and the decision this reverses: docs/DECISIONS.md ("The full gate
|
|
31
|
+
* runs once per focus HEAD, before review").
|
|
32
|
+
*
|
|
33
|
+
* @module verify/run-selection/pre-review-gate-dispatch
|
|
34
|
+
*/
|
|
35
|
+
import { deriveFocusDeliveryAggregatePhase } from '../../supervision/focus-delivery-aggregate-phase.js';
|
|
36
|
+
import { readCommitVerdictHold } from '../../delivery/commit-verdict-hold.js';
|
|
37
|
+
/**
|
|
38
|
+
* True when the focus awaits its pre-review gate run: no delivery active, at
|
|
39
|
+
* least one in verify, and no review window open.
|
|
40
|
+
*/
|
|
41
|
+
export function focusAwaitsPreReviewRun(focus, deliveries) {
|
|
42
|
+
return deriveFocusDeliveryAggregatePhase({
|
|
43
|
+
deliveries: deliveries.map((d) => ({ executionStatus: d.executionStatus })),
|
|
44
|
+
reviewRequestedAt: focus.review_requested_at,
|
|
45
|
+
}) === 'verifying';
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* True when the scan may select this verify delivery: its focus awaits the
|
|
49
|
+
* pre-review run, or a held route asks for a verdict on the commit the focus HEAD
|
|
50
|
+
* names. A hold naming no commit, or another one, asks for no run a dispatch could
|
|
51
|
+
* aim (a run judges HEAD), as the pull itself rules.
|
|
52
|
+
*/
|
|
53
|
+
export function mayDispatchGateRun(focusAwaitsRun, delivery, readHead) {
|
|
54
|
+
if (focusAwaitsRun)
|
|
55
|
+
return true;
|
|
56
|
+
const hold = readCommitVerdictHold(delivery.gateState);
|
|
57
|
+
return hold !== null && hold.sha !== null && hold.sha === readHead();
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=pre-review-gate-dispatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre-review-gate-dispatch.js","sourceRoot":"","sources":["../../../src/verify/run-selection/pre-review-gate-dispatch.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,uFAAuF;AACvF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAa9E;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAqB,EAAE,UAAwC;IACrG,OAAO,iCAAiC,CAAC;QACvC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QAC3E,iBAAiB,EAAE,KAAK,CAAC,mBAAmB;KAC7C,CAAC,KAAK,WAAW,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,cAAuB,EAAE,QAA2B,EAAE,QAA6B;IACpH,IAAI,cAAc;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,IAAI,GAAG,qBAAqB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACvD,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -215,8 +215,10 @@ export declare function judgedCommitVerificationConfig(read: JudgedCommitManifes
|
|
|
215
215
|
* Discover deliveries that should receive a DEFAULT-ON deterministic run: in
|
|
216
216
|
* `verify` status, anchored to an injection, with no explicit verification
|
|
217
217
|
* method (so not already returned by getPendingVerifications), not in a
|
|
218
|
-
* read-only audit focus (those are discovery-only and never run a suite),
|
|
219
|
-
*
|
|
218
|
+
* read-only audit focus (those are discovery-only and never run a suite), in a
|
|
219
|
+
* focus awaiting its pre-review run or carrying a held route's request
|
|
220
|
+
* (pre-review-gate-dispatch.ts -- once per focus HEAD, before review, never
|
|
221
|
+
* merely because the delivery entered verify), and not already run, failed or
|
|
220
222
|
* passed on the focus's unchanged HEAD (HEAD-keyed guards).
|
|
221
223
|
*
|
|
222
224
|
* Synthesizes a `deterministic` PendingVerification carrying the resolved
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-default-on.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/verification-default-on.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification-default-on.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/verification-default-on.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAmB,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C;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAkCpG;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,mBAAmB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,EACvD,MAAM,EAAE,MAAM,GACb,CAAC,OAAO,EAAE,MAAM,KAAK,gBAAgB,GAAG,IAAI,CAgB9C;AAmCD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzI;AA8BD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,2BAA2B,EACrC,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,EACxC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAyFhC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// packages/daemon/src/integration/explicit-verdict-departure-during-removal.test.ts,
|
|
4
4
|
// packages/daemon/src/integration/explicit-verdict-invalidation-restart.test.ts,
|
|
5
5
|
// packages/daemon/src/integration/focus-commit-verdict-scenario.test.ts,
|
|
6
|
+
// packages/daemon/src/integration/manifest-commit-check-composed.test.ts,
|
|
6
7
|
// packages/daemon/src/verify/deterministic-gate/verify-unprovisioned-worktree.test.ts,
|
|
7
8
|
// packages/daemon/src/verify/engine/verification-commit-sharing.test.ts,
|
|
8
9
|
// packages/daemon/src/verify/gate-config/judged-commit-gate.test.ts,
|
|
@@ -34,6 +35,7 @@ import { configForProduct } from '../../config/config.js';
|
|
|
34
35
|
import { getFocusWorktree } from '../../worktree/focus-worktree-state.js';
|
|
35
36
|
import { resolveHeadSha } from '../attribution/verification-baseline.js';
|
|
36
37
|
import { alreadyPassed, failedOnCurrentHead, pruneGuardsOutsideVerify, ranOnCurrentHead, } from './default-on-guards.js';
|
|
38
|
+
import { focusAwaitsPreReviewRun, mayDispatchGateRun } from './pre-review-gate-dispatch.js';
|
|
37
39
|
import { createLogger } from '../../log/daemon-log.js';
|
|
38
40
|
const log = createLogger({ module: 'verification' });
|
|
39
41
|
/** Default HEAD reader: the registered focus worktree's HEAD, or null when unreadable. */
|
|
@@ -338,12 +340,16 @@ function pruneProductGuards(productId, observedInVerify, complete) {
|
|
|
338
340
|
log.info(`[verification] default-on: not pruning the re-run guards of product ${productId} this tick -- `
|
|
339
341
|
+ 'a focus\'s deliveries could not be read, so "no longer in verify" is not established');
|
|
340
342
|
}
|
|
343
|
+
/** No HEAD may re-arm a recorded pass: outside the pre-review run, only a held route's pull does. */
|
|
344
|
+
const NO_REARMING_HEAD = () => null;
|
|
341
345
|
/**
|
|
342
346
|
* Discover deliveries that should receive a DEFAULT-ON deterministic run: in
|
|
343
347
|
* `verify` status, anchored to an injection, with no explicit verification
|
|
344
348
|
* method (so not already returned by getPendingVerifications), not in a
|
|
345
|
-
* read-only audit focus (those are discovery-only and never run a suite),
|
|
346
|
-
*
|
|
349
|
+
* read-only audit focus (those are discovery-only and never run a suite), in a
|
|
350
|
+
* focus awaiting its pre-review run or carrying a held route's request
|
|
351
|
+
* (pre-review-gate-dispatch.ts -- once per focus HEAD, before review, never
|
|
352
|
+
* merely because the delivery entered verify), and not already run, failed or
|
|
347
353
|
* passed on the focus's unchanged HEAD (HEAD-keyed guards).
|
|
348
354
|
*
|
|
349
355
|
* Synthesizes a `deterministic` PendingVerification carrying the resolved
|
|
@@ -390,6 +396,9 @@ export async function collectDefaultOnVerifications(config, resolved, explicitDe
|
|
|
390
396
|
continue;
|
|
391
397
|
}
|
|
392
398
|
const readHead = memoizedHead(focus.focus_id, deps);
|
|
399
|
+
// Once per focus HEAD, before review: nothing is selected while a sibling codes or a review window is open,
|
|
400
|
+
// unless a held route asks for its commit's verdict (verify/run-selection/pre-review-gate-dispatch.ts).
|
|
401
|
+
const awaitsPreReviewRun = focusAwaitsPreReviewRun(focus, deliveries);
|
|
393
402
|
for (const d of deliveries) {
|
|
394
403
|
if (d.executionStatus !== DELIVERY_STATUS.VERIFY)
|
|
395
404
|
continue;
|
|
@@ -404,12 +413,12 @@ export async function collectDefaultOnVerifications(config, resolved, explicitDe
|
|
|
404
413
|
if (explicitDeliveryIds.has(d.id) || (typeof d.verificationMethod === 'string' && d.verificationMethod !== ''))
|
|
405
414
|
continue;
|
|
406
415
|
observedInVerify.add(d.id);
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
//
|
|
410
|
-
//
|
|
411
|
-
if (alreadyPassed(d.id))
|
|
412
|
-
continue;
|
|
416
|
+
if (!mayDispatchGateRun(awaitsPreReviewRun, d, readHead))
|
|
417
|
+
continue; // its run is the focus's pre-review run, not its verify entry
|
|
418
|
+
// The pass is read FIRST, so a pass on HEAD reads as a pass before ranOnCurrentHead drops a run mark. Only the
|
|
419
|
+
// pre-review run is re-armed by a new HEAD; for a held route the pull alone re-arms a pass (it drops it).
|
|
420
|
+
if (alreadyPassed(d.id, awaitsPreReviewRun ? readHead : NO_REARMING_HEAD))
|
|
421
|
+
continue;
|
|
413
422
|
if (ranOnCurrentHead(d.id, readHead))
|
|
414
423
|
continue; // already judged on this commit this verify-entry
|
|
415
424
|
if (failedOnCurrentHead(d, readHead))
|