@telora/daemon 0.23.29 → 0.23.46
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 +10 -3
- package/dist/backends/claude/one-shot-model.d.ts.map +1 -1
- package/dist/backends/claude/one-shot-model.js +1 -0
- package/dist/backends/claude/one-shot-model.js.map +1 -1
- package/dist/completion/completion-event/event.d.ts +12 -0
- package/dist/completion/completion-event/event.d.ts.map +1 -1
- package/dist/completion/completion-event/event.js +1 -0
- package/dist/completion/completion-event/event.js.map +1 -1
- package/dist/completion/completion-event/unfinished-work.d.ts +134 -0
- package/dist/completion/completion-event/unfinished-work.d.ts.map +1 -0
- package/dist/completion/completion-event/unfinished-work.js +140 -0
- package/dist/completion/completion-event/unfinished-work.js.map +1 -0
- package/dist/completion/team-outcome/apply-turn.d.ts.map +1 -1
- package/dist/completion/team-outcome/apply-turn.js +18 -0
- package/dist/completion/team-outcome/apply-turn.js.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.d.ts +16 -0
- package/dist/completion/team-outcome/decide-turn-entry-rows.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.js +75 -11
- package/dist/completion/team-outcome/decide-turn-entry-rows.js.map +1 -1
- package/dist/completion/team-outcome/decide-turn-work-rows.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide-turn-work-rows.js +10 -1
- package/dist/completion/team-outcome/decide-turn-work-rows.js.map +1 -1
- package/dist/completion/team-outcome/decide.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide.js +1 -0
- package/dist/completion/team-outcome/decide.js.map +1 -1
- package/dist/completion/team-outcome/exit-action-roles.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-action-roles.js +2 -0
- package/dist/completion/team-outcome/exit-action-roles.js.map +1 -1
- package/dist/completion/team-outcome/exit-actions.d.ts +4 -0
- package/dist/completion/team-outcome/exit-actions.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-limits.d.ts +8 -0
- package/dist/completion/team-outcome/exit-limits.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-limits.js +9 -0
- package/dist/completion/team-outcome/exit-limits.js.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts +7 -0
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.js +1 -0
- package/dist/completion/team-outcome/exit-pipeline-state.js.map +1 -1
- package/dist/completion/team-outcome/team-outcome.d.ts.map +1 -1
- package/dist/completion/team-outcome/team-outcome.js +2 -1
- package/dist/completion/team-outcome/team-outcome.js.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts +13 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.js +15 -0
- package/dist/completion/team-teardown/session-hold-bounds.js.map +1 -1
- package/dist/completion/team-teardown/session-hold.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold.js +4 -0
- package/dist/completion/team-teardown/session-hold.js.map +1 -1
- package/dist/composition/completion-event-context.d.ts.map +1 -1
- package/dist/composition/completion-event-context.js +8 -0
- package/dist/composition/completion-event-context.js.map +1 -1
- package/dist/composition/daemon-contexts.d.ts.map +1 -1
- package/dist/composition/daemon-contexts.js +3 -1
- package/dist/composition/daemon-contexts.js.map +1 -1
- package/dist/composition/qa-author-pass-context.d.ts +7 -0
- package/dist/composition/qa-author-pass-context.d.ts.map +1 -0
- package/dist/composition/qa-author-pass-context.js +68 -0
- package/dist/composition/qa-author-pass-context.js.map +1 -0
- package/dist/composition/runtime-poll-context.d.ts +32 -4
- package/dist/composition/runtime-poll-context.d.ts.map +1 -1
- package/dist/composition/runtime-poll-context.js +61 -5
- package/dist/composition/runtime-poll-context.js.map +1 -1
- package/dist/composition/spawn-pass-deps.d.ts +1 -1
- package/dist/composition/spawn-pass-deps.d.ts.map +1 -1
- package/dist/composition/verification-context.js +1 -1
- package/dist/composition/verify-rework-context.d.ts +12 -3
- package/dist/composition/verify-rework-context.d.ts.map +1 -1
- package/dist/composition/verify-rework-context.js +27 -10
- package/dist/composition/verify-rework-context.js.map +1 -1
- package/dist/config/live-daemon-config.js +1 -1
- package/dist/daemon-state/focus-team-state.js +1 -1
- package/dist/daemon-state/provider-window.d.ts.map +1 -1
- package/dist/daemon-state/provider-window.js +1 -0
- package/dist/daemon-state/provider-window.js.map +1 -1
- package/dist/delivery/advance-hold.d.ts +25 -0
- package/dist/delivery/advance-hold.d.ts.map +1 -1
- package/dist/delivery/advance-hold.js +52 -1
- package/dist/delivery/advance-hold.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts +17 -2
- package/dist/delivery/delivery-reconciler.d.ts.map +1 -1
- package/dist/delivery/delivery-reconciler.js +54 -30
- package/dist/delivery/delivery-reconciler.js.map +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/directive/directive-queue.d.ts +27 -0
- package/dist/directive/directive-queue.d.ts.map +1 -1
- package/dist/directive/directive-queue.js +36 -1
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/focus/daemon-contexts.d.ts +3 -0
- package/dist/focus/daemon-contexts.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.js +1 -1
- package/dist/focus/daemon-contexts.js.map +1 -1
- package/dist/focus/failed-head-wedge.d.ts +42 -13
- package/dist/focus/failed-head-wedge.d.ts.map +1 -1
- package/dist/focus/failed-head-wedge.js +45 -10
- package/dist/focus/failed-head-wedge.js.map +1 -1
- package/dist/focus/focus-loop-registry.d.ts.map +1 -1
- package/dist/focus/focus-loop-registry.js +21 -0
- package/dist/focus/focus-loop-registry.js.map +1 -1
- package/dist/focus/focus-poller-spawn.js +1 -1
- package/dist/focus/focus-poller-state.js +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.js +9 -1
- package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
- package/dist/focus/uncommitted-work-backstop.d.ts +115 -0
- package/dist/focus/uncommitted-work-backstop.d.ts.map +1 -0
- package/dist/focus/uncommitted-work-backstop.js +259 -0
- package/dist/focus/uncommitted-work-backstop.js.map +1 -0
- package/dist/focus/verify-routing-passes.d.ts +5 -1
- package/dist/focus/verify-routing-passes.d.ts.map +1 -1
- package/dist/focus/verify-routing-passes.js +1 -0
- package/dist/focus/verify-routing-passes.js.map +1 -1
- package/dist/git/index.d.ts.map +1 -1
- package/dist/git/index.js +2 -1
- package/dist/git/index.js.map +1 -1
- package/dist/git/review-window-commits.d.ts.map +1 -1
- package/dist/git/review-window-commits.js +1 -0
- package/dist/git/review-window-commits.js.map +1 -1
- package/dist/git/types.d.ts.map +1 -1
- package/dist/git/types.js +1 -19
- package/dist/git/types.js.map +1 -1
- package/dist/prompt-sections/qa-author-section.d.ts +58 -0
- package/dist/prompt-sections/qa-author-section.d.ts.map +1 -0
- package/dist/prompt-sections/qa-author-section.js +226 -0
- package/dist/prompt-sections/qa-author-section.js.map +1 -0
- package/dist/qa/qa-author-faithfulness.d.ts +139 -0
- package/dist/qa/qa-author-faithfulness.d.ts.map +1 -0
- package/dist/qa/qa-author-faithfulness.js +323 -0
- package/dist/qa/qa-author-faithfulness.js.map +1 -0
- package/dist/qa/qa-author-mode.d.ts +34 -0
- package/dist/qa/qa-author-mode.d.ts.map +1 -0
- package/dist/qa/qa-author-mode.js +29 -0
- package/dist/qa/qa-author-mode.js.map +1 -0
- package/dist/qa/qa-author-output.d.ts +26 -0
- package/dist/qa/qa-author-output.d.ts.map +1 -0
- package/dist/qa/qa-author-output.js +66 -0
- package/dist/qa/qa-author-output.js.map +1 -0
- package/dist/qa/qa-author-pass.d.ts +63 -0
- package/dist/qa/qa-author-pass.d.ts.map +1 -0
- package/dist/qa/qa-author-pass.js +164 -0
- package/dist/qa/qa-author-pass.js.map +1 -0
- package/dist/qa/qa-author-runner.d.ts +60 -0
- package/dist/qa/qa-author-runner.d.ts.map +1 -0
- package/dist/qa/qa-author-runner.js +180 -0
- package/dist/qa/qa-author-runner.js.map +1 -0
- package/dist/qa/qa-focus-changes.d.ts +32 -0
- package/dist/qa/qa-focus-changes.d.ts.map +1 -0
- package/dist/qa/qa-focus-changes.js +59 -0
- package/dist/qa/qa-focus-changes.js.map +1 -0
- package/dist/queries/api-client/shared.d.ts +1 -0
- package/dist/queries/api-client/shared.d.ts.map +1 -1
- package/dist/queries/api-client/shared.js +14 -1
- package/dist/queries/api-client/shared.js.map +1 -1
- package/dist/queries/deliveries/deliveries.d.ts +15 -27
- package/dist/queries/deliveries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries/deliveries.js +6 -57
- package/dist/queries/deliveries/deliveries.js.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts +8 -3
- package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.js +1 -1
- package/dist/queries/escalations/escalations.d.ts.map +1 -1
- package/dist/queries/escalations/escalations.js +1 -0
- package/dist/queries/escalations/escalations.js.map +1 -1
- package/dist/queries/index.d.ts +1 -1
- package/dist/queries/index.d.ts.map +1 -1
- package/dist/queries/index.js +1 -1
- package/dist/queries/index.js.map +1 -1
- package/dist/queries/qa-packets/qa-packets.d.ts +156 -0
- package/dist/queries/qa-packets/qa-packets.d.ts.map +1 -0
- package/dist/queries/qa-packets/qa-packets.js +105 -0
- package/dist/queries/qa-packets/qa-packets.js.map +1 -0
- package/dist/supervision/escalation-filing.js +1 -1
- package/dist/supervision/spawn-cooldown.js +1 -1
- package/dist/supervision/stop-registry.d.ts +5 -0
- package/dist/supervision/stop-registry.d.ts.map +1 -1
- package/dist/supervision/stop-rows-team-session.d.ts +6 -1
- package/dist/supervision/stop-rows-team-session.d.ts.map +1 -1
- package/dist/supervision/stop-rows-team-session.js +34 -1
- package/dist/supervision/stop-rows-team-session.js.map +1 -1
- package/dist/supervision/team-work.d.ts.map +1 -1
- package/dist/supervision/team-work.js +1 -0
- package/dist/supervision/team-work.js.map +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/approved-head-inert-deps.js +1 -1
- package/dist/testing/fixtures/approved-head-inert-deps.js.map +1 -1
- package/dist/testing/fixtures/completion-event-deps.d.ts +2 -1
- package/dist/testing/fixtures/completion-event-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/completion-event-deps.js +5 -1
- package/dist/testing/fixtures/completion-event-deps.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +2 -1
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/review-exit-deps.js +2 -2
- package/dist/testing/fixtures/review-exit-deps.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/qa-packet.d.ts +39 -0
- package/dist/types/qa-packet.d.ts.map +1 -0
- package/dist/types/qa-packet.js +50 -0
- package/dist/types/qa-packet.js.map +1 -0
- package/dist/verify/attribution/rework-attribution.d.ts +50 -111
- package/dist/verify/attribution/rework-attribution.d.ts.map +1 -1
- package/dist/verify/attribution/rework-attribution.js +215 -71
- package/dist/verify/attribution/rework-attribution.js.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.d.ts +9 -0
- package/dist/verify/gate-verdicts/commit-verdict-record.d.ts.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +27 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js.map +1 -1
- package/dist/verify/gate-verdicts/judged-ancestor.d.ts.map +1 -1
- package/dist/verify/gate-verdicts/judged-ancestor.js +2 -1
- package/dist/verify/gate-verdicts/judged-ancestor.js.map +1 -1
- package/dist/verify/outcome-routing/gate-rework-reopen.d.ts +30 -0
- package/dist/verify/outcome-routing/gate-rework-reopen.d.ts.map +1 -0
- package/dist/verify/outcome-routing/gate-rework-reopen.js +37 -0
- package/dist/verify/outcome-routing/gate-rework-reopen.js.map +1 -0
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts +114 -25
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.js +147 -88
- package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,96 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whose commits caused a failed gate verdict -- the delivery a rework Bug belongs on.
|
|
3
|
-
*
|
|
4
|
-
* Every delivery on a focus is judged on the same focus-branch HEAD, and one gate
|
|
5
|
-
* run's verdict is SHARED by all of them (verify/engine/verification-commit-sharing.ts).
|
|
6
|
-
* Sharing the verdict is sound: the gate ran on one tree and would render the same
|
|
7
|
-
* answer for each. Fanning out the REWORK is not: one rework Bug PER delivery
|
|
8
|
-
* sitting in verify would name a gate run most of those deliveries never made,
|
|
9
|
-
* cost each a verify_failed re-entry, and spend a review cycle out of the focus's
|
|
10
|
-
* arm budget (completion/review-cycle-budget/review-cycle-cap.ts) on a delivery that carries no
|
|
11
|
-
* defect of its own.
|
|
12
|
-
*
|
|
13
|
-
* ONE branch-level red is ONE piece of open work. This module names its owner.
|
|
14
|
-
*
|
|
15
|
-
* THE RANGE. The suspects are the commits the failure could have come from: those
|
|
16
|
-
* between the newest ancestor this gate judged GREEN (verify/gate-verdicts/judged-ancestor.ts --
|
|
17
|
-
* the same bound the gate's own stages diff against) and the failed commit.
|
|
18
|
-
* Everything at or before the green ancestor was covered by a run that PASSED on a
|
|
19
|
-
* tree containing it. The gate that judged the failure is read off the failure's own
|
|
20
|
-
* recorded verdict, so no caller has to resolve it.
|
|
21
|
-
*
|
|
22
|
-
* THE OWNER. Each commit in that range is attributed by its `Telora-Delivery`
|
|
23
|
-
* trailer, through git's own trailer parse (git/review-window-commits.ts),
|
|
24
|
-
* the same read the verify gate partitions evidence with. A sentinel, an
|
|
25
|
-
* unattributed capture and a commit naming a delivery outside the focus own nothing.
|
|
26
|
-
*
|
|
27
|
-
* SEVERAL DELIVERIES MAY HAVE COMMITTED IN THAT RANGE, and one red is still one
|
|
28
|
-
* work item, so the range names ONE owner: the delivery of the NEWEST commit in it.
|
|
29
|
-
*
|
|
30
|
-
* SAY WHAT THAT IS AND IS NOT. It is the newest SUSPECT, not a proof of cause. The
|
|
31
|
-
* gate was GREEN at the base and the red is rendered at the tip, so every commit
|
|
32
|
-
* between them is a candidate and the newest is the last change that could have
|
|
33
|
-
* introduced it -- but nothing here reads the failing stage's output, so an older
|
|
34
|
-
* commit in the range may well be the culprit. What the rule buys is that the choice
|
|
35
|
-
* is DETERMINISTIC (git's own topological order, one read) and SINGLE. Two
|
|
36
|
-
* alternatives lost: the failing stage's own files would be a stronger ground, but a
|
|
37
|
-
* verdict records a stage NAME (`lint:all > lint --prefix packages/daemon`) and test
|
|
38
|
-
* ids, which do not resolve to files in general; and "every delivery in the range" is
|
|
39
|
-
* what this module exists to stop -- it re-creates the N-Bugs fan-out one bound later.
|
|
40
|
-
* Being wrong here costs one delivery a re-entry it did not earn, while the branch is
|
|
41
|
-
* red for all of them either way; being wrong by filing on all of them costs every
|
|
42
|
-
* delivery one, plus a review cycle each out of the arm's budget.
|
|
43
|
-
*
|
|
44
|
-
* EVERY PATH ENDS AT EXACTLY ONE OWNER, including the ones that know least. The
|
|
45
|
-
* acceptance rule is unconditional -- one failed verdict, one piece of open work --
|
|
46
|
-
* so "we could not attribute this" is not licence to fan out again. The ladder, in
|
|
47
|
-
* {@link selectReworkOwner} for a pass that knows its candidate set:
|
|
48
|
-
*
|
|
49
|
-
* 1. the newest commit in the range whose delivery is a candidate;
|
|
50
|
-
* 2. the delivery whose dispatch RAN the gate (CommitVerdict.judgedDeliveryId) --
|
|
51
|
-
* one delivery, and the one that actually paid for the run;
|
|
52
|
-
* 3. {@link unattributableOwner} of the candidates -- the lowest id, logged.
|
|
53
|
-
*
|
|
54
|
-
* Rung 3 is what makes the rule unconditional: an unreadable verdict, an unreadable
|
|
55
|
-
* range, a focus whose worktree the daemon no longer holds -- each still names one
|
|
56
|
-
* routable delivery, because a red must reach someone and every candidate is a
|
|
57
|
-
* delivery sitting in verify on the red branch. It is a PURE FUNCTION OF THE
|
|
58
|
-
* CANDIDATE SET, deliberately: an arbitrary owner is fine, an owner that depends on
|
|
59
|
-
* who asked first is not.
|
|
60
|
-
*
|
|
61
|
-
* A PASS THAT ASKS ONE DELIVERY AT A TIME (verify/outcome-routing/verification-feedback.ts routes each
|
|
62
|
-
* dispatch separately) therefore asks the SAME question rather than a weaker one: it
|
|
63
|
-
* reads the focus's verify deliveries and applies rung 3 to that set, so every asker
|
|
64
|
-
* -- this delivery, its siblings, the next poll, the first poll after a daemon
|
|
65
|
-
* restart, and the per-focus filer acting on the same commit -- computes the same
|
|
66
|
-
* single owner. It keeps no in-memory first-claim ledger, which would agree with
|
|
67
|
-
* nothing after a restart and with the per-focus filer never. When the candidate
|
|
68
|
-
* read itself fails, NOBODY files this poll: the filing is left owed and retried from
|
|
69
|
-
* the commit's record (verify/outcome-routing/verification-rework-issue.ts retryOwedReworkIssue)
|
|
70
|
-
* rather than guessed at, because a guess here is how one red becomes N Bugs.
|
|
71
|
-
*
|
|
72
|
-
* Direction of error: this module decides who is TOLD about a red, never whether the
|
|
73
|
-
* red gates. A delivery that shares a failed verdict still takes that verdict, still
|
|
74
|
-
* routes verify -> verify_failed, and still carries the failure on its gate_state.
|
|
75
|
-
* What it does not carry is a work item describing a run it never made.
|
|
76
|
-
*
|
|
77
|
-
* WHAT THIS MODULE DOES NOT PROMISE. Its answer is a function of LIVE state -- the
|
|
78
|
-
* focus's deliveries currently in verify -- and that set moves as deliveries are
|
|
79
|
-
* routed, so the same failed commit can name a different owner at a later poll. That
|
|
80
|
-
* is deliberate: a red whose first-named owner has already moved on must still reach
|
|
81
|
-
* someone. It does mean "one red, one Bug" cannot rest on this module alone, and it
|
|
82
|
-
* does not: the filing dedupes per COMMIT across the whole focus
|
|
83
|
-
* (verify/outcome-routing/verification-rework-issue.ts), so a re-selection RE-ROUTES a red rather
|
|
84
|
-
* than duplicating one.
|
|
85
|
-
*
|
|
86
|
-
* A leaf: git, the verdict record and the focus worktree map, nothing else.
|
|
87
|
-
*
|
|
88
|
-
* History: docs/daemon/history-verify.md (verify/attribution/rework-attribution.ts).
|
|
89
|
-
*
|
|
90
|
-
* @module verify/attribution/rework-attribution
|
|
91
|
-
*/
|
|
92
1
|
import type { ReviewWindowCommit } from '../../git/review-window-commits.js';
|
|
93
2
|
import type { CommitVerdict, CommitVerdictGate, CommitVerdictReader } from '../gate-verdicts/commit-verdict-record.js';
|
|
3
|
+
/** The slice of a focus delivery the owner choice reads: its id and where it stands. */
|
|
4
|
+
export interface ReworkDeliveryRow {
|
|
5
|
+
id: string;
|
|
6
|
+
executionStatus?: string | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The statuses a coding pass picks a delivery's open work up from where it stands,
|
|
10
|
+
* including the verify_failed -> coding -> verify walk the reconciler moves a
|
|
11
|
+
* delivery through in seconds. Rung 3 prefers them (module doc).
|
|
12
|
+
*/
|
|
13
|
+
export declare const LIVE_REWORK_OWNER_STATUSES: ReadonlySet<string>;
|
|
14
|
+
/**
|
|
15
|
+
* The statuses an owner is RE-OPENED from to carry its Bug (the reconciler's
|
|
16
|
+
* gateReworkOpen fact): done -> verify_failed, paused -> queued.
|
|
17
|
+
*/
|
|
18
|
+
export declare const REOPENED_REWORK_OWNER_STATUSES: ReadonlySet<string>;
|
|
19
|
+
/** Whether an owner in this status must be re-opened to carry its rework Bug. Pure. */
|
|
20
|
+
export declare function reopensForRework(status: string | null | undefined): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The ids of the deliveries that can own a rework Bug (module doc, THE
|
|
23
|
+
* CANDIDATES): every non-cancelled delivery but a draft or planning one. A row
|
|
24
|
+
* whose status was not read is not a candidate -- it cannot be routed. Pure.
|
|
25
|
+
*/
|
|
26
|
+
export declare function reworkOwnerCandidates(deliveries: readonly ReworkDeliveryRow[]): string[];
|
|
94
27
|
/**
|
|
95
28
|
* The attribution's collaborators, every one required; the production binding is
|
|
96
29
|
* composition/verify-rework-context.ts buildReworkAttributionDeps.
|
|
@@ -108,11 +41,11 @@ export interface ReworkAttributionDeps {
|
|
|
108
41
|
/** The non-merge commits in base..tip with their trailer attribution; null when git could not answer. */
|
|
109
42
|
listWindow: (worktreePath: string, base: string, tip: string) => readonly ReviewWindowCommit[] | null;
|
|
110
43
|
/**
|
|
111
|
-
* The focus's deliveries
|
|
112
|
-
*
|
|
113
|
-
* focus-wide question (module doc).
|
|
44
|
+
* The focus's deliveries, every status: which trailers are the focus's OWN, and --
|
|
45
|
+
* through {@link reworkOwnerCandidates} -- who can carry the Bug, so a pass that was
|
|
46
|
+
* handed one delivery can still ask the focus-wide question (module doc).
|
|
114
47
|
*/
|
|
115
|
-
|
|
48
|
+
listFocusDeliveries: (focusId: string) => Promise<readonly ReworkDeliveryRow[]>;
|
|
116
49
|
}
|
|
117
50
|
/** The focus commit whose failure is being attributed. */
|
|
118
51
|
export interface FailedCommit {
|
|
@@ -123,7 +56,7 @@ export interface FailedCommit {
|
|
|
123
56
|
}
|
|
124
57
|
/** Who owns a failed verdict, and how that was decided. */
|
|
125
58
|
export interface FailureOwnership {
|
|
126
|
-
/** The deliveries whose
|
|
59
|
+
/** The focus's own deliveries whose commits are in the judged range; empty when none is attributable. */
|
|
127
60
|
causingDeliveryIds: ReadonlySet<string>;
|
|
128
61
|
/** Those deliveries in range order, NEWEST COMMIT FIRST -- the ranking the owner is taken from. */
|
|
129
62
|
causingNewestFirst: readonly string[];
|
|
@@ -136,16 +69,19 @@ export interface FailureOwnership {
|
|
|
136
69
|
}
|
|
137
70
|
/**
|
|
138
71
|
* Who a failed verdict belongs to (module doc), or null when its verdict cannot be
|
|
139
|
-
* read -- the one answer that means "cannot tell".
|
|
72
|
+
* read -- the one answer that means "cannot tell". Only commits trailered with a
|
|
73
|
+
* delivery in `ownDeliveryIds` -- the deliveries of the focus being judged -- are
|
|
74
|
+
* suspects; any other trailer (another focus's, brought in by an integration merge)
|
|
75
|
+
* owns nothing. Never throws.
|
|
140
76
|
*/
|
|
141
|
-
export declare function resolveFailureOwnership(at: FailedCommit, deps: ReworkAttributionDeps): FailureOwnership | null;
|
|
77
|
+
export declare function resolveFailureOwnership(at: FailedCommit, deps: ReworkAttributionDeps, ownDeliveryIds: ReadonlySet<string>): FailureOwnership | null;
|
|
142
78
|
/**
|
|
143
|
-
* The ONE delivery a failed verdict's rework belongs on, chosen from the
|
|
144
|
-
* `
|
|
145
|
-
*
|
|
146
|
-
*
|
|
79
|
+
* The ONE delivery a failed verdict's rework belongs on, chosen from the focus's
|
|
80
|
+
* `deliveries` (module doc): the candidates are its non-cancelled deliveries, and
|
|
81
|
+
* the range ranks only the focus's own trailers. Null only when every delivery of
|
|
82
|
+
* the focus is cancelled, draft or planning. Never throws.
|
|
147
83
|
*/
|
|
148
|
-
export declare function selectReworkOwner(
|
|
84
|
+
export declare function selectReworkOwner(deliveries: readonly ReworkDeliveryRow[], at: FailedCommit, deps: ReworkAttributionDeps): string | null;
|
|
149
85
|
/**
|
|
150
86
|
* Rung 3: the owner of a failure NOTHING attributes, over the candidates that could
|
|
151
87
|
* carry it. The lowest id -- arbitrary on purpose, and a pure function of the set, so
|
|
@@ -153,14 +89,17 @@ export declare function selectReworkOwner(candidates: readonly string[], at: Fai
|
|
|
153
89
|
* same one delivery. Null only when there is no candidate at all.
|
|
154
90
|
*/
|
|
155
91
|
export declare function unattributableOwner(candidates: readonly string[]): string | null;
|
|
92
|
+
/** What {@link resolveReworkOwner} answers: the owner and the status it stands in, none, or "cannot tell". */
|
|
93
|
+
export type ReworkOwnerAnswer = ReworkDeliveryRow | null | 'unreadable';
|
|
156
94
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* owns that case)
|
|
95
|
+
* The ONE delivery the rework Bug for a failed commit belongs on, asked by a pass
|
|
96
|
+
* that holds ONE delivery of the focus (module doc): the SAME ladder
|
|
97
|
+
* {@link selectReworkOwner} runs for the per-focus filer, over the focus's deliveries
|
|
98
|
+
* read here, so every asker and both doors name one owner -- and the asker files on
|
|
99
|
+
* THAT delivery rather than declining, so an owner that will never ask (a done or
|
|
100
|
+
* paused one, a sibling in coding) still receives the Bug. A focus read that fails
|
|
101
|
+
* answers 'unreadable' and files nothing this poll (the retry owns that case): without
|
|
102
|
+
* it a foreign trailer cannot be told from an own one. Never throws.
|
|
164
103
|
*/
|
|
165
|
-
export declare function
|
|
104
|
+
export declare function resolveReworkOwner(at: FailedCommit, deps: ReworkAttributionDeps): Promise<ReworkOwnerAnswer>;
|
|
166
105
|
//# sourceMappingURL=rework-attribution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rework-attribution.d.ts","sourceRoot":"","sources":["../../../src/verify/attribution/rework-attribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rework-attribution.d.ts","sourceRoot":"","sources":["../../../src/verify/attribution/rework-attribution.ts"],"names":[],"mappings":"AAyHA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAKvH,wFAAwF;AACxF,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,CAKzD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,MAAM,CAG7D,CAAC;AAEH,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,MA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xC,mGAAmG;IACnG,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,0FAA0F;IAC1F,gBAAgB,EAAE,MAAM,CAAC;IACzB,2GAA2G;IAC3G,gBAAgB,EAAE,MAAM,CAAC;IACzB,kHAAkH;IAClH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,YAAY,EAChB,IAAI,EAAE,qBAAqB,EAC3B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,GAClC,gBAAgB,GAAG,IAAI,CAkBzB;AAiDD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,SAAS,iBAAiB,EAAE,EACxC,EAAE,EAAE,YAAY,EAChB,IAAI,EAAE,qBAAqB,GAC1B,MAAM,GAAG,IAAI,CAEf;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAIhF;AAoCD,8GAA8G;AAC9G,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG,IAAI,GAAG,YAAY,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAgBlH"}
|
|
@@ -1,15 +1,165 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
2
|
// Pinned by: packages/daemon/src/integration/failed-verdict-review-exit-respawn-regression.test.ts,
|
|
3
|
+
// packages/daemon/src/integration/red-head-integration-merge-rework-regression.test.ts,
|
|
3
4
|
// packages/daemon/src/verify/attribution/rework-attribution.test.ts,
|
|
4
5
|
// packages/daemon/src/verify/outcome-routing/verification-rework-issue.test.ts
|
|
5
6
|
// PINNED-BY-END
|
|
7
|
+
/**
|
|
8
|
+
* Whose commits caused a failed gate verdict -- the delivery a rework Bug belongs on.
|
|
9
|
+
*
|
|
10
|
+
* Every delivery on a focus is judged on the same focus-branch HEAD, and one gate
|
|
11
|
+
* run's verdict is SHARED by all of them (verify/engine/verification-commit-sharing.ts).
|
|
12
|
+
* Sharing the verdict is sound: the gate ran on one tree and would render the same
|
|
13
|
+
* answer for each. Fanning out the REWORK is not: one rework Bug PER delivery
|
|
14
|
+
* sitting in verify would name a gate run most of those deliveries never made,
|
|
15
|
+
* cost each a verify_failed re-entry, and spend a review cycle out of the focus's
|
|
16
|
+
* arm budget (completion/review-cycle-budget/review-cycle-cap.ts) on a delivery that carries no
|
|
17
|
+
* defect of its own.
|
|
18
|
+
*
|
|
19
|
+
* ONE branch-level red is ONE piece of open work. This module names its owner.
|
|
20
|
+
*
|
|
21
|
+
* THE RANGE. The suspects are the commits the failure could have come from: those
|
|
22
|
+
* between the newest ancestor this gate judged GREEN (verify/gate-verdicts/judged-ancestor.ts --
|
|
23
|
+
* the same bound the gate's own stages diff against) and the failed commit.
|
|
24
|
+
* Everything at or before the green ancestor was covered by a run that PASSED on a
|
|
25
|
+
* tree containing it. The gate that judged the failure is read off the failure's own
|
|
26
|
+
* recorded verdict, so no caller has to resolve it.
|
|
27
|
+
*
|
|
28
|
+
* THE OWNER. Each commit in that range is attributed by its `Telora-Delivery`
|
|
29
|
+
* trailer, through git's own trailer parse (git/review-window-commits.ts),
|
|
30
|
+
* the same read the verify gate partitions evidence with. A sentinel, an
|
|
31
|
+
* unattributed capture and a commit naming a delivery outside the focus own nothing.
|
|
32
|
+
* That last one is ENFORCED, not assumed: the range is filtered to the deliveries of
|
|
33
|
+
* the focus being judged before it ranks anything. A focus branch that merged
|
|
34
|
+
* integration carries other foci's trailered commits in its judged range, and the
|
|
35
|
+
* newest of them is routinely another focus's; ranked, it would name an owner that
|
|
36
|
+
* never hears of the red while the focus's own delivery is told it does not carry it.
|
|
37
|
+
*
|
|
38
|
+
* SEVERAL DELIVERIES MAY HAVE COMMITTED IN THAT RANGE, and one red is still one
|
|
39
|
+
* work item, so the range names ONE owner: the delivery of the NEWEST commit in it.
|
|
40
|
+
*
|
|
41
|
+
* SAY WHAT THAT IS AND IS NOT. It is the newest SUSPECT, not a proof of cause. The
|
|
42
|
+
* gate was GREEN at the base and the red is rendered at the tip, so every commit
|
|
43
|
+
* between them is a candidate and the newest is the last change that could have
|
|
44
|
+
* introduced it -- but nothing here reads the failing stage's output, so an older
|
|
45
|
+
* commit in the range may well be the culprit. What the rule buys is that the choice
|
|
46
|
+
* is DETERMINISTIC (git's own topological order, one read) and SINGLE. Two
|
|
47
|
+
* alternatives lost: the failing stage's own files would be a stronger ground, but a
|
|
48
|
+
* verdict records a stage NAME (`lint:all > lint --prefix packages/daemon`) and test
|
|
49
|
+
* ids, which do not resolve to files in general; and "every delivery in the range" is
|
|
50
|
+
* what this module exists to stop -- it re-creates the N-Bugs fan-out one bound later.
|
|
51
|
+
* Being wrong here costs one delivery a re-entry it did not earn, while the branch is
|
|
52
|
+
* red for all of them either way; being wrong by filing on all of them costs every
|
|
53
|
+
* delivery one, plus a review cycle each out of the arm's budget.
|
|
54
|
+
*
|
|
55
|
+
* THE CANDIDATES are the focus's NON-CANCELLED deliveries, whatever status each
|
|
56
|
+
* holds at the instant of asking -- never only those in verify. The reconciler walks
|
|
57
|
+
* a delivery whose issues are all Done from verify_failed through coding back to
|
|
58
|
+
* verify within seconds (focus/focus-poller-auto-advance.ts), so a candidate set
|
|
59
|
+
* read mid-walk that held only verify deliveries would name nobody; and a red head
|
|
60
|
+
* whose own deliveries are all done or paused is still the focus's red. A done or
|
|
61
|
+
* paused owner is RE-OPENED with its Bug ({@link reopensForRework}; the reconciler's
|
|
62
|
+
* gateReworkOpen fact), so a coding pass picks the Bug up. Two kinds of delivery are
|
|
63
|
+
* not candidates: a cancelled one released its work, and a draft or planning one is
|
|
64
|
+
* recorded intent the running team cannot see -- a Bug there reaches nobody.
|
|
65
|
+
*
|
|
66
|
+
* EVERY PATH ENDS AT EXACTLY ONE OWNER, including the ones that know least. The
|
|
67
|
+
* acceptance rule is unconditional -- one failed verdict, one piece of open work --
|
|
68
|
+
* so "we could not attribute this" is not licence to fan out again. The ladder, in
|
|
69
|
+
* {@link selectReworkOwner}, over the focus's deliveries:
|
|
70
|
+
*
|
|
71
|
+
* 1. the newest commit in the range whose delivery is a candidate, whatever its
|
|
72
|
+
* status (a done owner is re-opened, never skipped for a sibling);
|
|
73
|
+
* 2. the delivery whose dispatch RAN the gate (CommitVerdict.judgedDeliveryId) --
|
|
74
|
+
* one delivery, and the one that actually paid for the run;
|
|
75
|
+
* 3. {@link unattributableOwner} of the candidates a coding pass already picks
|
|
76
|
+
* work up from ({@link LIVE_REWORK_OWNER_STATUSES}), else of all of them --
|
|
77
|
+
* the lowest id, logged.
|
|
78
|
+
*
|
|
79
|
+
* Rung 3 is what makes the rule unconditional: an unreadable verdict, an unreadable
|
|
80
|
+
* range, a focus whose worktree the daemon no longer holds -- each still names one
|
|
81
|
+
* routable delivery, because a red must reach someone and every candidate is a
|
|
82
|
+
* delivery of the red focus a coding pass picks up, or one re-opened for it. It is a PURE
|
|
83
|
+
* FUNCTION OF THE CANDIDATE SET, deliberately: an arbitrary owner is fine, an owner
|
|
84
|
+
* that depends on who asked first is not.
|
|
85
|
+
*
|
|
86
|
+
* A PASS THAT ASKS ONE DELIVERY AT A TIME (verify/outcome-routing/verification-feedback.ts routes each
|
|
87
|
+
* dispatch separately) therefore asks the SAME question rather than a weaker one:
|
|
88
|
+
* {@link resolveReworkOwner} reads the focus's deliveries and runs the same ladder
|
|
89
|
+
* over them, so every asker -- this delivery, its siblings, the next poll, the first
|
|
90
|
+
* poll after a daemon restart, and the per-focus filer acting on the same commit --
|
|
91
|
+
* computes the same single owner, and files on IT. It keeps no in-memory first-claim ledger, which
|
|
92
|
+
* would agree with nothing after a restart and with the per-focus filer never. When
|
|
93
|
+
* the focus read itself fails, NOBODY files this poll: the filing is left owed and
|
|
94
|
+
* retried from the commit's record (verify/outcome-routing/verification-rework-issue.ts
|
|
95
|
+
* retryOwedReworkIssue) rather than guessed at, because a guess here is how one red
|
|
96
|
+
* becomes N Bugs -- and without the focus's deliveries a foreign trailer cannot be
|
|
97
|
+
* told from an own one.
|
|
98
|
+
*
|
|
99
|
+
* Direction of error: this module decides who is TOLD about a red, never whether the
|
|
100
|
+
* red gates. A delivery that shares a failed verdict still takes that verdict, still
|
|
101
|
+
* routes verify -> verify_failed, and still carries the failure on its gate_state.
|
|
102
|
+
* What it does not carry is a work item describing a run it never made.
|
|
103
|
+
*
|
|
104
|
+
* WHAT THIS MODULE DOES NOT PROMISE. Its answer is a function of LIVE state -- the
|
|
105
|
+
* focus's deliveries and their statuses now -- and that set moves as deliveries are
|
|
106
|
+
* routed, so the same failed commit can name a different owner at a later poll. That
|
|
107
|
+
* is deliberate: a red whose first-named owner has already moved on must still reach
|
|
108
|
+
* someone. It does mean "one red, one Bug" cannot rest on this module alone, and it
|
|
109
|
+
* does not: the filing dedupes per COMMIT across the whole focus
|
|
110
|
+
* (verify/outcome-routing/verification-rework-issue.ts), so a re-selection RE-ROUTES a red rather
|
|
111
|
+
* than duplicating one.
|
|
112
|
+
*
|
|
113
|
+
* A leaf: git, the verdict record and the focus worktree map, nothing else.
|
|
114
|
+
*
|
|
115
|
+
* History: docs/daemon/history-verify.md (verify/attribution/rework-attribution.ts).
|
|
116
|
+
*
|
|
117
|
+
* @module verify/attribution/rework-attribution
|
|
118
|
+
*/
|
|
119
|
+
import { DELIVERY_STATUS } from '@telora/daemon-core';
|
|
6
120
|
import { createLogger } from '../../log/daemon-log.js';
|
|
7
121
|
const log = createLogger({ module: 'verification' });
|
|
122
|
+
/**
|
|
123
|
+
* The statuses a coding pass picks a delivery's open work up from where it stands,
|
|
124
|
+
* including the verify_failed -> coding -> verify walk the reconciler moves a
|
|
125
|
+
* delivery through in seconds. Rung 3 prefers them (module doc).
|
|
126
|
+
*/
|
|
127
|
+
export const LIVE_REWORK_OWNER_STATUSES = new Set([
|
|
128
|
+
DELIVERY_STATUS.QUEUED,
|
|
129
|
+
DELIVERY_STATUS.CODING,
|
|
130
|
+
DELIVERY_STATUS.VERIFY,
|
|
131
|
+
DELIVERY_STATUS.VERIFY_FAILED,
|
|
132
|
+
]);
|
|
133
|
+
/**
|
|
134
|
+
* The statuses an owner is RE-OPENED from to carry its Bug (the reconciler's
|
|
135
|
+
* gateReworkOpen fact): done -> verify_failed, paused -> queued.
|
|
136
|
+
*/
|
|
137
|
+
export const REOPENED_REWORK_OWNER_STATUSES = new Set([
|
|
138
|
+
DELIVERY_STATUS.DONE,
|
|
139
|
+
DELIVERY_STATUS.PAUSED,
|
|
140
|
+
]);
|
|
141
|
+
/** Whether an owner in this status must be re-opened to carry its rework Bug. Pure. */
|
|
142
|
+
export function reopensForRework(status) {
|
|
143
|
+
return REOPENED_REWORK_OWNER_STATUSES.has(status ?? '');
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The ids of the deliveries that can own a rework Bug (module doc, THE
|
|
147
|
+
* CANDIDATES): every non-cancelled delivery but a draft or planning one. A row
|
|
148
|
+
* whose status was not read is not a candidate -- it cannot be routed. Pure.
|
|
149
|
+
*/
|
|
150
|
+
export function reworkOwnerCandidates(deliveries) {
|
|
151
|
+
return deliveries
|
|
152
|
+
.filter((d) => LIVE_REWORK_OWNER_STATUSES.has(d.executionStatus ?? '') || reopensForRework(d.executionStatus))
|
|
153
|
+
.map((d) => d.id);
|
|
154
|
+
}
|
|
8
155
|
/**
|
|
9
156
|
* Who a failed verdict belongs to (module doc), or null when its verdict cannot be
|
|
10
|
-
* read -- the one answer that means "cannot tell".
|
|
157
|
+
* read -- the one answer that means "cannot tell". Only commits trailered with a
|
|
158
|
+
* delivery in `ownDeliveryIds` -- the deliveries of the focus being judged -- are
|
|
159
|
+
* suspects; any other trailer (another focus's, brought in by an integration merge)
|
|
160
|
+
* owns nothing. Never throws.
|
|
11
161
|
*/
|
|
12
|
-
export function resolveFailureOwnership(at, deps) {
|
|
162
|
+
export function resolveFailureOwnership(at, deps, ownDeliveryIds) {
|
|
13
163
|
let verdict;
|
|
14
164
|
try {
|
|
15
165
|
verdict = deps.readCommitVerdict(at.productId, at.focusId, at.sha);
|
|
@@ -19,44 +169,60 @@ export function resolveFailureOwnership(at, deps) {
|
|
|
19
169
|
}
|
|
20
170
|
if (!verdict || verdict.outcome !== 'failed')
|
|
21
171
|
return null;
|
|
22
|
-
const causing = readCausingSet(at, verdict.gate, deps);
|
|
172
|
+
const causing = readCausingSet(at, verdict.gate, deps, ownDeliveryIds);
|
|
23
173
|
const newestFirst = causing ?? [];
|
|
24
174
|
return {
|
|
25
175
|
causingDeliveryIds: new Set(newestFirst),
|
|
26
176
|
causingNewestFirst: newestFirst,
|
|
27
177
|
judgedDeliveryId: verdict.judgedDeliveryId,
|
|
28
|
-
// ONE red, ONE work item: the newest commit in the range names the owner.
|
|
178
|
+
// ONE red, ONE work item: the newest own commit in the range names the owner.
|
|
29
179
|
owningDeliveryId: newestFirst[0] ?? verdict.judgedDeliveryId,
|
|
30
180
|
rangeRead: causing !== null,
|
|
31
181
|
};
|
|
32
182
|
}
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
183
|
+
/** Rung 3's owner: the lowest id among the live candidates, else among all of them (module doc). Pure. */
|
|
184
|
+
function fallbackOwner(deliveries, candidates) {
|
|
185
|
+
const eligible = new Set(candidates);
|
|
186
|
+
const live = deliveries.filter((d) => eligible.has(d.id) && LIVE_REWORK_OWNER_STATUSES.has(d.executionStatus ?? '')).map((d) => d.id);
|
|
187
|
+
return unattributableOwner(live) ?? unattributableOwner(candidates);
|
|
188
|
+
}
|
|
189
|
+
/** The ladder (module doc) over the focus's deliveries. Never throws. */
|
|
190
|
+
function chooseReworkOwner(deliveries, at, deps) {
|
|
191
|
+
const candidates = reworkOwnerCandidates(deliveries);
|
|
192
|
+
const fallback = fallbackOwner(deliveries, candidates);
|
|
193
|
+
// Nobody to tell: every delivery of this focus is cancelled, draft or planning.
|
|
42
194
|
if (fallback === null)
|
|
43
|
-
return null;
|
|
195
|
+
return { owner: null, why: 'no delivery of the focus can own it (every one is cancelled, draft or planning)' };
|
|
44
196
|
const eligible = new Set(candidates);
|
|
45
|
-
const ownership = resolveFailureOwnership(at, deps);
|
|
197
|
+
const ownership = resolveFailureOwnership(at, deps, new Set(deliveries.map((d) => d.id)));
|
|
46
198
|
if (ownership !== null) {
|
|
47
|
-
// Rung 1 -- the newest suspect
|
|
199
|
+
// Rung 1 -- the newest own suspect, whatever its status (a done or paused one is re-opened).
|
|
48
200
|
const attributed = ownership.causingNewestFirst.find((id) => eligible.has(id));
|
|
49
201
|
if (attributed !== undefined)
|
|
50
|
-
return attributed;
|
|
202
|
+
return { owner: attributed, why: `the newest of the focus's commits in the judged range is ${attributed}'s` };
|
|
51
203
|
// Rung 2 -- the delivery that paid for the run.
|
|
52
|
-
if (eligible.has(ownership.judgedDeliveryId))
|
|
53
|
-
return
|
|
204
|
+
if (eligible.has(ownership.judgedDeliveryId)) {
|
|
205
|
+
return {
|
|
206
|
+
owner: ownership.judgedDeliveryId,
|
|
207
|
+
why: `${ownership.rangeRead ? 'none of the focus\'s commits in the judged range is a candidate\'s' : 'the judged range could not be read'}, `
|
|
208
|
+
+ `so it stays with the delivery whose run rendered it (${ownership.judgedDeliveryId})`,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
54
211
|
}
|
|
55
212
|
// Rung 3 -- unattributable, and still ONE owner: the rule does not relax here.
|
|
56
213
|
log.info(`[verification] rework issue: the failed verdict for ${at.sha.slice(0, 12)} could not be attributed`
|
|
57
|
-
+ `${ownership === null ? ' (its verdict was unreadable)' : ` to a delivery
|
|
214
|
+
+ `${ownership === null ? ' (its verdict was unreadable)' : ` to a candidate delivery (owner: ${ownership.owningDeliveryId})`}`
|
|
58
215
|
+ ` -- it is carried by ${fallback} alone, not by every delivery on the red branch`);
|
|
59
|
-
return fallback;
|
|
216
|
+
return { owner: fallback, why: `nothing attributes it, so the focus's candidates (${candidates.join(', ')}) settle it on ${fallback}` };
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* The ONE delivery a failed verdict's rework belongs on, chosen from the focus's
|
|
220
|
+
* `deliveries` (module doc): the candidates are its non-cancelled deliveries, and
|
|
221
|
+
* the range ranks only the focus's own trailers. Null only when every delivery of
|
|
222
|
+
* the focus is cancelled, draft or planning. Never throws.
|
|
223
|
+
*/
|
|
224
|
+
export function selectReworkOwner(deliveries, at, deps) {
|
|
225
|
+
return chooseReworkOwner(deliveries, at, deps).owner;
|
|
60
226
|
}
|
|
61
227
|
/**
|
|
62
228
|
* Rung 3: the owner of a failure NOTHING attributes, over the candidates that could
|
|
@@ -71,8 +237,12 @@ export function unattributableOwner(candidates) {
|
|
|
71
237
|
lowest = id;
|
|
72
238
|
return lowest;
|
|
73
239
|
}
|
|
74
|
-
/**
|
|
75
|
-
|
|
240
|
+
/**
|
|
241
|
+
* The focus's OWN deliveries with a trailered commit in greenAncestor..failedSha,
|
|
242
|
+
* NEWEST FIRST; null when the range is unreadable. A trailer naming a delivery
|
|
243
|
+
* outside `own` is skipped -- it ranks nothing, so it cannot displace an own suspect.
|
|
244
|
+
*/
|
|
245
|
+
function readCausingSet(at, gate, deps, own) {
|
|
76
246
|
try {
|
|
77
247
|
const worktreePath = deps.resolveWorktreePath(at.focusId);
|
|
78
248
|
if (worktreePath === null)
|
|
@@ -90,9 +260,10 @@ function readCausingSet(at, gate, deps) {
|
|
|
90
260
|
// listReviewWindowCommits answers newest first; the order IS the ranking.
|
|
91
261
|
const causing = [];
|
|
92
262
|
for (const c of commits) {
|
|
93
|
-
if (c.attribution.kind
|
|
263
|
+
if (c.attribution.kind !== 'delivery' || !own.has(c.attribution.deliveryId))
|
|
264
|
+
continue;
|
|
265
|
+
if (!causing.includes(c.attribution.deliveryId))
|
|
94
266
|
causing.push(c.attribution.deliveryId);
|
|
95
|
-
}
|
|
96
267
|
}
|
|
97
268
|
return causing;
|
|
98
269
|
}
|
|
@@ -101,56 +272,29 @@ function readCausingSet(at, gate, deps) {
|
|
|
101
272
|
}
|
|
102
273
|
}
|
|
103
274
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* owns that case)
|
|
275
|
+
* The ONE delivery the rework Bug for a failed commit belongs on, asked by a pass
|
|
276
|
+
* that holds ONE delivery of the focus (module doc): the SAME ladder
|
|
277
|
+
* {@link selectReworkOwner} runs for the per-focus filer, over the focus's deliveries
|
|
278
|
+
* read here, so every asker and both doors name one owner -- and the asker files on
|
|
279
|
+
* THAT delivery rather than declining, so an owner that will never ask (a done or
|
|
280
|
+
* paused one, a sibling in coding) still receives the Bug. A focus read that fails
|
|
281
|
+
* answers 'unreadable' and files nothing this poll (the retry owns that case): without
|
|
282
|
+
* it a foreign trailer cannot be told from an own one. Never throws.
|
|
111
283
|
*/
|
|
112
|
-
export async function
|
|
113
|
-
|
|
114
|
-
if (ownership === null)
|
|
115
|
-
return await ownsUnattributable(deliveryId, at, deps);
|
|
116
|
-
const owns = deliveryId === ownership.owningDeliveryId;
|
|
117
|
-
if (!owns) {
|
|
118
|
-
const why = ownership.causingNewestFirst.length > 0
|
|
119
|
-
? `the newest commit in the judged range is ${ownership.owningDeliveryId}'s`
|
|
120
|
-
: `${ownership.rangeRead ? 'no delivery\'s commits explain it' : 'it could not be attributed'}, so it stays with the `
|
|
121
|
-
+ `delivery whose run rendered it (${ownership.judgedDeliveryId})`;
|
|
122
|
-
const alsoIn = ownership.causingNewestFirst.filter((id) => id !== ownership.owningDeliveryId);
|
|
123
|
-
log.info(`[verification] rework issue: delivery ${deliveryId} shares the failed verdict for ${at.sha.slice(0, 12)} but does not `
|
|
124
|
-
+ `carry it -- ${why}`
|
|
125
|
-
+ (alsoIn.length > 0 ? ` (also committed in that range: ${alsoIn.join(', ')})` : ''));
|
|
126
|
-
}
|
|
127
|
-
return owns;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Rung 3 for a caller holding ONE delivery: read the focus's candidates and settle the
|
|
131
|
-
* failure over them, so the answer is the set's, not the asker's (module doc). A read
|
|
132
|
-
* that fails, or that does not list this delivery, DECLINES -- one poll of nobody,
|
|
133
|
-
* which retryOwedReworkIssue retries -- rather than letting a sibling reading a
|
|
134
|
-
* different set assume it owns the red too.
|
|
135
|
-
*/
|
|
136
|
-
async function ownsUnattributable(deliveryId, at, deps) {
|
|
137
|
-
let candidates;
|
|
284
|
+
export async function resolveReworkOwner(at, deps) {
|
|
285
|
+
let deliveries;
|
|
138
286
|
try {
|
|
139
|
-
|
|
287
|
+
deliveries = await deps.listFocusDeliveries(at.focusId);
|
|
140
288
|
}
|
|
141
289
|
catch (err) {
|
|
142
|
-
log.warn(`[verification] rework issue: the
|
|
143
|
-
+
|
|
144
|
-
return
|
|
145
|
-
}
|
|
146
|
-
const owner = unattributableOwner(candidates);
|
|
147
|
-
if (owner !== deliveryId) {
|
|
148
|
-
log.info(`[verification] rework issue: delivery ${deliveryId} shares the failed verdict for ${at.sha.slice(0, 12)}, which `
|
|
149
|
-
+ `nothing attributes -- the focus's verify set settles it on ${owner}`);
|
|
150
|
-
return false;
|
|
290
|
+
log.warn(`[verification] rework issue: the focus's deliveries could not be read to attribute the failed verdict for `
|
|
291
|
+
+ `${at.sha.slice(0, 12)} -- nothing is filed this poll (the owed filing is retried):`, err.message);
|
|
292
|
+
return 'unreadable';
|
|
151
293
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
294
|
+
const choice = chooseReworkOwner(deliveries, at, deps);
|
|
295
|
+
log.info(`[verification] rework issue: the failed verdict for ${at.sha.slice(0, 12)} belongs on ${choice.owner ?? 'nobody'} -- ${choice.why}`);
|
|
296
|
+
if (choice.owner === null)
|
|
297
|
+
return null;
|
|
298
|
+
return deliveries.find((d) => d.id === choice.owner) ?? null;
|
|
155
299
|
}
|
|
156
300
|
//# sourceMappingURL=rework-attribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rework-attribution.js","sourceRoot":"","sources":["../../../src/verify/attribution/rework-attribution.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oGAAoG;AACpG,uEAAuE;AACvE,iFAAiF;AACjF,gBAAgB;
|
|
1
|
+
{"version":3,"file":"rework-attribution.js","sourceRoot":"","sources":["../../../src/verify/attribution/rework-attribution.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oGAAoG;AACpG,0FAA0F;AAC1F,uEAAuE;AACvE,iFAAiF;AACjF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+GG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAQrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IACrE,eAAe,CAAC,MAAM;IACtB,eAAe,CAAC,MAAM;IACtB,eAAe,CAAC,MAAM;IACtB,eAAe,CAAC,aAAa;CAC9B,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAwB,IAAI,GAAG,CAAC;IACzE,eAAe,CAAC,IAAI;IACpB,eAAe,CAAC,MAAM;CACvB,CAAC,CAAC;AAEH,uFAAuF;AACvF,MAAM,UAAU,gBAAgB,CAAC,MAAiC;IAChE,OAAO,8BAA8B,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;AAC1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ACjB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAKD;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EAAgB,EAAE,IAA2B;IACpF,IAAI,UAAwC,CAAC;IAC7C,IAAI,CAAC;QACH,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CACN,4GAA4G;cAC1G,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,8DAA8D,EACrF,GAAa,CAAC,OAAO,CACvB,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,MAAM,MAAM,GAAG,iBAAiB,CAAC,UAAU,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACvD,GAAG,CAAC,IAAI,CAAC,uDAAuD,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,MAAM,CAAC,KAAK,IAAI,QAAQ,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/I,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;AAC/D,CAAC"}
|
|
@@ -58,6 +58,15 @@ export declare function readCommitVerdict(productId: string, focusId: string, sh
|
|
|
58
58
|
gate?: CommitVerdictGate;
|
|
59
59
|
dir?: string;
|
|
60
60
|
}): CommitVerdict | null;
|
|
61
|
+
/**
|
|
62
|
+
* Every verdict recorded for the focus, at every commit and under every gate
|
|
63
|
+
* (unordered; empty when the focus has none readable). Read from the record files
|
|
64
|
+
* themselves, so no history is walked -- a judged commit any number of commits
|
|
65
|
+
* behind HEAD, or rebased out of it, is still listed.
|
|
66
|
+
*/
|
|
67
|
+
export declare function listFocusVerdicts(productId: string, focusId: string, opts?: {
|
|
68
|
+
dir?: string;
|
|
69
|
+
}): CommitVerdict[];
|
|
61
70
|
/** Write a verdict atomically. Best-effort: returns false (and logs) when the write failed. */
|
|
62
71
|
export declare function writeCommitVerdict(verdict: CommitVerdict, dir?: string): boolean;
|
|
63
72
|
/**
|