@telora/daemon 0.21.156 → 0.21.163
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 +7 -3
- package/dist/completion/review-cycle-delta.d.ts +74 -0
- package/dist/completion/review-cycle-delta.d.ts.map +1 -0
- package/dist/completion/review-cycle-delta.js +55 -0
- package/dist/completion/review-cycle-delta.js.map +1 -0
- package/dist/completion/review-defect-detector.d.ts +13 -0
- package/dist/completion/review-defect-detector.d.ts.map +1 -1
- package/dist/completion/review-defect-detector.js +39 -0
- package/dist/completion/review-defect-detector.js.map +1 -1
- package/dist/completion/review-exit-attribution.d.ts +35 -0
- package/dist/completion/review-exit-attribution.d.ts.map +1 -0
- package/dist/completion/review-exit-attribution.js +53 -0
- package/dist/completion/review-exit-attribution.js.map +1 -0
- package/dist/completion/review-exit-escalations.d.ts +21 -2
- package/dist/completion/review-exit-escalations.d.ts.map +1 -1
- package/dist/completion/review-exit-escalations.js +24 -10
- package/dist/completion/review-exit-escalations.js.map +1 -1
- package/dist/completion/review-exit-phase.d.ts +2 -1
- package/dist/completion/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit-phase.js +87 -43
- package/dist/completion/review-exit-phase.js.map +1 -1
- package/dist/completion/review-exit-progress.d.ts +30 -0
- package/dist/completion/review-exit-progress.d.ts.map +1 -0
- package/dist/completion/review-exit-progress.js +49 -0
- package/dist/completion/review-exit-progress.js.map +1 -0
- package/dist/delivery/delivery-reconciler.d.ts +20 -0
- package/dist/delivery/delivery-reconciler.d.ts.map +1 -1
- package/dist/delivery/delivery-reconciler.js +46 -11
- package/dist/delivery/delivery-reconciler.js.map +1 -1
- package/dist/queries/daemon-connection.d.ts +13 -0
- package/dist/queries/daemon-connection.d.ts.map +1 -1
- package/dist/queries/daemon-connection.js.map +1 -1
- package/dist/queries/focuses.d.ts +12 -0
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +19 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/shell/heartbeat.d.ts +26 -5
- package/dist/shell/heartbeat.d.ts.map +1 -1
- package/dist/shell/heartbeat.js +88 -7
- package/dist/shell/heartbeat.js.map +1 -1
- package/package.json +3 -3
package/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commitSha": "
|
|
3
|
-
"builtAt": "2026-08-
|
|
2
|
+
"commitSha": "c3792d41f",
|
|
3
|
+
"builtAt": "2026-08-25T13:36:54.563Z",
|
|
4
4
|
"expectedMigrations": [
|
|
5
5
|
"20250829113330_create_org_nodes_table.sql",
|
|
6
6
|
"20250829113402_fix_function_security_search_path.sql",
|
|
@@ -762,6 +762,10 @@
|
|
|
762
762
|
"20260819183306_add_durable_spawn_cooldown_columns.sql",
|
|
763
763
|
"20260819191559_add_durable_advancement_and_coverage_bounds.sql",
|
|
764
764
|
"20260821220144_focus_acceptance_criteria.sql",
|
|
765
|
-
"20260822233420_add_reality_tree_node_out_of_reach.sql"
|
|
765
|
+
"20260822233420_add_reality_tree_node_out_of_reach.sql",
|
|
766
|
+
"20260824230956_add_departed_at_to_daemon_connections.sql",
|
|
767
|
+
"20260824232230_add_stopping_to_daemon_connection_status.sql",
|
|
768
|
+
"20260824233556_add_belief_expires_at_to_daemon_connections.sql",
|
|
769
|
+
"20260824234248_cleanup_daemon_connections_reads_belief_lease.sql"
|
|
766
770
|
]
|
|
767
771
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Did a review-exit cycle change anything?
|
|
3
|
+
*
|
|
4
|
+
* The review-exit hand-off cap exists to bound a focus that keeps cycling
|
|
5
|
+
* reviews without converging. It was defeated because its RESET fired on
|
|
6
|
+
* `routedAny` -- ANY status write, including the verify -> verify_failed misroute
|
|
7
|
+
* that IS the empty loop. So the very event the cap exists to bound was scored as
|
|
8
|
+
* the progress that rearmed it, and the loop had two caps and no bound (it ran
|
|
9
|
+
* until a human disarmed the focus, 2026-08-24).
|
|
10
|
+
*
|
|
11
|
+
* This module is the discriminator the reset should have keyed on all along:
|
|
12
|
+
* whether a cycle produced a real DELTA in focus state, as opposed to writing a
|
|
13
|
+
* status and returning the focus to where it started. It is PURE and
|
|
14
|
+
* dependency-free so the decision is unit-testable without a live daemon, and so
|
|
15
|
+
* the reset and the bound both read the same definition.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately independent of WHY a cycle produced no delta: even with the
|
|
18
|
+
* attribution misroute fixed, a future no-delta cycle from some other cause must
|
|
19
|
+
* terminate. This is the backstop that makes the class survivable, not the
|
|
20
|
+
* specific fix that makes one instance correct.
|
|
21
|
+
*
|
|
22
|
+
* @module completion/review-cycle-delta
|
|
23
|
+
*/
|
|
24
|
+
/** The focus-state signals a review-exit cycle is judged a delta against. */
|
|
25
|
+
export interface ReviewCycleState {
|
|
26
|
+
/**
|
|
27
|
+
* The focus-branch tip this review pass actually covered (reviewSpawnTip), or
|
|
28
|
+
* null when the carry was lost (a daemon restart mid-review). This is the same
|
|
29
|
+
* `coveredSha` the coverage watermark is stamped from.
|
|
30
|
+
*/
|
|
31
|
+
coveredSha: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* The branch-tip watermark recorded by the PRIOR routed cycle
|
|
34
|
+
* (focus.reviewed_through_sha at handler entry, BEFORE this cycle re-stamps it).
|
|
35
|
+
* Equal to coveredSha => the branch has not moved since the last review pass.
|
|
36
|
+
*/
|
|
37
|
+
priorReviewedSha: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Whether any delivery CONVERGED to a terminal (done / auto-approved) this
|
|
40
|
+
* cycle. Convergence is progress even when the branch tip did not move.
|
|
41
|
+
*/
|
|
42
|
+
deliveryConverged: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether THIS review session filed new gap issues (its created_issue_ids is
|
|
45
|
+
* non-empty). Filing fresh, actionable gaps is progress on the FIRST cycle of a
|
|
46
|
+
* healthy re-iteration -- before the fix commit lands and moves the tip. A
|
|
47
|
+
* review that keeps stamping a verdict but files nothing new is not progress.
|
|
48
|
+
*/
|
|
49
|
+
issuesFiled: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Whether a review-exit cycle produced a real DELTA in focus state.
|
|
53
|
+
*
|
|
54
|
+
* A delta exists when ANY of:
|
|
55
|
+
* - a delivery converged to a terminal state this cycle (real forward motion,
|
|
56
|
+
* independent of the branch tip), OR
|
|
57
|
+
* - the review filed new gap issues this cycle (the first-cycle progress of a
|
|
58
|
+
* healthy re-iteration, before the fix commit lands), OR
|
|
59
|
+
* - the focus branch demonstrably ADVANCED since the last review (a new commit
|
|
60
|
+
* landed: coveredSha is resolved AND differs from the prior watermark). A
|
|
61
|
+
* lost carry (coveredSha null) is NOT proof of advance and does not count as
|
|
62
|
+
* a delta on its own, so the bound still applies to a focus that cannot even
|
|
63
|
+
* resolve its own tip.
|
|
64
|
+
*
|
|
65
|
+
* A pure verify -> verify_failed -> coding -> verify round trip that commits
|
|
66
|
+
* nothing, converges nothing, and files nothing satisfies none of these and is
|
|
67
|
+
* NOT a delta -- exactly the empty loop the hand-off cap must be allowed to bound.
|
|
68
|
+
*
|
|
69
|
+
* A healthy re-iteration is never falsely bounded: it files fresh gaps, converges
|
|
70
|
+
* a delivery, or commits a fix (advancing the tip), so it always registers a
|
|
71
|
+
* delta and the counter resets.
|
|
72
|
+
*/
|
|
73
|
+
export declare function reviewCycleProducedDelta(state: ReviewCycleState): boolean;
|
|
74
|
+
//# sourceMappingURL=review-cycle-delta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-cycle-delta.d.ts","sourceRoot":"","sources":["../../src/completion/review-cycle-delta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;;OAGG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAKzE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Did a review-exit cycle change anything?
|
|
3
|
+
*
|
|
4
|
+
* The review-exit hand-off cap exists to bound a focus that keeps cycling
|
|
5
|
+
* reviews without converging. It was defeated because its RESET fired on
|
|
6
|
+
* `routedAny` -- ANY status write, including the verify -> verify_failed misroute
|
|
7
|
+
* that IS the empty loop. So the very event the cap exists to bound was scored as
|
|
8
|
+
* the progress that rearmed it, and the loop had two caps and no bound (it ran
|
|
9
|
+
* until a human disarmed the focus, 2026-08-24).
|
|
10
|
+
*
|
|
11
|
+
* This module is the discriminator the reset should have keyed on all along:
|
|
12
|
+
* whether a cycle produced a real DELTA in focus state, as opposed to writing a
|
|
13
|
+
* status and returning the focus to where it started. It is PURE and
|
|
14
|
+
* dependency-free so the decision is unit-testable without a live daemon, and so
|
|
15
|
+
* the reset and the bound both read the same definition.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately independent of WHY a cycle produced no delta: even with the
|
|
18
|
+
* attribution misroute fixed, a future no-delta cycle from some other cause must
|
|
19
|
+
* terminate. This is the backstop that makes the class survivable, not the
|
|
20
|
+
* specific fix that makes one instance correct.
|
|
21
|
+
*
|
|
22
|
+
* @module completion/review-cycle-delta
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Whether a review-exit cycle produced a real DELTA in focus state.
|
|
26
|
+
*
|
|
27
|
+
* A delta exists when ANY of:
|
|
28
|
+
* - a delivery converged to a terminal state this cycle (real forward motion,
|
|
29
|
+
* independent of the branch tip), OR
|
|
30
|
+
* - the review filed new gap issues this cycle (the first-cycle progress of a
|
|
31
|
+
* healthy re-iteration, before the fix commit lands), OR
|
|
32
|
+
* - the focus branch demonstrably ADVANCED since the last review (a new commit
|
|
33
|
+
* landed: coveredSha is resolved AND differs from the prior watermark). A
|
|
34
|
+
* lost carry (coveredSha null) is NOT proof of advance and does not count as
|
|
35
|
+
* a delta on its own, so the bound still applies to a focus that cannot even
|
|
36
|
+
* resolve its own tip.
|
|
37
|
+
*
|
|
38
|
+
* A pure verify -> verify_failed -> coding -> verify round trip that commits
|
|
39
|
+
* nothing, converges nothing, and files nothing satisfies none of these and is
|
|
40
|
+
* NOT a delta -- exactly the empty loop the hand-off cap must be allowed to bound.
|
|
41
|
+
*
|
|
42
|
+
* A healthy re-iteration is never falsely bounded: it files fresh gaps, converges
|
|
43
|
+
* a delivery, or commits a fix (advancing the tip), so it always registers a
|
|
44
|
+
* delta and the counter resets.
|
|
45
|
+
*/
|
|
46
|
+
export function reviewCycleProducedDelta(state) {
|
|
47
|
+
if (state.deliveryConverged)
|
|
48
|
+
return true;
|
|
49
|
+
if (state.issuesFiled)
|
|
50
|
+
return true;
|
|
51
|
+
if (state.coveredSha != null && state.coveredSha !== state.priorReviewedSha)
|
|
52
|
+
return true;
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=review-cycle-delta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-cycle-delta.js","sourceRoot":"","sources":["../../src/completion/review-cycle-delta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA8BH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAuB;IAC9D,IAAI,KAAK,CAAC,iBAAiB;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,KAAK,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,gBAAgB;QAAE,OAAO,IAAI,CAAC;IACzF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -79,4 +79,17 @@ export declare function filterDeferrableReviewNotes(issues: FocusIssueInfo[], re
|
|
|
79
79
|
* escalation.
|
|
80
80
|
*/
|
|
81
81
|
export declare function blockingReviewFiledIssueExists(issues: FocusIssueInfo[], reviewRequestedAt: string | null): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Time-independent review-filed test: the issue is a member of the focus's
|
|
84
|
+
* review-filed id union AND is still open.
|
|
85
|
+
*/
|
|
86
|
+
export declare function isReviewFiledById(issue: Pick<FocusIssueInfo, 'id' | 'status'>, reviewFiledIds: ReadonlySet<string>): boolean;
|
|
87
|
+
/** Review-filed via the non-lossy id set OR the legacy review-window heuristic. */
|
|
88
|
+
export declare function isReviewFiledComplete(issue: Pick<FocusIssueInfo, 'id' | 'createdByRoleId' | 'createdAt' | 'status'>, reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): boolean;
|
|
89
|
+
/** Complete-set counterpart of reviewFiledIssueExists. */
|
|
90
|
+
export declare function reviewFiledIssueExistsComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): boolean;
|
|
91
|
+
/** Complete-set counterpart of blockingReviewFiledIssueExists. */
|
|
92
|
+
export declare function blockingReviewFiledIssueExistsComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): boolean;
|
|
93
|
+
/** Complete-set counterpart of filterDeferrableReviewNotes. */
|
|
94
|
+
export declare function filterDeferrableReviewNotesComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): FocusIssueInfo[];
|
|
82
95
|
//# sourceMappingURL=review-defect-detector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-defect-detector.d.ts","sourceRoot":"","sources":["../../src/completion/review-defect-detector.ts"],"names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AG,IAAI,GAC/B,cAAc,EAAE,CAElB;AAED;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,cAAc,EAAE,EACxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAC/B,OAAO,CAIT"}
|
|
1
|
+
{"version":3,"file":"review-defect-detector.d.ts","sourceRoot":"","sources":["../../src/completion/review-defect-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMxD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MACU,CAAC;AAYlD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE5D;AAED,wCAAwC;AACxC,wBAAgB,iCAAiC,IAAI,IAAI,CAExD;AAID;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,iBAAiB,GAAG,WAAW,GAAG,QAAQ,CAAC,EACvE,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAC/B,OAAO,CAMT;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,EAAE,EACxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAC/B,cAAc,EAAE,CAElB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,cAAc,EAAE,EACxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAC/B,OAAO,CAUT;AAcD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAG1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,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AAC,MAAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAC/B,cAAc,EAAE,CAIlB"}
|
|
@@ -145,4 +145,43 @@ export function filterDeferrableReviewNotes(issues, reviewRequestedAt) {
|
|
|
145
145
|
export function blockingReviewFiledIssueExists(issues, reviewRequestedAt) {
|
|
146
146
|
return issues.some(i => isReviewFiledIssue(i, reviewRequestedAt) && !isLowPriority(i.priority));
|
|
147
147
|
}
|
|
148
|
+
// ── Non-lossy (complete-set) classification ───────────────────────────────
|
|
149
|
+
//
|
|
150
|
+
// The functions above decide "was this issue filed by a review" from timing
|
|
151
|
+
// alone (created_at >= review_requested_at). That is a lossy proxy on two axes:
|
|
152
|
+
// - TIME: review_requested_at is cleared at each review exit and re-stamped
|
|
153
|
+
// with a fresh now() at the next auto-review, so a note genuinely filed on
|
|
154
|
+
// pass 1 falls outside the window from pass 2 onward and reads as absent.
|
|
155
|
+
// - (the SCOPE axis is a review-exit-phase concern: reading focus-wide issues
|
|
156
|
+
// vs verify-scoped, handled at the call site.)
|
|
157
|
+
//
|
|
158
|
+
// The non-lossy source is `focus_reviews.created_issue_ids`, surfaced as the
|
|
159
|
+
// focus-wide union `reviewFiledIds`. The `*Complete` variants below treat an
|
|
160
|
+
// issue as review-filed when its id is in that set OR the legacy time-window
|
|
161
|
+
// heuristic matches -- a strict SUPERSET of the old behaviour, so nothing the
|
|
162
|
+
// window used to catch is lost, while the id-set makes the classification
|
|
163
|
+
// stable across passes (the fix for the deferrable-note-re-blocked loop).
|
|
164
|
+
/**
|
|
165
|
+
* Time-independent review-filed test: the issue is a member of the focus's
|
|
166
|
+
* review-filed id union AND is still open.
|
|
167
|
+
*/
|
|
168
|
+
export function isReviewFiledById(issue, reviewFiledIds) {
|
|
169
|
+
return reviewFiledIds.has(issue.id) && OPEN_ISSUE_STATUSES.has(issue.status);
|
|
170
|
+
}
|
|
171
|
+
/** Review-filed via the non-lossy id set OR the legacy review-window heuristic. */
|
|
172
|
+
export function isReviewFiledComplete(issue, reviewFiledIds, reviewRequestedAt) {
|
|
173
|
+
return isReviewFiledById(issue, reviewFiledIds) || isReviewFiledIssue(issue, reviewRequestedAt);
|
|
174
|
+
}
|
|
175
|
+
/** Complete-set counterpart of reviewFiledIssueExists. */
|
|
176
|
+
export function reviewFiledIssueExistsComplete(issues, reviewFiledIds, reviewRequestedAt) {
|
|
177
|
+
return issues.some(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt));
|
|
178
|
+
}
|
|
179
|
+
/** Complete-set counterpart of blockingReviewFiledIssueExists. */
|
|
180
|
+
export function blockingReviewFiledIssueExistsComplete(issues, reviewFiledIds, reviewRequestedAt) {
|
|
181
|
+
return issues.some(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) && !isLowPriority(i.priority));
|
|
182
|
+
}
|
|
183
|
+
/** Complete-set counterpart of filterDeferrableReviewNotes. */
|
|
184
|
+
export function filterDeferrableReviewNotesComplete(issues, reviewFiledIds, reviewRequestedAt) {
|
|
185
|
+
return issues.filter(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) && isLowPriority(i.priority));
|
|
186
|
+
}
|
|
148
187
|
//# sourceMappingURL=review-defect-detector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-defect-detector.js","sourceRoot":"","sources":["../../src/completion/review-defect-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,4EAA4E;AAE5E;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,aAAa,EAAE,CAAC,+BAA+B,CAAC;AAElD,wEAAwE;AAExE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpD,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO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;IAEhC,OAAO,MAAM,CAAC,IAAI,CAChB,CAAC,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC5E,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"review-defect-detector.js","sourceRoot":"","sources":["../../src/completion/review-defect-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,4EAA4E;AAE5E;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,aAAa,EAAE,CAAC,+BAA+B,CAAC;AAElD,wEAAwE;AAExE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpD,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACxD,MAAM,IAAI,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACvD,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACrC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,iCAAiC;IAC/C,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC5B,CAAC;AAED,2EAA2E;AAE3E;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAuE,EACvE,iBAAgC;IAE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,CAAC,CAAC;AAC/E,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,qBAAqB,CACnC,KAA8E,EAC9E,cAAmC,EACnC,iBAAgC;IAEhC,OAAO,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;AAClG,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,8BAA8B,CAC5C,MAAwB,EACxB,cAAmC,EACnC,iBAAgC;IAEhC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,CAAC,CAAC;AACvF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,sCAAsC,CACpD,MAAwB,EACxB,cAAmC,EACnC,iBAAgC;IAEhC,OAAO,MAAM,CAAC,IAAI,CAChB,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC/F,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,mCAAmC,CACjD,MAAwB,EACxB,cAAmC,EACnC,iBAAgC;IAEhC,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC9F,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery attribution for a gaps_found review verdict.
|
|
3
|
+
*
|
|
4
|
+
* A focus-level gaps_found review is NOT an undifferentiated per-delivery
|
|
5
|
+
* instruction: it judges only the deliveries that own its filed gap issues
|
|
6
|
+
* (focus_reviews.created_issue_ids -> each issue's delivery). This module turns
|
|
7
|
+
* that session's created-issue ids into the verdict's TARGET SET and classifies,
|
|
8
|
+
* per delivery, whether the verdict targets it.
|
|
9
|
+
*
|
|
10
|
+
* Pure and dependency-free (beyond the issue classifier + open-status set) so the
|
|
11
|
+
* decision is unit-testable and the handler stays under the file-size limit.
|
|
12
|
+
* Sibling of review-exit-shortfall.ts / review-exit-escalations.ts, same seam.
|
|
13
|
+
*
|
|
14
|
+
* @module completion/review-exit-attribution
|
|
15
|
+
*/
|
|
16
|
+
import type { FocusIssueInfo } from '../types/index.js';
|
|
17
|
+
/** How a gaps_found verdict relates to one delivery. See ReconcilerReviewState.gapsAttribution. */
|
|
18
|
+
export type GapsAttribution = 'targeted' | 'not_targeted' | 'unresolvable';
|
|
19
|
+
/**
|
|
20
|
+
* The deliveries a gaps_found verdict actually judges: those that own an OPEN,
|
|
21
|
+
* BLOCKING gap issue the review filed this session (created_issue_ids mapped to
|
|
22
|
+
* each issue's delivery). A closed or deferrable note does not target its
|
|
23
|
+
* delivery -- only an actionable open gap does.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveAttributedDeliveryIds(focusIssues: FocusIssueInfo[], createdIssueIds: ReadonlySet<string>): Set<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Classify one delivery against a gaps_found verdict:
|
|
28
|
+
* 'targeted' -> this delivery owns a filed gap -> route back.
|
|
29
|
+
* 'not_targeted' -> a sibling owns the gap -> this delivery converges on merit.
|
|
30
|
+
* 'unresolvable' -> the verdict resolved to no delivery at all -> hold (absence
|
|
31
|
+
* of attribution is not a pass).
|
|
32
|
+
* Returns undefined when the verdict is not gaps_found (attribution is moot).
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveGapsAttribution(deliveryId: string, isGapsFound: boolean, attributedDeliveryIds: ReadonlySet<string>, attributionResolvable: boolean): GapsAttribution | undefined;
|
|
35
|
+
//# sourceMappingURL=review-exit-attribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-exit-attribution.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-attribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,mGAAmG;AACnG,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,cAAc,EAAE,EAC7B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,GAAG,CAAC,MAAM,CAAC,CASb;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,OAAO,EACpB,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAAC,EAC1C,qBAAqB,EAAE,OAAO,GAC7B,eAAe,GAAG,SAAS,CAI7B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery attribution for a gaps_found review verdict.
|
|
3
|
+
*
|
|
4
|
+
* A focus-level gaps_found review is NOT an undifferentiated per-delivery
|
|
5
|
+
* instruction: it judges only the deliveries that own its filed gap issues
|
|
6
|
+
* (focus_reviews.created_issue_ids -> each issue's delivery). This module turns
|
|
7
|
+
* that session's created-issue ids into the verdict's TARGET SET and classifies,
|
|
8
|
+
* per delivery, whether the verdict targets it.
|
|
9
|
+
*
|
|
10
|
+
* Pure and dependency-free (beyond the issue classifier + open-status set) so the
|
|
11
|
+
* decision is unit-testable and the handler stays under the file-size limit.
|
|
12
|
+
* Sibling of review-exit-shortfall.ts / review-exit-escalations.ts, same seam.
|
|
13
|
+
*
|
|
14
|
+
* @module completion/review-exit-attribution
|
|
15
|
+
*/
|
|
16
|
+
import { OPEN_ISSUE_STATUSES } from '../shell/constants.js';
|
|
17
|
+
import { isLowPriority } from './review-defect-detector.js';
|
|
18
|
+
/**
|
|
19
|
+
* The deliveries a gaps_found verdict actually judges: those that own an OPEN,
|
|
20
|
+
* BLOCKING gap issue the review filed this session (created_issue_ids mapped to
|
|
21
|
+
* each issue's delivery). A closed or deferrable note does not target its
|
|
22
|
+
* delivery -- only an actionable open gap does.
|
|
23
|
+
*/
|
|
24
|
+
export function resolveAttributedDeliveryIds(focusIssues, createdIssueIds) {
|
|
25
|
+
const attributed = new Set();
|
|
26
|
+
for (const iss of focusIssues) {
|
|
27
|
+
if (!createdIssueIds.has(iss.id))
|
|
28
|
+
continue;
|
|
29
|
+
if (!OPEN_ISSUE_STATUSES.has(iss.status))
|
|
30
|
+
continue; // an already-closed gap targets nothing
|
|
31
|
+
if (isLowPriority(iss.priority))
|
|
32
|
+
continue; // deferrable notes are not blocking gaps
|
|
33
|
+
if (iss.deliveryId)
|
|
34
|
+
attributed.add(iss.deliveryId);
|
|
35
|
+
}
|
|
36
|
+
return attributed;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Classify one delivery against a gaps_found verdict:
|
|
40
|
+
* 'targeted' -> this delivery owns a filed gap -> route back.
|
|
41
|
+
* 'not_targeted' -> a sibling owns the gap -> this delivery converges on merit.
|
|
42
|
+
* 'unresolvable' -> the verdict resolved to no delivery at all -> hold (absence
|
|
43
|
+
* of attribution is not a pass).
|
|
44
|
+
* Returns undefined when the verdict is not gaps_found (attribution is moot).
|
|
45
|
+
*/
|
|
46
|
+
export function resolveGapsAttribution(deliveryId, isGapsFound, attributedDeliveryIds, attributionResolvable) {
|
|
47
|
+
if (!isGapsFound)
|
|
48
|
+
return undefined;
|
|
49
|
+
if (!attributionResolvable)
|
|
50
|
+
return 'unresolvable';
|
|
51
|
+
return attributedDeliveryIds.has(deliveryId) ? 'targeted' : 'not_targeted';
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=review-exit-attribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-exit-attribution.js","sourceRoot":"","sources":["../../src/completion/review-exit-attribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAC1C,WAA6B,EAC7B,eAAoC;IAEpC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC9B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QAC3C,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,SAAS,CAAC,wCAAwC;QAC5F,IAAI,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAS,CAAC,yCAAyC;QACpF,IAAI,GAAG,CAAC,UAAU;YAAE,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAkB,EAClB,WAAoB,EACpB,qBAA0C,EAC1C,qBAA8B;IAE9B,IAAI,CAAC,WAAW;QAAE,OAAO,SAAS,CAAC;IACnC,IAAI,CAAC,qBAAqB;QAAE,OAAO,cAAc,CAAC;IAClD,OAAO,qBAAqB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC;AAC7E,CAAC"}
|
|
@@ -34,7 +34,15 @@ export interface ReviewExitEscalationContext {
|
|
|
34
34
|
sessionId: string;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Focus-level review-cycle churn
|
|
37
|
+
* Focus-level review-cycle churn METER (NOT a breaker), plus the one escalation
|
|
38
|
+
* it arms.
|
|
39
|
+
*
|
|
40
|
+
* This meters and SURFACES; it never halts. When the count crosses the cap it
|
|
41
|
+
* files ONE review_cycle_cap_exceeded escalation for visibility and lets the
|
|
42
|
+
* loop continue -- the terminating breaker is recordHandoffAndMaybeTerminate
|
|
43
|
+
* (the hand-off cap), which actually closes the review window. Keeping the two
|
|
44
|
+
* roles distinct is deliberate: this one is the "how many cycles has this focus
|
|
45
|
+
* burned" gauge; that one is the "stop" valve.
|
|
38
46
|
*
|
|
39
47
|
* Increments on EVERY completed review cycle (including auto-approve /
|
|
40
48
|
* no-report cycles the focus_reviews-row meter misses) so the take-turns-failing
|
|
@@ -83,7 +91,17 @@ export interface HandoffBoundDeps extends ReviewExitEscalationDeps {
|
|
|
83
91
|
* review_handoff_exhausted escalation instead, so a review exit can no longer
|
|
84
92
|
* re-create the condition that produced it. All writes best-effort.
|
|
85
93
|
*/
|
|
86
|
-
export declare function recordHandoffAndMaybeTerminate(deps: HandoffBoundDeps, ctx: ReviewExitEscalationContext, currentHandoffCount: number
|
|
94
|
+
export declare function recordHandoffAndMaybeTerminate(deps: HandoffBoundDeps, ctx: ReviewExitEscalationContext, currentHandoffCount: number, opts?: {
|
|
95
|
+
/**
|
|
96
|
+
* What produced this no-progress cycle, for accurate logging. Two callers
|
|
97
|
+
* share the ONE durable counter (both are no-progress review exits):
|
|
98
|
+
* - 'pending_spawn_handoff' (default): nothing routed, a spawn directive is
|
|
99
|
+
* pending, so the flag is left set "for the incoming team".
|
|
100
|
+
* - 'no_delta_cycle': a status was routed but focus state did not change
|
|
101
|
+
* (the empty verify->verify_failed round trip).
|
|
102
|
+
*/
|
|
103
|
+
trigger?: 'pending_spawn_handoff' | 'no_delta_cycle';
|
|
104
|
+
}): Promise<void>;
|
|
87
105
|
/**
|
|
88
106
|
* The review hand-off has terminated. The review-exit hand-off branch re-asserts
|
|
89
107
|
* an unverified promise -- "the incoming team will route it" -- and re-makes it
|
|
@@ -95,6 +113,7 @@ export declare function recordHandoffAndMaybeTerminate(deps: HandoffBoundDeps, c
|
|
|
95
113
|
export declare function fileHandoffExhaustedEscalation(deps: ReviewExitEscalationDeps, ctx: ReviewExitEscalationContext, args: {
|
|
96
114
|
handoffCount: number;
|
|
97
115
|
cap: number;
|
|
116
|
+
trigger?: 'pending_spawn_handoff' | 'no_delta_cycle';
|
|
98
117
|
}): Promise<void>;
|
|
99
118
|
/**
|
|
100
119
|
* The routing inconsistency the review-exit gate exists to catch: the review
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-escalations.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-escalations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAChH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAK7E,sFAAsF;AACtF,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAG1C,sBAAsB,CAAC,EAAE,OAAO,sBAAsB,CAAC;IAGvD,mBAAmB,CAAC,EAAE,OAAO,mBAAmB,CAAC;IACjD,qBAAqB,CAAC,EAAE,OAAO,qBAAqB,CAAC;CACtD;AAED,mEAAmE;AACnE,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAsDD
|
|
1
|
+
{"version":3,"file":"review-exit-escalations.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-escalations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,gBAAg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AC;IACrD,uBAAuB,CAAC,EAAE,OAAO,uBAAuB,CAAC;CAC1D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,gBAAgB,EACtB,GAAG,EAAE,2BAA2B,EAChC,mBAAmB,EAAE,MAAM,EAC3B,IAAI,CAAC,EAAE;IACL;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,uBAAuB,GAAG,gBAAgB,CAAC;CACtD,GACA,OAAO,CAAC,IAAI,CAAC,CAwCf;AAED;;;;;;;GAOG;AACH,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,2BAA2B,EAChC,IAAI,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,gBAAgB,CAAA;CAAE,GAChG,OAAO,CAAC,IAAI,CAAC,CA6Bf;AAED;;;;;;;;;GASG;AACH,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,2BAA2B,GAC/B,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,wBAAwB,EAC9B,GAAG,EAAE,2BAA2B,GAC/B,OAAO,CAAC,IAAI,CAAC,CAwBf"}
|
|
@@ -63,7 +63,15 @@ async function fileDedupedFocusEscalation(deps, ctx, args) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* Focus-level review-cycle churn
|
|
66
|
+
* Focus-level review-cycle churn METER (NOT a breaker), plus the one escalation
|
|
67
|
+
* it arms.
|
|
68
|
+
*
|
|
69
|
+
* This meters and SURFACES; it never halts. When the count crosses the cap it
|
|
70
|
+
* files ONE review_cycle_cap_exceeded escalation for visibility and lets the
|
|
71
|
+
* loop continue -- the terminating breaker is recordHandoffAndMaybeTerminate
|
|
72
|
+
* (the hand-off cap), which actually closes the review window. Keeping the two
|
|
73
|
+
* roles distinct is deliberate: this one is the "how many cycles has this focus
|
|
74
|
+
* burned" gauge; that one is the "stop" valve.
|
|
67
75
|
*
|
|
68
76
|
* Increments on EVERY completed review cycle (including auto-approve /
|
|
69
77
|
* no-report cycles the focus_reviews-row meter misses) so the take-turns-failing
|
|
@@ -156,7 +164,8 @@ export async function fileCoverageIncompleteEscalation(deps, ctx, args) {
|
|
|
156
164
|
* review_handoff_exhausted escalation instead, so a review exit can no longer
|
|
157
165
|
* re-create the condition that produced it. All writes best-effort.
|
|
158
166
|
*/
|
|
159
|
-
export async function recordHandoffAndMaybeTerminate(deps, ctx, currentHandoffCount) {
|
|
167
|
+
export async function recordHandoffAndMaybeTerminate(deps, ctx, currentHandoffCount, opts) {
|
|
168
|
+
const trigger = opts?.trigger ?? 'pending_spawn_handoff';
|
|
160
169
|
const handoffCap = (deps.resolveReviewHandoffCap ?? resolveReviewHandoffCap)();
|
|
161
170
|
const nextHandoffCount = currentHandoffCount + 1;
|
|
162
171
|
const persist = async () => {
|
|
@@ -174,17 +183,21 @@ export async function recordHandoffAndMaybeTerminate(deps, ctx, currentHandoffCo
|
|
|
174
183
|
// window, and file one operator escalation (deduped one-open-per-focus).
|
|
175
184
|
await persist();
|
|
176
185
|
await deps.clearReviewRequestedAt(ctx.focusId);
|
|
177
|
-
await fileHandoffExhaustedEscalation(deps, ctx, { handoffCount: nextHandoffCount, cap: handoffCap });
|
|
178
|
-
log.warn(`[focus-executor] "${ctx.focusName}" review
|
|
179
|
-
`review_requested_at cleared and review_handoff_exhausted escalation filed; no re-assertion.`);
|
|
186
|
+
await fileHandoffExhaustedEscalation(deps, ctx, { handoffCount: nextHandoffCount, cap: handoffCap, trigger });
|
|
187
|
+
log.warn(`[focus-executor] "${ctx.focusName}" review no-progress bound EXHAUSTED (${nextHandoffCount} >= cap ${handoffCap}, ` +
|
|
188
|
+
`trigger=${trigger}) -- review_requested_at cleared and review_handoff_exhausted escalation filed; no re-assertion.`);
|
|
180
189
|
}
|
|
181
190
|
else {
|
|
182
|
-
// Under the cap: the
|
|
183
|
-
//
|
|
191
|
+
// Under the cap: record the incremented count. For the pending-spawn hand-off
|
|
192
|
+
// this leaves review_requested_at set for the incoming team; for a no-delta
|
|
193
|
+
// routed cycle the flag was already cleared by the routed block and the count
|
|
194
|
+
// simply climbs toward the cap.
|
|
184
195
|
await persist();
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
196
|
+
const detail = trigger === 'no_delta_cycle'
|
|
197
|
+
? 'routed a status but focus state did not change (no-delta cycle)'
|
|
198
|
+
: 'routed nothing and a spawn directive is pending -- leaving review_requested_at set for the incoming team';
|
|
199
|
+
log.info(`[focus-executor] "${ctx.focusName}" review exit ${detail} ` +
|
|
200
|
+
`(no-progress ${nextHandoffCount}/${handoffCap}).`);
|
|
188
201
|
}
|
|
189
202
|
}
|
|
190
203
|
/**
|
|
@@ -214,6 +227,7 @@ export async function fileHandoffExhaustedEscalation(deps, ctx, args) {
|
|
|
214
227
|
handoff_count: args.handoffCount,
|
|
215
228
|
cap: args.cap,
|
|
216
229
|
routed_via: 'handoff_exhausted',
|
|
230
|
+
trigger: args.trigger ?? 'pending_spawn_handoff',
|
|
217
231
|
},
|
|
218
232
|
onFiled: () => {
|
|
219
233
|
log.warn(`[focus-executor] review_handoff_exhausted escalation filed for "${ctx.focusName}" ` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-escalations.js","sourceRoot":"","sources":["../../src/completion/review-exit-escalations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAIlF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE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eliveryAutoApproved } from '../queries/deliv
|
|
|
14
14
|
import { getActiveFocuses } from '../queries/focus-discovery.js';
|
|
15
15
|
import { hasPendingSpawnDirective } from '../directive/directive-queue.js';
|
|
16
16
|
import { emitLoopTrigger } from '../loops/index.js';
|
|
17
|
-
import { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt, setReviewedThroughSha, setReviewCycleCount, setReviewHandoffCount, getFocusReviewReportForSession } from '../queries/focuses.js';
|
|
17
|
+
import { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt, setReviewedThroughSha, setReviewCycleCount, setReviewHandoffCount, getFocusReviewReportForSession, getFocusReviewFiledIssueIds } from '../queries/focuses.js';
|
|
18
18
|
import { resolveReviewCycleCap, resolveReviewHandoffCap } from '../verify/stall-detector-config.js';
|
|
19
19
|
import { getDeliveryIssues } from '../queries/issues.js';
|
|
20
20
|
import { createEscalation, hasOpenFocusEscalation } from '../queries/escalations.js';
|
|
@@ -44,6 +44,7 @@ export interface ReviewExitDeps {
|
|
|
44
44
|
hasPendingSpawnDirective: typeof hasPendingSpawnDirective;
|
|
45
45
|
emitLoopTrigger: typeof emitLoopTrigger;
|
|
46
46
|
getFocusReviewReportForSession: typeof getFocusReviewReportForSession;
|
|
47
|
+
getFocusReviewFiledIssueIds?: typeof getFocusReviewFiledIssueIds;
|
|
47
48
|
createEscalation: typeof createEscalation;
|
|
48
49
|
}
|
|
49
50
|
export interface ReviewExitParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-phase.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,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