@telora/daemon 0.22.169 → 0.22.181
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/commit-verdict-release.d.ts +37 -1
- package/dist/completion/commit-verdict-release.d.ts.map +1 -1
- package/dist/completion/commit-verdict-release.js +90 -15
- package/dist/completion/commit-verdict-release.js.map +1 -1
- package/dist/completion/review-exit-verdict-gate.d.ts +11 -5
- package/dist/completion/review-exit-verdict-gate.d.ts.map +1 -1
- package/dist/completion/review-exit-verdict-gate.js +6 -3
- package/dist/completion/review-exit-verdict-gate.js.map +1 -1
- package/dist/delivery/commit-verdict-hold.d.ts.map +1 -1
- package/dist/delivery/commit-verdict-hold.js +2 -1
- package/dist/delivery/commit-verdict-hold.js.map +1 -1
- package/dist/directive/stranded-review-reroute.js +1 -1
- package/dist/directive/stranded-review-reroute.js.map +1 -1
- package/dist/focus/pending-review-approved-head.d.ts +1 -1
- package/dist/focus/pending-review-approved-head.d.ts.map +1 -1
- package/dist/focus/pending-review-approved-head.js +4 -3
- package/dist/focus/pending-review-approved-head.js.map +1 -1
- package/dist/queries/delivery-gate-state.js +1 -1
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +2 -1
- package/dist/queries/focuses.js.map +1 -1
- package/dist/resolvers/shared/review-window-commits.d.ts.map +1 -1
- package/dist/resolvers/shared/review-window-commits.js +2 -1
- package/dist/resolvers/shared/review-window-commits.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/verify/commit-gate-configured.d.ts.map +1 -1
- package/dist/verify/commit-gate-configured.js +1 -1
- package/dist/verify/commit-gate-configured.js.map +1 -1
- package/dist/verify/commit-verdict-pull.d.ts +48 -0
- package/dist/verify/commit-verdict-pull.d.ts.map +1 -0
- package/dist/verify/commit-verdict-pull.js +148 -0
- package/dist/verify/commit-verdict-pull.js.map +1 -0
- package/dist/verify/commit-verdict-record.js +1 -1
- package/dist/verify/credit-rearm.js +1 -1
- package/dist/verify/credit-rearm.js.map +1 -1
- package/dist/verify/default-on-guards.d.ts +74 -0
- package/dist/verify/default-on-guards.d.ts.map +1 -0
- package/dist/verify/default-on-guards.js +305 -0
- package/dist/verify/default-on-guards.js.map +1 -0
- package/dist/verify/explicit-rearm.d.ts.map +1 -1
- package/dist/verify/explicit-rearm.js +1 -0
- package/dist/verify/explicit-rearm.js.map +1 -1
- package/dist/verify/gate-run-registry.d.ts.map +1 -1
- package/dist/verify/gate-run-registry.js +1 -0
- package/dist/verify/gate-run-registry.js.map +1 -1
- package/dist/verify/judged-ancestor.d.ts +41 -0
- package/dist/verify/judged-ancestor.d.ts.map +1 -0
- package/dist/verify/judged-ancestor.js +101 -0
- package/dist/verify/judged-ancestor.js.map +1 -0
- package/dist/verify/no-own-delta-verdict.d.ts +7 -2
- package/dist/verify/no-own-delta-verdict.d.ts.map +1 -1
- package/dist/verify/no-own-delta-verdict.js +14 -17
- package/dist/verify/no-own-delta-verdict.js.map +1 -1
- package/dist/verify/rework-attribution.d.ts +71 -0
- package/dist/verify/rework-attribution.d.ts.map +1 -0
- package/dist/verify/rework-attribution.js +263 -0
- package/dist/verify/rework-attribution.js.map +1 -0
- package/dist/verify/shortfall-rulings.d.ts.map +1 -1
- package/dist/verify/shortfall-rulings.js +3 -2
- package/dist/verify/shortfall-rulings.js.map +1 -1
- package/dist/verify/verification-boundary-env.d.ts +63 -15
- package/dist/verify/verification-boundary-env.d.ts.map +1 -1
- package/dist/verify/verification-boundary-env.js +81 -12
- package/dist/verify/verification-boundary-env.js.map +1 -1
- package/dist/verify/verification-commit-sharing.d.ts.map +1 -1
- package/dist/verify/verification-commit-sharing.js +2 -1
- package/dist/verify/verification-commit-sharing.js.map +1 -1
- package/dist/verify/verification-config.d.ts.map +1 -1
- package/dist/verify/verification-config.js +1 -0
- package/dist/verify/verification-config.js.map +1 -1
- package/dist/verify/verification-default-on.d.ts +0 -32
- package/dist/verify/verification-default-on.d.ts.map +1 -1
- package/dist/verify/verification-default-on.js +10 -234
- package/dist/verify/verification-default-on.js.map +1 -1
- package/dist/verify/verification-deps-default.d.ts.map +1 -1
- package/dist/verify/verification-deps-default.js +9 -0
- package/dist/verify/verification-deps-default.js.map +1 -1
- package/dist/verify/verification-engine.d.ts +2 -1
- package/dist/verify/verification-engine.d.ts.map +1 -1
- package/dist/verify/verification-engine.js +12 -4
- package/dist/verify/verification-engine.js.map +1 -1
- package/dist/verify/verification-feedback.d.ts +1 -1
- package/dist/verify/verification-feedback.d.ts.map +1 -1
- package/dist/verify/verification-feedback.js +5 -0
- package/dist/verify/verification-feedback.js.map +1 -1
- package/dist/verify/verification-rework-issue.d.ts +48 -7
- package/dist/verify/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/verification-rework-issue.js +111 -9
- package/dist/verify/verification-rework-issue.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-own-delta-verdict.js","sourceRoot":"","sources":["../../src/verify/no-own-delta-verdict.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8FAA8F;AAC9F,mEAAmE;AACnE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"no-own-delta-verdict.js","sourceRoot":"","sources":["../../src/verify/no-own-delta-verdict.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8FAA8F;AAC9F,mEAAmE;AACnE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAuB,MAAM,sBAAsB,CAAC;AAGtG;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,qBAAqB,CAAC;AAqBlE;;;GAGG;AAC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E,IAAI;YACT,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,KAAK,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU;SACpF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ReviewWindowCommit } from '../resolvers/shared/review-window-commits.js';
|
|
2
|
+
import { findGreenAncestor } from './judged-ancestor.js';
|
|
3
|
+
import { type CommitVerdict, type CommitVerdictGate } from './commit-verdict-record.js';
|
|
4
|
+
/** Injectable seams; each defaults to the real read. */
|
|
5
|
+
export interface ReworkAttributionDeps {
|
|
6
|
+
/** The focus worktree the failed commit was judged in; null when the daemon holds none. */
|
|
7
|
+
resolveWorktreePath: (focusId: string) => string | null;
|
|
8
|
+
/** The verdict recorded for a commit; without a gate, the newest under any gate (which carries its own). */
|
|
9
|
+
readCommitVerdict: (productId: string, focusId: string, sha: string, gate?: CommitVerdictGate) => CommitVerdict | null;
|
|
10
|
+
/** The newest ancestor of `tip` this gate judged PASSING (verify/judged-ancestor.ts). */
|
|
11
|
+
findGreenAncestor: typeof findGreenAncestor;
|
|
12
|
+
/** The non-merge commits in base..tip with their trailer attribution; null when git could not answer. */
|
|
13
|
+
listWindow: (worktreePath: string, base: string, tip: string) => readonly ReviewWindowCommit[] | null;
|
|
14
|
+
/**
|
|
15
|
+
* The focus's deliveries sitting in verify -- the candidate set an unattributable
|
|
16
|
+
* failure is settled over, so a pass that was handed one delivery can still ask the
|
|
17
|
+
* focus-wide question (module doc).
|
|
18
|
+
*/
|
|
19
|
+
listVerifyCandidates: (focusId: string) => Promise<readonly string[]>;
|
|
20
|
+
}
|
|
21
|
+
export declare const defaultReworkAttributionDeps: () => ReworkAttributionDeps;
|
|
22
|
+
/** The focus commit whose failure is being attributed. */
|
|
23
|
+
export interface FailedCommit {
|
|
24
|
+
productId: string;
|
|
25
|
+
focusId: string;
|
|
26
|
+
/** The commit the gate failed on. */
|
|
27
|
+
sha: string;
|
|
28
|
+
}
|
|
29
|
+
/** Who owns a failed verdict, and how that was decided. */
|
|
30
|
+
export interface FailureOwnership {
|
|
31
|
+
/** The deliveries whose own commits are in the judged range; empty when none is attributable. */
|
|
32
|
+
causingDeliveryIds: ReadonlySet<string>;
|
|
33
|
+
/** Those deliveries in range order, NEWEST COMMIT FIRST -- the ranking the owner is taken from. */
|
|
34
|
+
causingNewestFirst: readonly string[];
|
|
35
|
+
/** The delivery whose dispatch ran the gate -- the owner when nothing is attributable. */
|
|
36
|
+
judgedDeliveryId: string;
|
|
37
|
+
/** The ONE delivery this failure's rework belongs on: the newest causing commit's, else the judged one. */
|
|
38
|
+
owningDeliveryId: string;
|
|
39
|
+
/** False when the range could not be read at all (git or the green ancestor); the fallback then decides alone. */
|
|
40
|
+
rangeRead: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Who a failed verdict belongs to (module doc), or null when its verdict cannot be
|
|
44
|
+
* read -- the one answer that means "cannot tell". Never throws.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveFailureOwnership(at: FailedCommit, deps?: ReworkAttributionDeps): FailureOwnership | null;
|
|
47
|
+
/**
|
|
48
|
+
* The ONE delivery a failed verdict's rework belongs on, chosen from the
|
|
49
|
+
* `candidates` a filing pass would otherwise fan out over (module doc). Null means
|
|
50
|
+
* "cannot tell" -- the verdict itself was unreadable or is not a failure -- and the
|
|
51
|
+
* caller files as it did before. Never throws.
|
|
52
|
+
*/
|
|
53
|
+
export declare function selectReworkOwner(candidates: readonly string[], at: FailedCommit, deps?: ReworkAttributionDeps): string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Rung 3: the owner of a failure NOTHING attributes, over the candidates that could
|
|
56
|
+
* carry it. The lowest id -- arbitrary on purpose, and a pure function of the set, so
|
|
57
|
+
* a sibling, a later poll, a restarted daemon and the per-focus filer all name the
|
|
58
|
+
* same one delivery. Null only when there is no candidate at all.
|
|
59
|
+
*/
|
|
60
|
+
export declare function unattributableOwner(candidates: readonly string[]): string | null;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the rework Bug for `failedSha` belongs on `deliveryId` (module doc): it is
|
|
63
|
+
* the ONE owner the range names -- the delivery of the newest commit in it, or, with
|
|
64
|
+
* nothing attributable there, the delivery whose dispatch ran the gate. An unreadable
|
|
65
|
+
* verdict names no owner from the commit, so the question is asked of the FOCUS
|
|
66
|
+
* instead: the candidate set settles it by rung 3, identically for every asker and
|
|
67
|
+
* across a restart. A candidate read that fails files nothing this poll (the retry
|
|
68
|
+
* owns that case). Never throws.
|
|
69
|
+
*/
|
|
70
|
+
export declare function deliveryOwnsFailure(deliveryId: string, at: FailedCommit, deps?: ReworkAttributionDeps): Promise<boolean>;
|
|
71
|
+
//# sourceMappingURL=rework-attribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rework-attribution.d.ts","sourceRoot":"","sources":["../../src/verify/rework-attribution.ts"],"names":[],"mappings":"AAsGA,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAChH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK3G,wDAAwD;AACxD,MAAM,WAAW,qBAAqB;IACpC,2FAA2F;IAC3F,mBAAmB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACxD,4GAA4G;IAC5G,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,iBAAiB,KAAK,aAAa,GAAG,IAAI,CAAC;IACvH,yFAAyF;IACzF,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,yGAAy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AAY,EAChB,IAAI,GAAE,qBAAsD,GAC3D,OAAO,CAAC,OAAO,CAAC,CAiBlB"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/integration/failed-verdict-review-exit-respawn-regression.test.ts,
|
|
3
|
+
// packages/daemon/src/verify/rework-attribution.test.ts,
|
|
4
|
+
// packages/daemon/src/verify/verification-rework-issue.test.ts
|
|
5
|
+
// PINNED-BY-END
|
|
6
|
+
/**
|
|
7
|
+
* Whose commits caused a failed gate verdict -- the delivery a rework Bug belongs on.
|
|
8
|
+
*
|
|
9
|
+
* Every delivery on a focus is judged on the same focus-branch HEAD, and one gate
|
|
10
|
+
* run's verdict is SHARED by all of them (verify/verification-commit-sharing.ts).
|
|
11
|
+
* Sharing the verdict is sound: the gate ran on one tree and would render the same
|
|
12
|
+
* answer for each. Fanning out the REWORK is not. A failed verdict used to become
|
|
13
|
+
* one rework Bug PER delivery sitting in verify -- measured on mars 2026-09-21
|
|
14
|
+
* 19:04-19:07, commit 03a511e12d00's single failed run filed three Bugs all titled
|
|
15
|
+
* `fix stage "lint:all > lint --prefix packages/daemon"`, two of them on deliveries
|
|
16
|
+
* the log itself recorded as taking the verdict with "no gate run". Each of those
|
|
17
|
+
* names a gate run its delivery never made, costs that delivery a verify_failed
|
|
18
|
+
* re-entry, and spends a review cycle out of the focus's arm budget
|
|
19
|
+
* (completion/review-cycle-cap.ts) on a delivery that carries no defect of its own.
|
|
20
|
+
*
|
|
21
|
+
* ONE branch-level red is ONE piece of open work. This module names its owner.
|
|
22
|
+
*
|
|
23
|
+
* THE RANGE. The suspects are the commits the failure could have come from: those
|
|
24
|
+
* between the newest ancestor this gate judged GREEN (verify/judged-ancestor.ts --
|
|
25
|
+
* the same bound the gate's own stages diff against) and the failed commit.
|
|
26
|
+
* Everything at or before the green ancestor was covered by a run that PASSED on a
|
|
27
|
+
* tree containing it. The gate that judged the failure is read off the failure's own
|
|
28
|
+
* recorded verdict, so no caller has to resolve it.
|
|
29
|
+
*
|
|
30
|
+
* THE OWNER. Each commit in that range is attributed by its `Telora-Delivery`
|
|
31
|
+
* trailer, through git's own trailer parse (resolvers/shared/review-window-commits.ts),
|
|
32
|
+
* the same read the verify gate partitions evidence with. A sentinel, an
|
|
33
|
+
* unattributed capture and a commit naming a delivery outside the focus own nothing.
|
|
34
|
+
*
|
|
35
|
+
* SEVERAL DELIVERIES MAY HAVE COMMITTED IN THAT RANGE, and one red is still one
|
|
36
|
+
* work item, so the range names ONE owner: the delivery of the NEWEST commit in it.
|
|
37
|
+
*
|
|
38
|
+
* SAY WHAT THAT IS AND IS NOT. It is the newest SUSPECT, not a proof of cause. The
|
|
39
|
+
* gate was GREEN at the base and the red is rendered at the tip, so every commit
|
|
40
|
+
* between them is a candidate and the newest is the last change that could have
|
|
41
|
+
* introduced it -- but nothing here reads the failing stage's output, so an older
|
|
42
|
+
* commit in the range may well be the culprit. What the rule buys is that the choice
|
|
43
|
+
* is DETERMINISTIC (git's own topological order, one read) and SINGLE. Two
|
|
44
|
+
* alternatives lost: the failing stage's own files would be a stronger ground, but a
|
|
45
|
+
* verdict records a stage NAME (`lint:all > lint --prefix packages/daemon`) and test
|
|
46
|
+
* ids, which do not resolve to files in general; and "every delivery in the range" is
|
|
47
|
+
* what this module exists to stop -- it re-creates the N-Bugs fan-out one bound later.
|
|
48
|
+
* Being wrong here costs one delivery a re-entry it did not earn, while the branch is
|
|
49
|
+
* red for all of them either way; being wrong by filing on all of them costs every
|
|
50
|
+
* delivery one, plus a review cycle each out of the arm's budget.
|
|
51
|
+
*
|
|
52
|
+
* EVERY PATH ENDS AT EXACTLY ONE OWNER, including the ones that know least. The
|
|
53
|
+
* acceptance rule is unconditional -- one failed verdict, one piece of open work --
|
|
54
|
+
* so "we could not attribute this" is not licence to fan out again. The ladder, in
|
|
55
|
+
* {@link selectReworkOwner} for a pass that knows its candidate set:
|
|
56
|
+
*
|
|
57
|
+
* 1. the newest commit in the range whose delivery is a candidate;
|
|
58
|
+
* 2. the delivery whose dispatch RAN the gate (CommitVerdict.judgedDeliveryId) --
|
|
59
|
+
* one delivery, and the one that actually paid for the run;
|
|
60
|
+
* 3. {@link unattributableOwner} of the candidates -- the lowest id, logged.
|
|
61
|
+
*
|
|
62
|
+
* Rung 3 is what makes the rule unconditional: an unreadable verdict, an unreadable
|
|
63
|
+
* range, a focus whose worktree the daemon no longer holds -- each still names one
|
|
64
|
+
* routable delivery, because a red must reach someone and every candidate is a
|
|
65
|
+
* delivery sitting in verify on the red branch. It is a PURE FUNCTION OF THE
|
|
66
|
+
* CANDIDATE SET, deliberately: an arbitrary owner is fine, an owner that depends on
|
|
67
|
+
* who asked first is not.
|
|
68
|
+
*
|
|
69
|
+
* A PASS THAT ASKS ONE DELIVERY AT A TIME (verify/verification-feedback.ts routes each
|
|
70
|
+
* dispatch separately) therefore asks the SAME question rather than a weaker one: it
|
|
71
|
+
* reads the focus's verify deliveries and applies rung 3 to that set, so every asker
|
|
72
|
+
* -- this delivery, its siblings, the next poll, the first poll after a daemon
|
|
73
|
+
* restart, and the per-focus filer acting on the same commit -- computes the same
|
|
74
|
+
* single owner. It used to keep a first-claim ledger in memory instead, which agreed
|
|
75
|
+
* with nothing after a restart and with the per-focus filer never. When the candidate
|
|
76
|
+
* read itself fails, NOBODY files this poll: the filing is left owed and retried from
|
|
77
|
+
* the commit's record (verify/verification-rework-issue.ts retryOwedReworkIssue)
|
|
78
|
+
* rather than guessed at, because a guess here is how one red becomes N Bugs.
|
|
79
|
+
*
|
|
80
|
+
* Direction of error: this module decides who is TOLD about a red, never whether the
|
|
81
|
+
* red gates. A delivery that shares a failed verdict still takes that verdict, still
|
|
82
|
+
* routes verify -> verify_failed, and still carries the failure on its gate_state.
|
|
83
|
+
* What it no longer carries is a work item describing a run it never made.
|
|
84
|
+
*
|
|
85
|
+
* WHAT THIS MODULE DOES NOT PROMISE. Its answer is a function of LIVE state -- the
|
|
86
|
+
* focus's deliveries currently in verify -- and that set moves as deliveries are
|
|
87
|
+
* routed, so the same failed commit can name a different owner at a later poll. That
|
|
88
|
+
* is deliberate: a red whose first-named owner has already moved on must still reach
|
|
89
|
+
* someone. It does mean "one red, one Bug" cannot rest on this module alone, and it
|
|
90
|
+
* does not: the filing dedupes per COMMIT across the whole focus
|
|
91
|
+
* (verify/verification-rework-issue.ts), so a re-selection RE-ROUTES a red rather
|
|
92
|
+
* than duplicating one.
|
|
93
|
+
*
|
|
94
|
+
* A leaf: git, the verdict record and the focus worktree map, nothing else.
|
|
95
|
+
*
|
|
96
|
+
* @module verify/rework-attribution
|
|
97
|
+
*/
|
|
98
|
+
import { DELIVERY_STATUS } from '@telora/daemon-core';
|
|
99
|
+
import { getFocusWorktree } from '../focus/focus-worktree-state.js';
|
|
100
|
+
import { getFocusDeliveries } from '../queries/focuses.js';
|
|
101
|
+
import { listReviewWindowCommits } from '../resolvers/shared/review-window-commits.js';
|
|
102
|
+
import { findGreenAncestor } from './judged-ancestor.js';
|
|
103
|
+
import { readCommitVerdict } from './commit-verdict-record.js';
|
|
104
|
+
import { createLogger } from '../shell/log.js';
|
|
105
|
+
const log = createLogger({ module: 'verification' });
|
|
106
|
+
export const defaultReworkAttributionDeps = () => ({
|
|
107
|
+
resolveWorktreePath: (focusId) => getFocusWorktree(focusId)?.worktreePath ?? null,
|
|
108
|
+
readCommitVerdict: (productId, focusId, sha, gate) => readCommitVerdict(productId, focusId, sha, gate ? { gate } : {}),
|
|
109
|
+
findGreenAncestor,
|
|
110
|
+
listWindow: (worktreePath, base, tip) => listReviewWindowCommits(worktreePath, base, tip),
|
|
111
|
+
listVerifyCandidates: async (focusId) => (await getFocusDeliveries(focusId))
|
|
112
|
+
.filter((d) => d.executionStatus === DELIVERY_STATUS.VERIFY)
|
|
113
|
+
.map((d) => d.id),
|
|
114
|
+
});
|
|
115
|
+
/**
|
|
116
|
+
* Who a failed verdict belongs to (module doc), or null when its verdict cannot be
|
|
117
|
+
* read -- the one answer that means "cannot tell". Never throws.
|
|
118
|
+
*/
|
|
119
|
+
export function resolveFailureOwnership(at, deps = defaultReworkAttributionDeps()) {
|
|
120
|
+
let verdict;
|
|
121
|
+
try {
|
|
122
|
+
verdict = deps.readCommitVerdict(at.productId, at.focusId, at.sha);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
if (!verdict || verdict.outcome !== 'failed')
|
|
128
|
+
return null;
|
|
129
|
+
const causing = readCausingSet(at, verdict.gate, deps);
|
|
130
|
+
const newestFirst = causing ?? [];
|
|
131
|
+
return {
|
|
132
|
+
causingDeliveryIds: new Set(newestFirst),
|
|
133
|
+
causingNewestFirst: newestFirst,
|
|
134
|
+
judgedDeliveryId: verdict.judgedDeliveryId,
|
|
135
|
+
// ONE red, ONE work item: the newest commit in the range names the owner.
|
|
136
|
+
owningDeliveryId: newestFirst[0] ?? verdict.judgedDeliveryId,
|
|
137
|
+
rangeRead: causing !== null,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The ONE delivery a failed verdict's rework belongs on, chosen from the
|
|
142
|
+
* `candidates` a filing pass would otherwise fan out over (module doc). Null means
|
|
143
|
+
* "cannot tell" -- the verdict itself was unreadable or is not a failure -- and the
|
|
144
|
+
* caller files as it did before. Never throws.
|
|
145
|
+
*/
|
|
146
|
+
export function selectReworkOwner(candidates, at, deps = defaultReworkAttributionDeps()) {
|
|
147
|
+
const fallback = unattributableOwner(candidates);
|
|
148
|
+
// Nobody to tell: this pass has no verify delivery to carry the red.
|
|
149
|
+
if (fallback === null)
|
|
150
|
+
return null;
|
|
151
|
+
const eligible = new Set(candidates);
|
|
152
|
+
const ownership = resolveFailureOwnership(at, deps);
|
|
153
|
+
if (ownership !== null) {
|
|
154
|
+
// Rung 1 -- the newest suspect this pass can actually tell.
|
|
155
|
+
const attributed = ownership.causingNewestFirst.find((id) => eligible.has(id));
|
|
156
|
+
if (attributed !== undefined)
|
|
157
|
+
return attributed;
|
|
158
|
+
// Rung 2 -- the delivery that paid for the run.
|
|
159
|
+
if (eligible.has(ownership.judgedDeliveryId))
|
|
160
|
+
return ownership.judgedDeliveryId;
|
|
161
|
+
}
|
|
162
|
+
// Rung 3 -- unattributable, and still ONE owner: the rule does not relax here.
|
|
163
|
+
log.info(`[verification] rework issue: the failed verdict for ${at.sha.slice(0, 12)} could not be attributed`
|
|
164
|
+
+ `${ownership === null ? ' (its verdict was unreadable)' : ` to a delivery this pass can tell (owner: ${ownership.owningDeliveryId})`}`
|
|
165
|
+
+ ` -- it is carried by ${fallback} alone, not by every delivery on the red branch`);
|
|
166
|
+
return fallback;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Rung 3: the owner of a failure NOTHING attributes, over the candidates that could
|
|
170
|
+
* carry it. The lowest id -- arbitrary on purpose, and a pure function of the set, so
|
|
171
|
+
* a sibling, a later poll, a restarted daemon and the per-focus filer all name the
|
|
172
|
+
* same one delivery. Null only when there is no candidate at all.
|
|
173
|
+
*/
|
|
174
|
+
export function unattributableOwner(candidates) {
|
|
175
|
+
let lowest = null;
|
|
176
|
+
for (const id of candidates)
|
|
177
|
+
if (lowest === null || id < lowest)
|
|
178
|
+
lowest = id;
|
|
179
|
+
return lowest;
|
|
180
|
+
}
|
|
181
|
+
/** The deliveries with a trailered commit in greenAncestor..failedSha, NEWEST FIRST; null when the range is unreadable. */
|
|
182
|
+
function readCausingSet(at, gate, deps) {
|
|
183
|
+
try {
|
|
184
|
+
const worktreePath = deps.resolveWorktreePath(at.focusId);
|
|
185
|
+
if (worktreePath === null)
|
|
186
|
+
return null;
|
|
187
|
+
const base = deps.findGreenAncestor(at.productId, at.focusId, at.sha, gate, {
|
|
188
|
+
worktreePath,
|
|
189
|
+
readCommitVerdict: (productId, focusId, sha, g) => deps.readCommitVerdict(productId, focusId, sha, g),
|
|
190
|
+
});
|
|
191
|
+
// No green ancestor in reach: nothing bounds the suspects, so the range says nothing.
|
|
192
|
+
if (base === null)
|
|
193
|
+
return null;
|
|
194
|
+
const commits = deps.listWindow(worktreePath, base, at.sha);
|
|
195
|
+
if (commits === null)
|
|
196
|
+
return null;
|
|
197
|
+
// listReviewWindowCommits answers newest first; the order IS the ranking.
|
|
198
|
+
const causing = [];
|
|
199
|
+
for (const c of commits) {
|
|
200
|
+
if (c.attribution.kind === 'delivery' && !causing.includes(c.attribution.deliveryId)) {
|
|
201
|
+
causing.push(c.attribution.deliveryId);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return causing;
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Whether the rework Bug for `failedSha` belongs on `deliveryId` (module doc): it is
|
|
212
|
+
* the ONE owner the range names -- the delivery of the newest commit in it, or, with
|
|
213
|
+
* nothing attributable there, the delivery whose dispatch ran the gate. An unreadable
|
|
214
|
+
* verdict names no owner from the commit, so the question is asked of the FOCUS
|
|
215
|
+
* instead: the candidate set settles it by rung 3, identically for every asker and
|
|
216
|
+
* across a restart. A candidate read that fails files nothing this poll (the retry
|
|
217
|
+
* owns that case). Never throws.
|
|
218
|
+
*/
|
|
219
|
+
export async function deliveryOwnsFailure(deliveryId, at, deps = defaultReworkAttributionDeps()) {
|
|
220
|
+
const ownership = resolveFailureOwnership(at, deps);
|
|
221
|
+
if (ownership === null)
|
|
222
|
+
return await ownsUnattributable(deliveryId, at, deps);
|
|
223
|
+
const owns = deliveryId === ownership.owningDeliveryId;
|
|
224
|
+
if (!owns) {
|
|
225
|
+
const why = ownership.causingNewestFirst.length > 0
|
|
226
|
+
? `the newest commit in the judged range is ${ownership.owningDeliveryId}'s`
|
|
227
|
+
: `${ownership.rangeRead ? 'no delivery\'s commits explain it' : 'it could not be attributed'}, so it stays with the `
|
|
228
|
+
+ `delivery whose run rendered it (${ownership.judgedDeliveryId})`;
|
|
229
|
+
const alsoIn = ownership.causingNewestFirst.filter((id) => id !== ownership.owningDeliveryId);
|
|
230
|
+
log.info(`[verification] rework issue: delivery ${deliveryId} shares the failed verdict for ${at.sha.slice(0, 12)} but does not `
|
|
231
|
+
+ `carry it -- ${why}`
|
|
232
|
+
+ (alsoIn.length > 0 ? ` (also committed in that range: ${alsoIn.join(', ')})` : ''));
|
|
233
|
+
}
|
|
234
|
+
return owns;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Rung 3 for a caller holding ONE delivery: read the focus's candidates and settle the
|
|
238
|
+
* failure over them, so the answer is the set's, not the asker's (module doc). A read
|
|
239
|
+
* that fails, or that does not list this delivery, DECLINES -- one poll of nobody,
|
|
240
|
+
* which retryOwedReworkIssue retries -- rather than letting a sibling reading a
|
|
241
|
+
* different set assume it owns the red too.
|
|
242
|
+
*/
|
|
243
|
+
async function ownsUnattributable(deliveryId, at, deps) {
|
|
244
|
+
let candidates;
|
|
245
|
+
try {
|
|
246
|
+
candidates = await deps.listVerifyCandidates(at.focusId);
|
|
247
|
+
}
|
|
248
|
+
catch (err) {
|
|
249
|
+
log.warn(`[verification] rework issue: the failed verdict for ${at.sha.slice(0, 12)} is unattributable and the focus's verify `
|
|
250
|
+
+ `deliveries could not be read -- ${deliveryId} files nothing this poll (the owed filing is retried):`, err.message);
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
const owner = unattributableOwner(candidates);
|
|
254
|
+
if (owner !== deliveryId) {
|
|
255
|
+
log.info(`[verification] rework issue: delivery ${deliveryId} shares the failed verdict for ${at.sha.slice(0, 12)}, which `
|
|
256
|
+
+ `nothing attributes -- the focus's verify set settles it on ${owner}`);
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
log.info(`[verification] rework issue: the failed verdict for ${at.sha.slice(0, 12)} is unattributable -- of the focus's verify `
|
|
260
|
+
+ `deliveries (${candidates.join(', ')}) it is carried by ${deliveryId} alone`);
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=rework-attribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rework-attribution.js","sourceRoot":"","sources":["../../src/verify/rework-attribution.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oGAAoG;AACpG,2DAA2D;AAC3D,iEAAiE;AACjE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAA2B,MAAM,8CAA8C,CAAC;AAChH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAA8C,MAAM,4BAA4B,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAoBrD,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAA0B,EAAE,CAAC,CAAC;IACxE,mBAAmB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI;IACjF,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtH,iBAAiB;IACjB,UAAU,EAAE,CAAC,YA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AAE,IAA2B;IACjG,IAAI,UAA6B,CAAC;IAClC,IAAI,CAAC;QACH,UAAU,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CACN,uDAAuD,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,4CAA4C;cACpH,mCAAmC,UAAU,wDAAwD,EACtG,GAAa,CAAC,OAAO,CACvB,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC9C,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;QACzB,GAAG,CAAC,IAAI,CACN,yCAAyC,UAAU,kCAAkC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU;cAChH,8DAA8D,KAAK,EAAE,CACxE,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,GAAG,CAAC,IAAI,CACN,uDAAuD,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,8CAA8C;UACtH,eAAe,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,UAAU,QAAQ,CAC/E,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortfall-rulings.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-rulings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shortfall-rulings.d.ts","sourceRoot":"","sources":["../../src/verify/shortfall-rulings.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAu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AAkB,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,iBAAiB,GAAG,WAAW,GAAG,oBAAoB,CAAC,CAAC;AAK5J;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,SAAS,eAAe,EAAE,EACtC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CAuBnB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS;IAAE,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAAC,oBAAoB,CAAC,EAAE,sBAAsB,CAAA;CAAE,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAS/J;AAED,wDAAwD;AACxD,wBAAgB,mCAAmC,IAAI,IAAI,CAE1D"}
|
|
@@ -1,10 +1,11 @@
|
|
|
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/integration/
|
|
2
|
+
// Pinned by: packages/daemon/src/integration/held-route-pull-dispatch.test.ts,
|
|
3
|
+
// packages/daemon/src/integration/shortfall-ruling-disposes-proposals-regression.test.ts,
|
|
3
4
|
// packages/daemon/src/integration/shortfall-ruling-release.test.ts,
|
|
4
5
|
// packages/daemon/src/verify/shortfall-rulings.test.ts
|
|
5
6
|
// PINNED-BY-END
|
|
6
7
|
import { isShortfallParkReleased, shortfallParkRefusingRework } from './shortfall-park.js';
|
|
7
|
-
import { releaseDefaultOnMark } from './
|
|
8
|
+
import { releaseDefaultOnMark } from './default-on-guards.js';
|
|
8
9
|
import { isGateRunSelected } from './gate-run-registry.js';
|
|
9
10
|
import { createLogger } from '../shell/log.js';
|
|
10
11
|
const log = createLogger({ module: 'verification' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortfall-rulings.js","sourceRoot":"","sources":["../../src/verify/shortfall-rulings.ts"],"names":[],"mappings":"AAAA,8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AAI;QAAE,OAAO,IAAI,CAAC;IACvB,MAAM,0BAA0B,GAA8B,KAAK,EAAE,OAAO,EAAE,EAAE;QAC9E,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC1D,MAAM,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IACF,OAAO,EAAE,GAAG,IAAI,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,CAAC;AACrE,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,mCAAmC;IACjD,SAAS,CAAC,KAAK,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -1,15 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The verify BOUNDARY the daemon resolves before a deterministic run and hands
|
|
3
|
-
* to the command as environment, so the
|
|
4
|
-
*
|
|
5
|
-
* merge-base(HEAD, integration).
|
|
3
|
+
* to the command as environment, so the gate's own stages diff against the
|
|
4
|
+
* commits in front of the gate rather than against merge-base(HEAD, integration).
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* ONE env var, TWO concerns, and they combine by taking the OLDER base.
|
|
7
|
+
*
|
|
8
|
+
* 1. The recorded PRE-MERGE BOUNDARY (a floor). On a merged-back delivery
|
|
9
|
+
* merge-base(HEAD, integration) equals HEAD: the changed-file set is empty and
|
|
10
|
+
* the gate passes as a "clean no-op" having run none of the delivery's own
|
|
11
|
+
* tests. Handing the recorded boundary makes the selection see the delivery's
|
|
12
|
+
* real changes, and the recorded commit count rides with it so the selector can
|
|
13
|
+
* FAIL rather than no-op on an empty diff (the laundered-pass guard).
|
|
14
|
+
*
|
|
15
|
+
* 2. The newest GREEN ANCESTOR (a ceiling on how far back to look). Both
|
|
16
|
+
* expensive stages of verify:gate -- the conditional check:types-drift and the
|
|
17
|
+
* test:targeted selection -- scope themselves from this base, so taking it from
|
|
18
|
+
* merge-base(HEAD, integration) makes it the branch's CUMULATIVE delta, which
|
|
19
|
+
* only grows: every area eventually crosses the "no precise pin map" line and
|
|
20
|
+
* widens to its whole suite. Measured on mars 2026-09-20, one delivery: 76
|
|
21
|
+
* files/22 min, 102/42, 101/28, 115/30, against 5 min for an empty delta.
|
|
22
|
+
* Everything up to a commit this gate judged PASSING was covered by that run,
|
|
23
|
+
* so the delta from there is what no green gate has covered
|
|
24
|
+
* (verify/judged-ancestor.ts).
|
|
25
|
+
*
|
|
26
|
+
* WHY NOT THE JUDGED DELIVERY'S OWN COMMITS, which is the narrower base the
|
|
27
|
+
* delivery's acceptance criteria name. A gate run's verdict belongs to the
|
|
28
|
+
* COMMIT, not to the delivery that happened to trigger it: it is written once per
|
|
29
|
+
* (product, focus, sha, gate) and TAKEN by every delivery judged on that commit
|
|
30
|
+
* with no second run (verify/verification-commit-sharing.ts) -- the saving this
|
|
31
|
+
* focus exists to make. Basing the selection on the judged delivery's own
|
|
32
|
+
* Telora-Delivery commits would therefore mean a sibling's intervening commit is
|
|
33
|
+
* selected by NO run: the sibling's own dispatch takes the recorded verdict
|
|
34
|
+
* instead of running, so its changed files would reach integration judged by
|
|
35
|
+
* nothing. Restoring the cover would cost one run per delivery per commit, which
|
|
36
|
+
* is the 5.7h/day this focus removed. So the range stays the union -- every
|
|
37
|
+
* commit since the last green -- and it is the right one: those commits ARE the
|
|
38
|
+
* work in front of the gate, and no green gate has covered them.
|
|
39
|
+
*
|
|
40
|
+
* What that leaves is a cost question, not a coverage one, and it is bounded by
|
|
41
|
+
* the green ancestor: a sibling's commit adds only its own changed files, and
|
|
42
|
+
* only until the next passing verdict anchors a newer base. The OTHER half of
|
|
43
|
+
* the concern -- that a delivery is told to fix a red its commits did not cause
|
|
44
|
+
* -- is real and is answered where it belongs, by naming the owner of the
|
|
45
|
+
* failure rather than by narrowing what the gate reads
|
|
46
|
+
* (verify/rework-attribution.ts).
|
|
47
|
+
*
|
|
48
|
+
* WHY THE OLDER WINS when both resolve: it is never fewer files than either
|
|
49
|
+
* concern requires. A green ancestor NEWER than the pre-merge boundary would put
|
|
50
|
+
* the delivery's own recorded commits behind the base, empty the diff, and fire
|
|
51
|
+
* the laundered-pass guard on honest work. Older by ANCESTRY, never by date --
|
|
52
|
+
* every coding spawn rebases the focus worktree, so commit dates are shuffled
|
|
53
|
+
* relative to branch order. An undetermined comparison hands the pre-merge
|
|
54
|
+
* boundary: that is the base whose absence causes a laundered pass rather than
|
|
55
|
+
* merely a slow run.
|
|
56
|
+
*
|
|
57
|
+
* Every resolution failure falls back to what was handed before it, and handing
|
|
58
|
+
* nothing leaves the selector's own merge-base auto-derivation unchanged. A base
|
|
59
|
+
* that is too old costs time; one that is too new launders a pass.
|
|
13
60
|
*
|
|
14
61
|
* Sliced out of verification-engine.ts to keep that file under the daemon
|
|
15
62
|
* 800-line limit; the engine's STRATEGIES dispatch calls resolveVerifyBoundaryEnv
|
|
@@ -36,12 +83,13 @@ export declare const VERIFY_BASE_REF_ENV = "TELORA_VERIFY_BASE_REF";
|
|
|
36
83
|
export declare const VERIFY_RECORDED_COMMIT_COUNT_ENV = "TELORA_VERIFY_RECORDED_COMMIT_COUNT";
|
|
37
84
|
/**
|
|
38
85
|
* Resolve the verify boundary env for the deterministic command, BEFORE the run.
|
|
39
|
-
* Best-effort:
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
86
|
+
* Best-effort: every resolution failure narrows nothing, so the command inherits
|
|
87
|
+
* the process env and the selector's merge-base auto-derivation is used
|
|
88
|
+
* unchanged. A recorded pre-merge boundary is handed alongside the delivery's own
|
|
89
|
+
* recorded commit count, so the selector can distinguish an honest empty diff (no
|
|
90
|
+
* recorded commits) from a laundered no-op (recorded commits, empty diff); the
|
|
91
|
+
* count rides with the boundary and only with it, so that guard's precondition is
|
|
92
|
+
* exactly what it was.
|
|
45
93
|
*
|
|
46
94
|
* The FAST-FORWARD merge-back case (no merge commit) resolves its boundary from
|
|
47
95
|
* the recorded pre-merge ref (deps.resolveRecordedPreMergeRef is the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-boundary-env.d.ts","sourceRoot":"","sources":["../../src/verify/verification-boundary-env.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"verification-boundary-env.d.ts","sourceRoot":"","sources":["../../src/verify/verification-boundary-env.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAC5D,eAAO,MAAM,gCAAgC,wCAAwC,CAAC;AAwDtF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,gBAAgB,EACtB,CAAC,EAAE,mBAAmB,GACrB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA2CjC"}
|