@telora/daemon 0.23.32 → 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 +4 -3
- 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.js +1 -1
- 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/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/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.js +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-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 -20
- package/dist/git/types.js.map +1 -1
- package/dist/prompt-sections/qa-author-section.d.ts +7 -3
- package/dist/prompt-sections/qa-author-section.d.ts.map +1 -1
- package/dist/prompt-sections/qa-author-section.js +52 -15
- package/dist/prompt-sections/qa-author-section.js.map +1 -1
- package/dist/qa/qa-author-faithfulness.d.ts +86 -14
- package/dist/qa/qa-author-faithfulness.d.ts.map +1 -1
- package/dist/qa/qa-author-faithfulness.js +213 -47
- package/dist/qa/qa-author-faithfulness.js.map +1 -1
- package/dist/qa/qa-author-output.d.ts +6 -3
- package/dist/qa/qa-author-output.d.ts.map +1 -1
- package/dist/qa/qa-author-output.js.map +1 -1
- package/dist/qa/qa-author-pass.d.ts +8 -5
- package/dist/qa/qa-author-pass.d.ts.map +1 -1
- package/dist/qa/qa-author-pass.js +4 -3
- package/dist/qa/qa-author-pass.js.map +1 -1
- package/dist/qa/qa-author-runner.d.ts.map +1 -1
- package/dist/qa/qa-author-runner.js +15 -10
- package/dist/qa/qa-author-runner.js.map +1 -1
- package/dist/queries/deliveries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries/deliveries.js +1 -20
- 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/qa-packets/qa-packets.d.ts +74 -1
- package/dist/queries/qa-packets/qa-packets.d.ts.map +1 -1
- package/dist/queries/qa-packets/qa-packets.js +28 -2
- package/dist/queries/qa-packets/qa-packets.js.map +1 -1
- 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/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 +15 -4
- package/dist/types/qa-packet.d.ts.map +1 -1
- package/dist/types/qa-packet.js +18 -4
- package/dist/types/qa-packet.js.map +1 -1
- 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
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*
|
|
5
5
|
* THE WEDGE. An armed focus (assigned_agent_role_id set, not operator-stopped)
|
|
6
6
|
* whose worktree HEAD carries a FAILED gate verdict, with no review window open
|
|
7
|
-
* (review_requested_at null), no live team, and no
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* (review_requested_at null), no live team, and no rework Bug for that commit on
|
|
8
|
+
* any of its deliveries. Every red verdict at the head owes exactly one such Bug,
|
|
9
|
+
* keyed on the commit -- unrelated open work, even owed work, does not stand in for
|
|
10
|
+
* it, because it names nothing about the red. Nothing else files it in that state:
|
|
11
|
+
* no review re-fires (no window), and no team is live to be told. Every path that
|
|
11
12
|
* routes a failed verdict -- the verification feedback filing, the review exit
|
|
12
13
|
* (review-exit-verdict-gate.ts closeFailedVerdictExit), the declined-head path and
|
|
13
14
|
* the stranded-review reroute -- files its rework Bug before the window closes; this
|
|
@@ -16,14 +17,27 @@
|
|
|
16
17
|
* WHAT IT DOES. It files the rework Bug for the head's failed verdict through the
|
|
17
18
|
* SAME filing those paths use (verify/outcome-routing/verification-rework-issue.ts
|
|
18
19
|
* fileReworkForFailedVerdict: deduped per commit across the focus, attributed to
|
|
19
|
-
* one owner), and logs that the wedge was found and what the filing did. The
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* one owner), and logs that the wedge was found and what the filing did. The owner
|
|
21
|
+
* is chosen from every non-cancelled delivery of the focus, whatever status it holds
|
|
22
|
+
* at the instant of reading -- a reconciler walk through verify_failed -> coding ->
|
|
23
|
+
* verify can leave verify empty for a second, and a done or paused owner is re-opened
|
|
24
|
+
* with its Bug. The Bug is owed work, so its delivery is routed on and the next
|
|
25
|
+
* coding pass fixes the failure.
|
|
26
|
+
*
|
|
27
|
+
* A FILED BUG ON A DELIVERY NOTHING ROUTES. The re-open of a done or paused owner is
|
|
28
|
+
* a second write after the Bug's create, and the filing settles on the create: a
|
|
29
|
+
* re-open that failed leaves the head's Bug OPEN on a done or paused delivery, which
|
|
30
|
+
* no pass routes and no spawn reads as work. So a head Bug found open on a done or
|
|
31
|
+
* paused delivery is not "filed" here -- its re-open is still owed, and this pass
|
|
32
|
+
* retries it (the same re-open, verify/outcome-routing/gate-rework-reopen.ts) every
|
|
33
|
+
* FAILED_HEAD_WEDGE_RETRY_MS, naming each attempt, until the delivery leaves done or
|
|
34
|
+
* paused. Nothing is filed again: the Bug exists.
|
|
22
35
|
*
|
|
23
36
|
* WHAT IT NEVER DOES. File on an unarmed or operator-stopped focus (an arm is the
|
|
24
37
|
* go-signal for spending a coding pass), on a read-only focus (no gate runs there),
|
|
25
38
|
* while a review window is open or a team is live (those own the next step), or
|
|
26
|
-
*
|
|
39
|
+
* when the head's commit already carries its rework Bug on the focus (it re-opens
|
|
40
|
+
* that Bug's settled carrier instead, above).
|
|
27
41
|
*
|
|
28
42
|
* Cost: the verdict read is a local file; delivery and issue reads happen only for a
|
|
29
43
|
* focus whose head verdict FAILED. Per (focus, head) the filing is attempted at most
|
|
@@ -35,7 +49,8 @@
|
|
|
35
49
|
*/
|
|
36
50
|
import type { CommitVerdict } from '../verify/gate-verdicts/commit-verdict-record.js';
|
|
37
51
|
import { type FailedVerdictReworkResult } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
38
|
-
import { type
|
|
52
|
+
import { type ReworkDeliveryRow } from '../verify/attribution/rework-attribution.js';
|
|
53
|
+
import type { GateReworkReopen } from '../verify/outcome-routing/gate-rework-reopen.js';
|
|
39
54
|
/** Minimum spacing of filing attempts for one (focus, head) the filing did not settle. */
|
|
40
55
|
export declare const FAILED_HEAD_WEDGE_RETRY_MS = 60000;
|
|
41
56
|
/** The focus slice the pass reads (queries/focuses/focus-discovery.ts ActiveFocusRow). */
|
|
@@ -57,33 +72,47 @@ export interface FailedHeadWedgeDeps {
|
|
|
57
72
|
readCommitVerdict: (productId: string, focusId: string, sha: string) => CommitVerdict | null;
|
|
58
73
|
getFocusDeliveries: (focusId: string) => Promise<ReadonlyArray<{
|
|
59
74
|
id: string;
|
|
75
|
+
executionStatus?: string | null;
|
|
60
76
|
}>>;
|
|
61
77
|
getDeliveryIssues: (deliveryId: string) => Promise<ReadonlyArray<{
|
|
62
78
|
id: string;
|
|
79
|
+
title: string;
|
|
63
80
|
status: string;
|
|
64
81
|
issueType: string;
|
|
65
82
|
}>>;
|
|
66
|
-
readRecordedConcernIds: RecordedConcernReader;
|
|
67
83
|
/** The per-focus rework filing every failed-verdict path uses (fileReworkForFailedVerdict). */
|
|
68
84
|
fileReworkForFailedVerdict: (focusId: string, verdict: CommitVerdict) => Promise<FailedVerdictReworkResult>;
|
|
85
|
+
/** The re-open the filing owes a done or paused Bug carrier (gate-rework-reopen.ts reopenForGateRework). */
|
|
86
|
+
reopenForRework: (delivery: ReworkDeliveryRow) => Promise<GateReworkReopen>;
|
|
69
87
|
now: () => number;
|
|
70
88
|
}
|
|
71
89
|
/** Test seam: forget every attempt. */
|
|
72
90
|
export declare function __resetFailedHeadWedgeForTests(): void;
|
|
73
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Why a focus is not in the wedge, or the failed verdict that wedges it -- with
|
|
93
|
+
* `reopenOwed` when its Bug is filed but sits open on a done or paused delivery
|
|
94
|
+
* whose re-open never landed. Never throws.
|
|
95
|
+
*/
|
|
74
96
|
export type WedgeReading = {
|
|
75
97
|
wedged: false;
|
|
76
|
-
why: 'unarmed' | 'read_only' | 'review_window' | 'live_team' | 'no_head' | 'head_not_failed' | '
|
|
98
|
+
why: 'unarmed' | 'read_only' | 'review_window' | 'live_team' | 'no_head' | 'head_not_failed' | 'rework_filed' | 'unreadable';
|
|
99
|
+
} | {
|
|
100
|
+
wedged: true;
|
|
101
|
+
head: string;
|
|
102
|
+
verdict: CommitVerdict;
|
|
103
|
+
reopenOwed?: undefined;
|
|
77
104
|
} | {
|
|
78
105
|
wedged: true;
|
|
79
106
|
head: string;
|
|
80
107
|
verdict: CommitVerdict;
|
|
108
|
+
reopenOwed: ReworkDeliveryRow;
|
|
81
109
|
};
|
|
82
110
|
/** Read whether one focus is in the failed-head wedge (module header). Never throws. */
|
|
83
111
|
export declare function readFailedHeadWedge(focus: WedgeFocusRow, productId: string, deps: FailedHeadWedgeDeps): Promise<WedgeReading>;
|
|
84
112
|
/**
|
|
85
113
|
* The backstop pass over one product's active focuses (module header). Returns the
|
|
86
|
-
* filing result per focus it
|
|
114
|
+
* filing result per focus it filed for (a retried re-open files nothing, and is
|
|
115
|
+
* logged). Never throws.
|
|
87
116
|
*/
|
|
88
117
|
export declare function fileReworkForFailedHeadWedges(config: {
|
|
89
118
|
organizationId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failed-head-wedge.d.ts","sourceRoot":"","sources":["../../src/focus/failed-head-wedge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"failed-head-wedge.d.ts","sourceRoot":"","sources":["../../src/focus/failed-head-wedge.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAOxF,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,0FAA0F;AAC1F,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAA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
// Pinned by: packages/daemon/src/focus/failed-head-wedge.test.ts,
|
|
3
|
+
// packages/daemon/src/integration/red-head-integration-merge-rework-regression.test.ts
|
|
3
4
|
// PINNED-BY-END
|
|
4
5
|
import { describeFailedVerdictRework, } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
5
|
-
import {
|
|
6
|
-
import { filterWorkIssues } from '../types/issue-status.js';
|
|
6
|
+
import { reopensForRework } from '../verify/attribution/rework-attribution.js';
|
|
7
|
+
import { filterWorkIssues, REWORK_ISSUE_TITLE_PREFIX } from '../types/issue-status.js';
|
|
8
|
+
import { NO_RECORDED_CONCERNS, splitOpenWork } from '../delivery/recorded-concerns.js';
|
|
7
9
|
import { createLogger } from '../log/daemon-log.js';
|
|
8
10
|
const log = createLogger({ module: 'focus-poller' });
|
|
9
11
|
/** Minimum spacing of filing attempts for one (focus, head) the filing did not settle. */
|
|
@@ -31,11 +33,18 @@ export async function readFailedHeadWedge(focus, productId, deps) {
|
|
|
31
33
|
const verdict = deps.readCommitVerdict(productId, focus.focus_id, head);
|
|
32
34
|
if (verdict?.outcome !== 'failed')
|
|
33
35
|
return { wedged: false, why: 'head_not_failed' };
|
|
34
|
-
|
|
36
|
+
// The head commit's rework Bug, open or closed, anywhere on the focus: filed already --
|
|
37
|
+
// unless it sits open on a done or paused delivery, whose owed re-open never landed.
|
|
38
|
+
const commitPrefix = `${REWORK_ISSUE_TITLE_PREFIX} ${head.slice(0, 12)}:`;
|
|
35
39
|
for (const delivery of await deps.getFocusDeliveries(focus.focus_id)) {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
|
|
40
|
+
const bugs = filterWorkIssues([...await deps.getDeliveryIssues(delivery.id)]).filter((i) => i.title.startsWith(commitPrefix));
|
|
41
|
+
if (bugs.length === 0)
|
|
42
|
+
continue;
|
|
43
|
+
// Owed as work is the one definition; a gate rework Bug is never a recorded concern.
|
|
44
|
+
if (reopensForRework(delivery.executionStatus) && splitOpenWork(bugs, NO_RECORDED_CONCERNS).owed.length > 0) {
|
|
45
|
+
return { wedged: true, head, verdict, reopenOwed: { id: delivery.id, executionStatus: delivery.executionStatus ?? null } };
|
|
46
|
+
}
|
|
47
|
+
return { wedged: false, why: 'rework_filed' };
|
|
39
48
|
}
|
|
40
49
|
return { wedged: true, head, verdict };
|
|
41
50
|
}
|
|
@@ -44,9 +53,25 @@ export async function readFailedHeadWedge(focus, productId, deps) {
|
|
|
44
53
|
return { wedged: false, why: 'unreadable' };
|
|
45
54
|
}
|
|
46
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Retry the re-open a filed Bug's done or paused carrier is owed (module header),
|
|
58
|
+
* naming what it did. Never throws: a failure is retried after the spacing.
|
|
59
|
+
*/
|
|
60
|
+
async function retryOwedReopen(focus, head, carrier, deps) {
|
|
61
|
+
const what = `"${focus.focus_name}": the rework Bug for its FAILED head ${head.slice(0, 12)} sits open on `
|
|
62
|
+
+ `${carrier.executionStatus} delivery ${carrier.id}, which was never re-opened (no team routes it)`;
|
|
63
|
+
try {
|
|
64
|
+
const outcome = await deps.reopenForRework(carrier);
|
|
65
|
+
log.warn(`[focus-poller] ${what} -- re-open retried: ${outcome}`);
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
log.warn(`[focus-poller] ${what} -- re-open failed again (retried in ${FAILED_HEAD_WEDGE_RETRY_MS / 1000}s): ${err.message}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
47
71
|
/**
|
|
48
72
|
* The backstop pass over one product's active focuses (module header). Returns the
|
|
49
|
-
* filing result per focus it
|
|
73
|
+
* filing result per focus it filed for (a retried re-open files nothing, and is
|
|
74
|
+
* logged). Never throws.
|
|
50
75
|
*/
|
|
51
76
|
export async function fileReworkForFailedHeadWedges(config, deps) {
|
|
52
77
|
const acted = [];
|
|
@@ -62,9 +87,19 @@ export async function fileReworkForFailedHeadWedges(config, deps) {
|
|
|
62
87
|
const reading = await readFailedHeadWedge(focus, config.productId, deps);
|
|
63
88
|
if (!reading.wedged)
|
|
64
89
|
continue;
|
|
90
|
+
const now = deps.now();
|
|
91
|
+
if (reading.reopenOwed) {
|
|
92
|
+
// Spaced, never settled: the carrier leaving done or paused is what ends it.
|
|
93
|
+
const reopenKey = `${focus.focus_id}@${reading.head}#reopen`;
|
|
94
|
+
const last = attempts.get(reopenKey);
|
|
95
|
+
if (last && now - last.at < FAILED_HEAD_WEDGE_RETRY_MS)
|
|
96
|
+
continue;
|
|
97
|
+
attempts.set(reopenKey, { settled: false, at: now });
|
|
98
|
+
await retryOwedReopen(focus, reading.head, reading.reopenOwed, deps);
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
65
101
|
const key = `${focus.focus_id}@${reading.head}`;
|
|
66
102
|
const prior = attempts.get(key);
|
|
67
|
-
const now = deps.now();
|
|
68
103
|
if (prior?.settled || (prior && now - prior.at < FAILED_HEAD_WEDGE_RETRY_MS))
|
|
69
104
|
continue;
|
|
70
105
|
try {
|
|
@@ -73,7 +108,7 @@ export async function fileReworkForFailedHeadWedges(config, deps) {
|
|
|
73
108
|
attempts.set(key, { settled, at: now });
|
|
74
109
|
acted.push({ focusId: focus.focus_id, result });
|
|
75
110
|
log.warn(`[focus-poller] "${focus.focus_name}" was WEDGED: armed, FAILED gate verdict at its head ${reading.head.slice(0, 12)}, ` +
|
|
76
|
-
`no review window, no
|
|
111
|
+
`no review window, no live team, no rework Bug for it yet -- ${describeFailedVerdictRework(result)}`);
|
|
77
112
|
}
|
|
78
113
|
catch (err) {
|
|
79
114
|
attempts.set(key, { settled: false, at: now });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failed-head-wedge.js","sourceRoot":"","sources":["../../src/focus/failed-head-wedge.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"failed-head-wedge.js","sourceRoot":"","sources":["../../src/focus/failed-head-wedge.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,kEAAkE;AAClE,yFAAyF;AACzF,gB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G,0BAA0B,CAAC;YAAE,SAAS;QACvF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACtF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,eAAe,CAAC,CAAC;YACjH,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAChD,GAAG,CAAC,IAAI,CACN,mBAAmB,KAAK,CAAC,UAAU,wDAAwD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI;gBACxH,+DAA+D,2BAA2B,CAAC,MAAM,CAAC,EAAE,CACrG,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YAC/C,GAAG,CAAC,IAAI,CAAC,mBAAmB,KAAK,CAAC,UAAU,wDAAyD,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAChI,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 26 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/focus/focus-poller-spawn.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
import { resolveReadyFocusSpawnAction } from './ready-focus-spawn-action.js';
|
|
5
5
|
import { roles, pollState, idleLoggedFocuses, nullRoleSkipWarnedFocuses, lastRolesRefreshAt, healthCheckConsecutiveFailures, POLL_INTERVAL_MS, ROLES_REFRESH_INTERVAL_MS, setPollState, setLastRolesRefreshAt, setLastReadyFocusCount, } from './focus-poller-state.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 24 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/focus/focus-poller-state.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/** Polling interval in milliseconds (default: 30 seconds). */
|
|
5
5
|
export const POLL_INTERVAL_MS = 30000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-spawn-review-next-step.d.ts","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pending-spawn-review-next-step.d.ts","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"AA2FA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAKlF,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,iDAAiD,CAAC;AAKzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAI9E,wGAAwG;AACxG,eAAO,MAAM,0BAA0B,QAAc,CAAC;AAEtD,+FAA+F;AAC/F,eAAO,MAAM,uCAAuC,QAAc,CAAC;AAEnE,kHAAkH;AAClH,eAAO,MAAM,sCAAsC,QAAc,CAAC;AAElE,kFAAkF;AAClF,eAAO,MAAM,6BAA6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9C,wBAAgB,oCAAoC,IAAI,IAAI,CAE3D;AAiCD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,wBAAwB,GAAG,sBAAsB,CAkC1G;AAED;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE;IAAE,gBAAgB,EAAE,wBAAwB,CAAA;CAAE,GACnD,OAAO,CAAC,IAAI,CAAC,CAEf;AAmKD;;;;;;;;GAQG;AACH,wBAAsB,oCAAoC,CACxD,KAAK,EAAE,+BAA+B,EACtC,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,OAAO,CAAC,CAoBlB"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// packages/daemon/src/focus/pending-review-approved-head.test.ts,
|
|
7
7
|
// packages/daemon/src/focus/pending-spawn-review-next-step.test.ts,
|
|
8
8
|
// packages/daemon/src/focus/unchanged-reviewed-head.test.ts,
|
|
9
|
+
// packages/daemon/src/focus/uncommitted-work-backstop.test.ts,
|
|
9
10
|
// packages/daemon/src/integration/approved-head-gate-failure-respawn-regression.test.ts,
|
|
10
11
|
// packages/daemon/src/integration/approved-head-hold-release-regression.test.ts,
|
|
11
12
|
// packages/daemon/src/integration/failed-verdict-review-exit-respawn-regression.test.ts,
|
|
@@ -35,6 +36,12 @@
|
|
|
35
36
|
* for it until verify re-judges a changed delivery commit set (or a ruling) and
|
|
36
37
|
* releases the park.
|
|
37
38
|
*
|
|
39
|
+
* The coding respawn the daemon itself queues to finish a teamless armed focus's
|
|
40
|
+
* UNCOMMITTED work (directive/directive-queue.ts queueDaemonCodingRespawn, purpose
|
|
41
|
+
* 'uncommitted_work'; focus/uncommitted-work-backstop.ts) is never dropped here
|
|
42
|
+
* either: a review judges the HEAD, and the work is not in it -- the next step is
|
|
43
|
+
* the coding lead that commits it, whatever the deliveries' statuses say.
|
|
44
|
+
*
|
|
38
45
|
* A REVIEW-lineage directive is never dropped here: it is the next step. When the
|
|
39
46
|
* deliveries or issues cannot be read, the directive is DEFERRED: it stays queued
|
|
40
47
|
* and nothing spawns this poll. Spawning the coding lead on an unreadable state
|
|
@@ -327,7 +334,8 @@ async function deferOrExpire(focus, pending, read, deps) {
|
|
|
327
334
|
*/
|
|
328
335
|
export async function pendingCodingSpawnSupersededByReview(focus, deps) {
|
|
329
336
|
const pending = getPendingSpawnDirective(focus.focus_id);
|
|
330
|
-
|
|
337
|
+
// A review is next, or the queued coding lead is the one that commits uncommitted work (module header).
|
|
338
|
+
if (!pending || pending.lineage === 'review' || pending.purpose === 'uncommitted_work')
|
|
331
339
|
return false;
|
|
332
340
|
const read = await readReviewNextStep(focus, deps);
|
|
333
341
|
if (read.next === 'unreadable')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-spawn-review-next-step.js","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oFAAoF;AACpF,kEAAkE;AAClE,uEAAuE;AACvE,8DAA8D;AAC9D,oEAAoE;AACpE,sEAAsE;AACtE,+DAA+D;AAC/D,2FAA2F;AAC3F,mFAAmF;AACnF,2FAA2F;AAC3F,mFAAmF;AACnF,gFAAgF;AAChF,iEAAiE;AACjE,gBAAgB;AAEhB
|
|
1
|
+
{"version":3,"file":"pending-spawn-review-next-step.js","sourceRoot":"","sources":["../../src/focus/pending-spawn-review-next-step.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oFAAoF;AACpF,kEAAkE;AAClE,uEAAuE;AACvE,8DAA8D;AAC9D,oEAAoE;AACpE,sEAAsE;AACtE,+DAA+D;AAC/D,iEAAiE;AACjE,2FAA2F;AAC3F,mFAAmF;AACnF,2FAA2F;AAC3F,mFAAmF;AACnF,gFAAgF;AAChF,iEAAiE;AACjE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAO,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,kBAAkB;QAAE,OAAO,KAAK,CAAC;IACrG,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACnD,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACjF,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,iDAAiD;IACjF,MAAM,IAAI,GAAG,YAAY,CAAC,6BAA6B,EAAE;QACvD,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,0BAA0B;KACtE,CAAC,CAAC;IACH,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAC1C,0BAA0B,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3C,GAAG,CAAC,IAAI,CACN,IAAI,CAAC,IAAI,KAAK,QAAQ;QACpB,CAAC,CAAC,kCAAkC,OAAO,CAAC,WAAW,mBAAmB,KAAK,CAAC,UAAU,6BAA6B;YACrH,wHAAwH;QAC1H,CAAC,CAAC,kCAAkC,OAAO,CAAC,WAAW,mBAAmB,KAAK,CAAC,UAAU,4BAA4B;YACpH,8GAA8G,CACnH,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { PipelineConfig } from '../types/index.js';
|
|
2
|
+
import type { CreateEscalationParams } from '../supervision/escalation-filing.js';
|
|
3
|
+
import type { DeliveryGateRowIo } from '../queries/deliveries/deliveries.js';
|
|
4
|
+
/** How long the state must stand, teamless, before the pass acts (and again before it records). */
|
|
5
|
+
export declare const UNCOMMITTED_WORK_GRACE_MS: number;
|
|
6
|
+
/** How long a queued respawn may wait to spawn (cooldown, a parked guard) before the record is filed anyway. */
|
|
7
|
+
export declare const UNCOMMITTED_WORK_RESPAWN_WAIT_MS: number;
|
|
8
|
+
/** At most this many paths are named in the respawn prompt and the record; the count carries the rest. */
|
|
9
|
+
export declare const UNCOMMITTED_WORK_PATH_CAP = 20;
|
|
10
|
+
/** The focus slice the pass reads (queries/focuses/focus-discovery.ts ActiveFocusRow). */
|
|
11
|
+
export interface UncommittedWorkFocusRow {
|
|
12
|
+
focus_id: string;
|
|
13
|
+
focus_name: string;
|
|
14
|
+
assigned_agent_role_id: string | null;
|
|
15
|
+
operator_stopped_at?: string | null;
|
|
16
|
+
read_only?: boolean | null;
|
|
17
|
+
pipeline_config?: PipelineConfig | null;
|
|
18
|
+
}
|
|
19
|
+
/** The coding respawn the pass queues (directive/directive-queue.ts queueDaemonCodingRespawn). */
|
|
20
|
+
export interface CodingRespawnRequest {
|
|
21
|
+
focusId: string;
|
|
22
|
+
message: string;
|
|
23
|
+
contentHash: string;
|
|
24
|
+
focusOverrideModel: string | null;
|
|
25
|
+
}
|
|
26
|
+
/** What the record names. */
|
|
27
|
+
export interface UncommittedWorkRecord {
|
|
28
|
+
organizationId: string;
|
|
29
|
+
focusId: string;
|
|
30
|
+
focusName: string;
|
|
31
|
+
worktreePath: string;
|
|
32
|
+
paths: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
/** The pass's collaborators, every one REQUIRED (composition/runtime-poll-context.ts binds them). */
|
|
35
|
+
export interface UncommittedWorkBackstopDeps {
|
|
36
|
+
getActiveFocuses: (organizationId: string, productId: string) => Promise<readonly UncommittedWorkFocusRow[]>;
|
|
37
|
+
/** Whether a team process is live for the focus on this host. */
|
|
38
|
+
hasLiveTeam: (focusId: string) => boolean;
|
|
39
|
+
/** The focus worktree, or null when the daemon holds none. */
|
|
40
|
+
resolveWorktreePath: (focusId: string) => string | null;
|
|
41
|
+
listUncommittedPaths: (worktreePath: string) => readonly string[];
|
|
42
|
+
/** Queue the respawn unless a spawn directive is already queued; true when this call queued it. */
|
|
43
|
+
queueCodingRespawn: (request: CodingRespawnRequest) => boolean;
|
|
44
|
+
/** Whether a spawn directive is still queued for the focus (the respawn has not spawned yet). */
|
|
45
|
+
hasQueuedSpawn: (focusId: string) => boolean;
|
|
46
|
+
/** Withdraw this pass's own queued respawn (and nothing else); true when one was withdrawn. */
|
|
47
|
+
withdrawCodingRespawn: (focusId: string) => boolean;
|
|
48
|
+
/** File the record (deduped per focus by the caller's binding); never throws past its own logging. */
|
|
49
|
+
recordUncommittedWork: (record: UncommittedWorkRecord) => Promise<void>;
|
|
50
|
+
/** Close the record once the worktree is clean; the count closed. */
|
|
51
|
+
resolveRecord: (focusId: string) => Promise<number>;
|
|
52
|
+
now: () => number;
|
|
53
|
+
}
|
|
54
|
+
/** Test seam: forget every episode. */
|
|
55
|
+
export declare function __resetUncommittedWorkBackstopForTests(): void;
|
|
56
|
+
/** What the pass did for one focus. */
|
|
57
|
+
export type UncommittedWorkAction = {
|
|
58
|
+
kind: 'respawned';
|
|
59
|
+
paths: readonly string[];
|
|
60
|
+
queued: boolean;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'recorded';
|
|
63
|
+
paths: readonly string[];
|
|
64
|
+
} | {
|
|
65
|
+
kind: 'cleared';
|
|
66
|
+
resolved: number;
|
|
67
|
+
};
|
|
68
|
+
/** The respawned team's directive: what is uncommitted and what finishes it. Pure. */
|
|
69
|
+
export declare function buildUncommittedWorkRespawnMessage(focusName: string, paths: readonly string[]): string;
|
|
70
|
+
/** The pass for one focus (module header). Never throws. */
|
|
71
|
+
export declare function checkUncommittedWork(focus: UncommittedWorkFocusRow, organizationId: string, deps: UncommittedWorkBackstopDeps): Promise<UncommittedWorkAction | null>;
|
|
72
|
+
/** The seams the operator-visible record goes through. */
|
|
73
|
+
export interface StrandedWorkRecordDeps {
|
|
74
|
+
getFocusDeliveries: (focusId: string) => Promise<ReadonlyArray<{
|
|
75
|
+
id: string;
|
|
76
|
+
executionStatus?: string | null;
|
|
77
|
+
}>>;
|
|
78
|
+
gateRowIo: DeliveryGateRowIo;
|
|
79
|
+
now: () => number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Write the OPERATOR-VISIBLE record (module header, step 2) on every cycling
|
|
83
|
+
* delivery of the focus: gate_state.advanceHold, reason worktree_uncommitted_no_team,
|
|
84
|
+
* naming the worktree and the paths. Returns how many rows carry it. Throws what a
|
|
85
|
+
* read or write throws (the pass retries).
|
|
86
|
+
*/
|
|
87
|
+
export declare function recordStrandedWorkOnFocus(record: UncommittedWorkRecord, deps: StrandedWorkRecordDeps): Promise<number>;
|
|
88
|
+
/** Clear the record from every delivery of the focus that carries it. Throws what a read or write throws. */
|
|
89
|
+
export declare function clearStrandedWorkOnFocus(focusId: string, deps: StrandedWorkRecordDeps): Promise<void>;
|
|
90
|
+
/** The filing seams the record goes through. */
|
|
91
|
+
export interface UncommittedWorkRecordDeps {
|
|
92
|
+
createEscalation: (params: CreateEscalationParams) => Promise<unknown>;
|
|
93
|
+
/** Whether a sibling worktree-dirty escalation is already open for the focus (one dirty tree, one row). */
|
|
94
|
+
hasOpenWorktreeDirtyEscalation: (focusId: string) => Promise<boolean>;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* File the record (module header, step 2): ONE agent-resolvable worktree-dirty
|
|
98
|
+
* observation naming the uncommitted paths, unless a sibling worktree-dirty row
|
|
99
|
+
* is already open for the focus. Committing or discarding the work is git work an
|
|
100
|
+
* agent session can do, so it proposes no human act. A failed dedupe read files
|
|
101
|
+
* (a genuine first record is not swallowed); a failed create throws to the caller.
|
|
102
|
+
*/
|
|
103
|
+
export declare function fileUncommittedWorkRecord(record: UncommittedWorkRecord, deps: UncommittedWorkRecordDeps): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* The backstop pass over one product's active focuses (module header). Returns
|
|
106
|
+
* what it did per focus it acted on. Never throws.
|
|
107
|
+
*/
|
|
108
|
+
export declare function recoverUncommittedWork(config: {
|
|
109
|
+
organizationId: string;
|
|
110
|
+
productId: string;
|
|
111
|
+
}, deps: UncommittedWorkBackstopDeps): Promise<Array<{
|
|
112
|
+
focusId: string;
|
|
113
|
+
action: UncommittedWorkAction;
|
|
114
|
+
}>>;
|
|
115
|
+
//# sourceMappingURL=uncommitted-work-backstop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uncommitted-work-backstop.d.ts","sourceRoot":"","sources":["../../src/focus/uncommitted-work-backstop.ts"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAElF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAK7E,mGAAmG;AACnG,eAAO,MAAM,yBAAyB,QAAa,CAAC;AAEpD,gHAAgH;AAChH,eAAO,MAAM,gCAAgC,QAAc,CAAC;AAE5D,0GAA0G;AAC1G,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,0FAA0F;AAC1F,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CACzC;AAED,kGAAkG;AAClG,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,6BAA6B;AAC7B,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB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