@telora/daemon 0.22.226 → 0.22.227
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/index.js +1 -1
- package/dist/completion/review-defect-detector.d.ts +58 -18
- package/dist/completion/review-defect-detector.d.ts.map +1 -1
- package/dist/completion/review-defect-detector.js +62 -27
- package/dist/completion/review-defect-detector.js.map +1 -1
- package/dist/completion/review-exit-attribution.d.ts +6 -3
- package/dist/completion/review-exit-attribution.d.ts.map +1 -1
- package/dist/completion/review-exit-attribution.js +9 -7
- package/dist/completion/review-exit-attribution.js.map +1 -1
- package/dist/completion/review-exit-deps.d.ts +2 -0
- package/dist/completion/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit-deps.js +3 -0
- package/dist/completion/review-exit-deps.js.map +1 -1
- package/dist/completion/review-exit-evidence.d.ts +8 -0
- package/dist/completion/review-exit-evidence.d.ts.map +1 -1
- package/dist/completion/review-exit-evidence.js +39 -27
- package/dist/completion/review-exit-evidence.js.map +1 -1
- package/dist/completion/review-exit-foreign-findings.d.ts +5 -1
- package/dist/completion/review-exit-foreign-findings.d.ts.map +1 -1
- package/dist/completion/review-exit-foreign-findings.js +4 -4
- package/dist/completion/review-exit-foreign-findings.js.map +1 -1
- package/dist/completion/review-exit-phase.js +4 -4
- package/dist/completion/review-exit-phase.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts +3 -3
- package/dist/prompt-sections/persona-sections.d.ts +14 -0
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +50 -19
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/prompt-sections/testing-standard.d.ts +4 -1
- package/dist/prompt-sections/testing-standard.d.ts.map +1 -1
- package/dist/prompt-sections/testing-standard.js +14 -4
- package/dist/prompt-sections/testing-standard.js.map +1 -1
- package/dist/queries/escalations.js +1 -1
- package/dist/queries/review-finding-facts.d.ts +38 -0
- package/dist/queries/review-finding-facts.d.ts.map +1 -0
- package/dist/queries/review-finding-facts.js +43 -0
- package/dist/queries/review-finding-facts.js.map +1 -0
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +2 -2
package/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commitSha": "
|
|
3
|
-
"builtAt": "2026-09-
|
|
2
|
+
"commitSha": "0787b3824",
|
|
3
|
+
"builtAt": "2026-09-24T18:42:52.976Z",
|
|
4
4
|
"expectedMigrations": [
|
|
5
5
|
"20250829113330_create_org_nodes_table.sql",
|
|
6
6
|
"20250829113402_fix_function_security_search_path.sql",
|
|
@@ -828,6 +828,7 @@
|
|
|
828
828
|
"20260922221935_product_request_observation_snapshot.sql",
|
|
829
829
|
"20260922225316_product_request_observation_entry_is_atomic.sql",
|
|
830
830
|
"20260923002532_capture_request_observation_in_one_snapshot.sql",
|
|
831
|
-
"20260924010304_org_default_pass_models_opus_5_5.sql"
|
|
831
|
+
"20260924010304_org_default_pass_models_opus_5_5.sql",
|
|
832
|
+
"20260924173744_focus_reviews_blocking_issue_ids.sql"
|
|
832
833
|
]
|
|
833
834
|
}
|
package/dist/completion/index.js
CHANGED
|
@@ -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: 39 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/completion/index.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/**
|
|
5
5
|
* Completion subsystem barrel.
|
|
@@ -49,36 +49,76 @@ export declare function reviewFiledIssueExists(issues: FocusIssueInfo[], reviewR
|
|
|
49
49
|
/**
|
|
50
50
|
* Whether a priority label is an explicit, low (deferrable) severity. Null,
|
|
51
51
|
* empty, P0, and P1 are all NOT deferrable.
|
|
52
|
+
*
|
|
53
|
+
* This is the FALLBACK of isBlockingReviewFinding only, for a finding with no
|
|
54
|
+
* recorded class. Do not call it to decide whether a review finding blocks --
|
|
55
|
+
* call isBlockingReviewFinding (pinned by review-finding-blocking-predicate.test.ts,
|
|
56
|
+
* which fails on any non-test caller outside this module).
|
|
52
57
|
*/
|
|
53
58
|
export declare function isLowPriority(priority: string | null | undefined): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The RECORDED class of a review finding, as the review filed it: `blocking`
|
|
61
|
+
* when a not_met acceptance criterion names it (it falsifies an agreed
|
|
62
|
+
* criterion), `concern` when none does. Read from the product-api action
|
|
63
|
+
* `focus_review_filed_issue_ids` (`findingClasses`, keyed by issue id) --
|
|
64
|
+
* queries/review-finding-facts.ts.
|
|
65
|
+
*/
|
|
66
|
+
export type ReviewFindingClass = 'blocking' | 'concern';
|
|
67
|
+
/**
|
|
68
|
+
* Recorded finding classes keyed by issue id. An issue ABSENT from the map has
|
|
69
|
+
* no recorded fact (an older edge, or a review that linked no criterion) and is
|
|
70
|
+
* classified by the priority fallback.
|
|
71
|
+
*/
|
|
72
|
+
export type ReviewFindingClasses = ReadonlyMap<string, ReviewFindingClass>;
|
|
73
|
+
/**
|
|
74
|
+
* THE blocking predicate for a review-filed finding -- the ONE place the daemon
|
|
75
|
+
* decides whether a review finding may hold its delivery (route it to
|
|
76
|
+
* verify_failed, target it with a gaps_found verdict, keep the review-cycle
|
|
77
|
+
* count climbing). Every such decision -- the review exit's evidence
|
|
78
|
+
* (review-exit-evidence.ts), the verify routing it tags for the reconciler
|
|
79
|
+
* (delivery-reconciler.ts `deferrable`), the review-cycle cap's "open blocking
|
|
80
|
+
* finding" (review-cycle-cap.ts, fed openBlockingFindings), delivery
|
|
81
|
+
* attribution (review-exit-attribution.ts) and foreign-finding location
|
|
82
|
+
* (review-exit-foreign-findings.ts) -- reads it; none reads priority directly.
|
|
83
|
+
*
|
|
84
|
+
* - a RECORDED fact wins, whatever the priority: `blocking` blocks, `concern`
|
|
85
|
+
* does not. A finding blocks by falsifying an agreed criterion, not by the
|
|
86
|
+
* severity a reviewer typed.
|
|
87
|
+
* - NO recorded fact -> today's priority rule: only an explicit P2/P3 is
|
|
88
|
+
* non-blocking; P0/P1 and unset block (the bar is never lowered by absence).
|
|
89
|
+
*
|
|
90
|
+
* It classifies severity only; whether the issue is review-filed and open is
|
|
91
|
+
* the caller's filter (isReviewFiledIssue / isReviewFiledComplete).
|
|
92
|
+
*/
|
|
93
|
+
export declare function isBlockingReviewFinding(issue: Pick<FocusIssueInfo, 'id' | 'priority'>, findingClasses?: ReviewFindingClasses): boolean;
|
|
54
94
|
/**
|
|
55
95
|
* Whether an issue is a DEFERRABLE review note: a review-filed, still-open
|
|
56
|
-
* issue (per isReviewFiledIssue)
|
|
57
|
-
* (
|
|
58
|
-
*
|
|
96
|
+
* issue (per isReviewFiledIssue) that is NOT a blocking finding
|
|
97
|
+
* (isBlockingReviewFinding -- a recorded `concern`, or, with no recorded fact,
|
|
98
|
+
* an explicit P2/P3). A deferrable note must NOT route a verify delivery to
|
|
99
|
+
* verify_failed -- the review should converge (approve) and leave the note
|
|
100
|
+
* tracked.
|
|
59
101
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* blocking. Deferrability is a property of low-severity review triage notes
|
|
63
|
-
* only.
|
|
102
|
+
* Any open work that is NOT review-filed (e.g. pre-existing coding work) is
|
|
103
|
+
* blocking. Deferrability is a property of review findings only.
|
|
64
104
|
*/
|
|
65
|
-
export declare function isDeferrableReviewNote(issue: Pick<FocusIssueInfo, 'createdByRoleId' | 'createdAt' | 'status' | 'priority'>, reviewRequestedAt: string | null): boolean;
|
|
105
|
+
export declare function isDeferrableReviewNote(issue: Pick<FocusIssueInfo, 'id' | 'createdByRoleId' | 'createdAt' | 'status' | 'priority'>, reviewRequestedAt: string | null, findingClasses?: ReviewFindingClasses): boolean;
|
|
66
106
|
/**
|
|
67
107
|
* Filter a focus's issues to the open, review-filed notes that are deferrable
|
|
68
|
-
* (
|
|
108
|
+
* (not blocking). The caller uses the ids to mark the matching reconciler
|
|
69
109
|
* issues as `deferrable` so the verify-routing reconciler does not treat them
|
|
70
110
|
* as blocking open work.
|
|
71
111
|
*/
|
|
72
|
-
export declare function filterDeferrableReviewNotes(issues: FocusIssueInfo[], reviewRequestedAt: string | null): FocusIssueInfo[];
|
|
112
|
+
export declare function filterDeferrableReviewNotes(issues: FocusIssueInfo[], reviewRequestedAt: string | null, findingClasses?: ReviewFindingClasses): FocusIssueInfo[];
|
|
73
113
|
/**
|
|
74
114
|
* Returns true when there is at least one BLOCKING review-filed issue since the
|
|
75
|
-
* most recent review pass -- a review-filed, still-open issue that is
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
115
|
+
* most recent review pass -- a review-filed, still-open issue that is a
|
|
116
|
+
* blocking finding (isBlockingReviewFinding). This is the gate for the
|
|
117
|
+
* review_missing_report notice: a review that filed ONLY deferrable notes
|
|
118
|
+
* converged cleanly and must not raise the "review skipped its outcome"
|
|
79
119
|
* escalation.
|
|
80
120
|
*/
|
|
81
|
-
export declare function blockingReviewFiledIssueExists(issues: FocusIssueInfo[], reviewRequestedAt: string | null): boolean;
|
|
121
|
+
export declare function blockingReviewFiledIssueExists(issues: FocusIssueInfo[], reviewRequestedAt: string | null, findingClasses?: ReviewFindingClasses): boolean;
|
|
82
122
|
/**
|
|
83
123
|
* Time-independent review-filed test: the issue is a member of the focus's
|
|
84
124
|
* review-filed id union AND is still open.
|
|
@@ -89,7 +129,7 @@ export declare function isReviewFiledComplete(issue: Pick<FocusIssueInfo, 'id' |
|
|
|
89
129
|
/** Complete-set counterpart of reviewFiledIssueExists. */
|
|
90
130
|
export declare function reviewFiledIssueExistsComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): boolean;
|
|
91
131
|
/** Complete-set counterpart of blockingReviewFiledIssueExists. */
|
|
92
|
-
export declare function blockingReviewFiledIssueExistsComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): boolean;
|
|
132
|
+
export declare function blockingReviewFiledIssueExistsComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null, findingClasses?: ReviewFindingClasses): boolean;
|
|
93
133
|
/**
|
|
94
134
|
* Complete-set counterpart of blockingReviewFiledIssueExists returning the LIST
|
|
95
135
|
* (not just existence): the OPEN, BLOCKING review-filed issues on the focus. Used
|
|
@@ -98,7 +138,7 @@ export declare function blockingReviewFiledIssueExistsComplete(issues: FocusIssu
|
|
|
98
138
|
* findings without opening the daemon log, rather than reading the breaker's old
|
|
99
139
|
* untested "there was no work left to route" assertion.
|
|
100
140
|
*/
|
|
101
|
-
export declare function filterBlockingReviewFiledComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): FocusIssueInfo[];
|
|
141
|
+
export declare function filterBlockingReviewFiledComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null, findingClasses?: ReviewFindingClasses): FocusIssueInfo[];
|
|
102
142
|
/** Complete-set counterpart of filterDeferrableReviewNotes. */
|
|
103
|
-
export declare function filterDeferrableReviewNotesComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null): FocusIssueInfo[];
|
|
143
|
+
export declare function filterDeferrableReviewNotesComplete(issues: FocusIssueInfo[], reviewFiledIds: ReadonlySet<string>, reviewRequestedAt: string | null, findingClasses?: ReviewFindingClasses): FocusIssueInfo[];
|
|
104
144
|
//# 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":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"review-defect-detector.d.ts","sourceRoot":"","sources":["../../src/completion/review-defect-detector.ts"],"names":[],"mappings":"AAOA;;;;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AAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,cAAc,GAAE,oBAA0C,GACzD,OAAO,CAIT;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,cAAc,EAAE,EACxB,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,cAAc,GAAE,oBAA0C,GACzD,cAAc,EAAE,CAIlB;AAED,+DAA+D;AAC/D,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,cAAc,EAAE,EACxB,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,cAAc,GAAE,oBAA0C,GACzD,cAAc,EAAE,CAIlB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
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/completion/review-defect-loop.test.ts,
|
|
3
|
-
// packages/daemon/src/completion/review-deferrable-classification.test.ts
|
|
3
|
+
// packages/daemon/src/completion/review-deferrable-classification.test.ts,
|
|
4
|
+
// packages/daemon/src/completion/review-finding-blocking-predicate.test.ts,
|
|
5
|
+
// packages/daemon/src/completion/review-finding-class-routing.test.ts
|
|
4
6
|
// PINNED-BY-END
|
|
5
7
|
import { OPEN_ISSUE_STATUSES } from '../shell/constants.js';
|
|
6
8
|
import { loadEnvConfig } from '@telora/daemon-core';
|
|
@@ -80,8 +82,9 @@ export function reviewFiledIssueExists(issues, reviewRequestedAt) {
|
|
|
80
82
|
}
|
|
81
83
|
// ── Deferrability classification ──────────────────────────────────────────
|
|
82
84
|
/**
|
|
83
|
-
* Priority labels that mark a review-filed note as DEFERRABLE
|
|
84
|
-
*
|
|
85
|
+
* Priority labels that mark a review-filed note as DEFERRABLE when NO finding
|
|
86
|
+
* class is recorded for it (the fallback inside isBlockingReviewFinding -- a
|
|
87
|
+
* recorded blocking/concern fact always wins). The blocking set is everything
|
|
85
88
|
* else -- P0/P1 AND a null/unset priority. The asymmetry is deliberate: the
|
|
86
89
|
* control loop moves reality toward intent and never lowers the bar, so an
|
|
87
90
|
* unprioritized note is treated as BLOCKING (route to verify_failed), not
|
|
@@ -91,45 +94,77 @@ const DEFERRABLE_PRIORITIES = new Set(['P2', 'P3']);
|
|
|
91
94
|
/**
|
|
92
95
|
* Whether a priority label is an explicit, low (deferrable) severity. Null,
|
|
93
96
|
* empty, P0, and P1 are all NOT deferrable.
|
|
97
|
+
*
|
|
98
|
+
* This is the FALLBACK of isBlockingReviewFinding only, for a finding with no
|
|
99
|
+
* recorded class. Do not call it to decide whether a review finding blocks --
|
|
100
|
+
* call isBlockingReviewFinding (pinned by review-finding-blocking-predicate.test.ts,
|
|
101
|
+
* which fails on any non-test caller outside this module).
|
|
94
102
|
*/
|
|
95
103
|
export function isLowPriority(priority) {
|
|
96
104
|
if (!priority)
|
|
97
105
|
return false;
|
|
98
106
|
return DEFERRABLE_PRIORITIES.has(priority.trim().toUpperCase());
|
|
99
107
|
}
|
|
108
|
+
const NO_RECORDED_CLASSES = new Map();
|
|
109
|
+
/**
|
|
110
|
+
* THE blocking predicate for a review-filed finding -- the ONE place the daemon
|
|
111
|
+
* decides whether a review finding may hold its delivery (route it to
|
|
112
|
+
* verify_failed, target it with a gaps_found verdict, keep the review-cycle
|
|
113
|
+
* count climbing). Every such decision -- the review exit's evidence
|
|
114
|
+
* (review-exit-evidence.ts), the verify routing it tags for the reconciler
|
|
115
|
+
* (delivery-reconciler.ts `deferrable`), the review-cycle cap's "open blocking
|
|
116
|
+
* finding" (review-cycle-cap.ts, fed openBlockingFindings), delivery
|
|
117
|
+
* attribution (review-exit-attribution.ts) and foreign-finding location
|
|
118
|
+
* (review-exit-foreign-findings.ts) -- reads it; none reads priority directly.
|
|
119
|
+
*
|
|
120
|
+
* - a RECORDED fact wins, whatever the priority: `blocking` blocks, `concern`
|
|
121
|
+
* does not. A finding blocks by falsifying an agreed criterion, not by the
|
|
122
|
+
* severity a reviewer typed.
|
|
123
|
+
* - NO recorded fact -> today's priority rule: only an explicit P2/P3 is
|
|
124
|
+
* non-blocking; P0/P1 and unset block (the bar is never lowered by absence).
|
|
125
|
+
*
|
|
126
|
+
* It classifies severity only; whether the issue is review-filed and open is
|
|
127
|
+
* the caller's filter (isReviewFiledIssue / isReviewFiledComplete).
|
|
128
|
+
*/
|
|
129
|
+
export function isBlockingReviewFinding(issue, findingClasses = NO_RECORDED_CLASSES) {
|
|
130
|
+
const recorded = findingClasses.get(issue.id);
|
|
131
|
+
if (recorded !== undefined)
|
|
132
|
+
return recorded === 'blocking';
|
|
133
|
+
return !isLowPriority(issue.priority);
|
|
134
|
+
}
|
|
100
135
|
/**
|
|
101
136
|
* Whether an issue is a DEFERRABLE review note: a review-filed, still-open
|
|
102
|
-
* issue (per isReviewFiledIssue)
|
|
103
|
-
* (
|
|
104
|
-
*
|
|
137
|
+
* issue (per isReviewFiledIssue) that is NOT a blocking finding
|
|
138
|
+
* (isBlockingReviewFinding -- a recorded `concern`, or, with no recorded fact,
|
|
139
|
+
* an explicit P2/P3). A deferrable note must NOT route a verify delivery to
|
|
140
|
+
* verify_failed -- the review should converge (approve) and leave the note
|
|
141
|
+
* tracked.
|
|
105
142
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* blocking. Deferrability is a property of low-severity review triage notes
|
|
109
|
-
* only.
|
|
143
|
+
* Any open work that is NOT review-filed (e.g. pre-existing coding work) is
|
|
144
|
+
* blocking. Deferrability is a property of review findings only.
|
|
110
145
|
*/
|
|
111
|
-
export function isDeferrableReviewNote(issue, reviewRequestedAt) {
|
|
112
|
-
return isReviewFiledIssue(issue, reviewRequestedAt) &&
|
|
146
|
+
export function isDeferrableReviewNote(issue, reviewRequestedAt, findingClasses = NO_RECORDED_CLASSES) {
|
|
147
|
+
return isReviewFiledIssue(issue, reviewRequestedAt) && !isBlockingReviewFinding(issue, findingClasses);
|
|
113
148
|
}
|
|
114
149
|
/**
|
|
115
150
|
* Filter a focus's issues to the open, review-filed notes that are deferrable
|
|
116
|
-
* (
|
|
151
|
+
* (not blocking). The caller uses the ids to mark the matching reconciler
|
|
117
152
|
* issues as `deferrable` so the verify-routing reconciler does not treat them
|
|
118
153
|
* as blocking open work.
|
|
119
154
|
*/
|
|
120
|
-
export function filterDeferrableReviewNotes(issues, reviewRequestedAt) {
|
|
121
|
-
return issues.filter(i => isDeferrableReviewNote(i, reviewRequestedAt));
|
|
155
|
+
export function filterDeferrableReviewNotes(issues, reviewRequestedAt, findingClasses = NO_RECORDED_CLASSES) {
|
|
156
|
+
return issues.filter(i => isDeferrableReviewNote(i, reviewRequestedAt, findingClasses));
|
|
122
157
|
}
|
|
123
158
|
/**
|
|
124
159
|
* Returns true when there is at least one BLOCKING review-filed issue since the
|
|
125
|
-
* most recent review pass -- a review-filed, still-open issue that is
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
160
|
+
* most recent review pass -- a review-filed, still-open issue that is a
|
|
161
|
+
* blocking finding (isBlockingReviewFinding). This is the gate for the
|
|
162
|
+
* review_missing_report notice: a review that filed ONLY deferrable notes
|
|
163
|
+
* converged cleanly and must not raise the "review skipped its outcome"
|
|
129
164
|
* escalation.
|
|
130
165
|
*/
|
|
131
|
-
export function blockingReviewFiledIssueExists(issues, reviewRequestedAt) {
|
|
132
|
-
return issues.some(i => isReviewFiledIssue(i, reviewRequestedAt) &&
|
|
166
|
+
export function blockingReviewFiledIssueExists(issues, reviewRequestedAt, findingClasses = NO_RECORDED_CLASSES) {
|
|
167
|
+
return issues.some(i => isReviewFiledIssue(i, reviewRequestedAt) && isBlockingReviewFinding(i, findingClasses));
|
|
133
168
|
}
|
|
134
169
|
// ── Non-lossy (complete-set) classification ───────────────────────────────
|
|
135
170
|
//
|
|
@@ -163,8 +198,8 @@ export function reviewFiledIssueExistsComplete(issues, reviewFiledIds, reviewReq
|
|
|
163
198
|
return issues.some(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt));
|
|
164
199
|
}
|
|
165
200
|
/** Complete-set counterpart of blockingReviewFiledIssueExists. */
|
|
166
|
-
export function blockingReviewFiledIssueExistsComplete(issues, reviewFiledIds, reviewRequestedAt) {
|
|
167
|
-
return issues.some(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) &&
|
|
201
|
+
export function blockingReviewFiledIssueExistsComplete(issues, reviewFiledIds, reviewRequestedAt, findingClasses = NO_RECORDED_CLASSES) {
|
|
202
|
+
return issues.some(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) && isBlockingReviewFinding(i, findingClasses));
|
|
168
203
|
}
|
|
169
204
|
/**
|
|
170
205
|
* Complete-set counterpart of blockingReviewFiledIssueExists returning the LIST
|
|
@@ -174,11 +209,11 @@ export function blockingReviewFiledIssueExistsComplete(issues, reviewFiledIds, r
|
|
|
174
209
|
* findings without opening the daemon log, rather than reading the breaker's old
|
|
175
210
|
* untested "there was no work left to route" assertion.
|
|
176
211
|
*/
|
|
177
|
-
export function filterBlockingReviewFiledComplete(issues, reviewFiledIds, reviewRequestedAt) {
|
|
178
|
-
return issues.filter(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) &&
|
|
212
|
+
export function filterBlockingReviewFiledComplete(issues, reviewFiledIds, reviewRequestedAt, findingClasses = NO_RECORDED_CLASSES) {
|
|
213
|
+
return issues.filter(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) && isBlockingReviewFinding(i, findingClasses));
|
|
179
214
|
}
|
|
180
215
|
/** Complete-set counterpart of filterDeferrableReviewNotes. */
|
|
181
|
-
export function filterDeferrableReviewNotesComplete(issues, reviewFiledIds, reviewRequestedAt) {
|
|
182
|
-
return issues.filter(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) &&
|
|
216
|
+
export function filterDeferrableReviewNotesComplete(issues, reviewFiledIds, reviewRequestedAt, findingClasses = NO_RECORDED_CLASSES) {
|
|
217
|
+
return issues.filter(i => isReviewFiledComplete(i, reviewFiledIds, reviewRequestedAt) && !isBlockingReviewFinding(i, findingClasses));
|
|
183
218
|
}
|
|
184
219
|
//# 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,8FAA8F;AAC9F,wEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"review-defect-detector.js","sourceRoot":"","sources":["../../src/completion/review-defect-detector.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wEAAwE;AACxE,6EAA6E;AAC7E,8EAA8E;AAC9E,wEAAwE;AACxE,gBAAgB;AAsBhB,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,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IAAI,CAChB,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,IAAI,uBAAuB,CAAC,CAAC,EAAE,cAAc,CAAC,CAC/G,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAC/C,MAAwB,EACxB,cAAmC,EACnC,iBAAgC,EAChC,iBAAuC,mBAAmB;IAE1D,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,IAAI,uBAAuB,CAAC,CAAC,EAAE,cAAc,CAAC,CAC/G,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,mCAAmC,CACjD,MAAwB,EACxB,cAAmC,EACnC,iBAAgC,EAChC,iBAAuC,mBAAmB;IAE1D,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,EAAE,cAAc,CAAC,CAChH,CAAC;AACJ,CAAC"}
|
|
@@ -14,15 +14,18 @@
|
|
|
14
14
|
* @module completion/review-exit-attribution
|
|
15
15
|
*/
|
|
16
16
|
import type { FocusIssueInfo } from '../types/index.js';
|
|
17
|
+
import { type ReviewFindingClasses } from './review-defect-detector.js';
|
|
17
18
|
/** How a gaps_found verdict relates to one delivery. See ReconcilerReviewState.gapsAttribution. */
|
|
18
19
|
export type GapsAttribution = 'targeted' | 'not_targeted' | 'unresolvable';
|
|
19
20
|
/**
|
|
20
21
|
* The deliveries a gaps_found verdict actually judges: those that own an OPEN,
|
|
21
22
|
* BLOCKING gap issue the review filed this session (created_issue_ids mapped to
|
|
22
|
-
* each issue's delivery). A closed or
|
|
23
|
-
* delivery -- only an actionable open gap does.
|
|
23
|
+
* each issue's delivery). A closed or non-blocking note does not target its
|
|
24
|
+
* delivery -- only an actionable open gap does. Blocking is
|
|
25
|
+
* isBlockingReviewFinding over the findings' recorded classes (a recorded
|
|
26
|
+
* concern never targets, a recorded blocking always does; no fact -> priority).
|
|
24
27
|
*/
|
|
25
|
-
export declare function resolveAttributedDeliveryIds(focusIssues: FocusIssueInfo[], createdIssueIds: ReadonlySet<string
|
|
28
|
+
export declare function resolveAttributedDeliveryIds(focusIssues: FocusIssueInfo[], createdIssueIds: ReadonlySet<string>, findingClasses?: ReviewFindingClasses): Set<string>;
|
|
26
29
|
/**
|
|
27
30
|
* Classify one delivery against a gaps_found verdict:
|
|
28
31
|
* 'targeted' -> this delivery owns a filed gap -> route back.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-attribution.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-attribution.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"review-exit-attribution.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-attribution.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAA2B,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEjG,mGAAmG;AACnG,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,CAAC;AAE3E;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,cAAc,EAAE,EAC7B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,cAAc,CAAC,EAAE,oBAAoB,GACpC,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"}
|
|
@@ -1,23 +1,25 @@
|
|
|
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: packages/daemon/src/completion/review-finding-blocking-predicate.test.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
import { OPEN_ISSUE_STATUSES } from '../shell/constants.js';
|
|
5
|
-
import {
|
|
5
|
+
import { isBlockingReviewFinding } from './review-defect-detector.js';
|
|
6
6
|
/**
|
|
7
7
|
* The deliveries a gaps_found verdict actually judges: those that own an OPEN,
|
|
8
8
|
* BLOCKING gap issue the review filed this session (created_issue_ids mapped to
|
|
9
|
-
* each issue's delivery). A closed or
|
|
10
|
-
* delivery -- only an actionable open gap does.
|
|
9
|
+
* each issue's delivery). A closed or non-blocking note does not target its
|
|
10
|
+
* delivery -- only an actionable open gap does. Blocking is
|
|
11
|
+
* isBlockingReviewFinding over the findings' recorded classes (a recorded
|
|
12
|
+
* concern never targets, a recorded blocking always does; no fact -> priority).
|
|
11
13
|
*/
|
|
12
|
-
export function resolveAttributedDeliveryIds(focusIssues, createdIssueIds) {
|
|
14
|
+
export function resolveAttributedDeliveryIds(focusIssues, createdIssueIds, findingClasses) {
|
|
13
15
|
const attributed = new Set();
|
|
14
16
|
for (const iss of focusIssues) {
|
|
15
17
|
if (!createdIssueIds.has(iss.id))
|
|
16
18
|
continue;
|
|
17
19
|
if (!OPEN_ISSUE_STATUSES.has(iss.status))
|
|
18
20
|
continue; // an already-closed gap targets nothing
|
|
19
|
-
if (
|
|
20
|
-
continue; //
|
|
21
|
+
if (!isBlockingReviewFinding(iss, findingClasses))
|
|
22
|
+
continue; // non-blocking notes are not gaps
|
|
21
23
|
if (iss.deliveryId)
|
|
22
24
|
attributed.add(iss.deliveryId);
|
|
23
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-attribution.js","sourceRoot":"","sources":["../../src/completion/review-exit-attribution.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"review-exit-attribution.js","sourceRoot":"","sources":["../../src/completion/review-exit-attribution.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sFAAsF;AACtF,gBAAgB;AAmBhB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAA6B,MAAM,6BAA6B,CAAC;AAKjG;;;;;;;GAOG;AACH,MAAM,UAAU,4BAA4B,CAC1C,WAA6B,EAC7B,eAAoC,EACpC,cAAqC;IAErC,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,CAAC,uBAAuB,CAAC,GAAG,EAAE,cAAc,CAAC;YAAE,SAAS,CAAC,kCAAkC;QAC/F,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"}
|
|
@@ -16,6 +16,7 @@ import { getActiveFocuses } from '../queries/focus-discovery.js';
|
|
|
16
16
|
import { hasPendingSpawnDirective } from '../directive/directive-queue.js';
|
|
17
17
|
import { emitLoopTrigger } from '../loops/index.js';
|
|
18
18
|
import { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt, releaseFocusArm, setReviewCycleCount, setReviewHandoffCount, getFocusReviewReportForSession, getFocusReviewFiledIssueIds } from '../queries/focuses.js';
|
|
19
|
+
import { getFocusReviewFindingFacts } from '../queries/review-finding-facts.js';
|
|
19
20
|
import { resolveReviewCycleCap, resolveReviewHandoffCap } from '../verify/stall-detector-config.js';
|
|
20
21
|
import { getDeliveryIssues, rehomeIssueToDelivery } from '../queries/issues.js';
|
|
21
22
|
import { createEscalation, hasOpenFocusEscalation, hasOpenEscalationForDelivery } from '../queries/escalations.js';
|
|
@@ -82,6 +83,7 @@ export interface ReviewExitDeps {
|
|
|
82
83
|
emitLoopTrigger: typeof emitLoopTrigger;
|
|
83
84
|
getFocusReviewReportForSession: typeof getFocusReviewReportForSession;
|
|
84
85
|
getFocusReviewFiledIssueIds?: typeof getFocusReviewFiledIssueIds;
|
|
86
|
+
getFocusReviewFindingFacts?: typeof getFocusReviewFindingFacts;
|
|
85
87
|
createEscalation: typeof createEscalation;
|
|
86
88
|
}
|
|
87
89
|
export declare const defaultReviewExitDeps: ReviewExitDeps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-deps.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-deps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"review-exit-deps.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-deps.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,wBAA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AgDnC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
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/completion/review-coverage-seam.test.ts,
|
|
3
3
|
// packages/daemon/src/completion/review-cycle-churn-meter.test.ts,
|
|
4
|
+
// packages/daemon/src/completion/review-finding-class-routing.test.ts,
|
|
4
5
|
// packages/daemon/src/integration/failed-verdict-review-exit-respawn-regression.test.ts
|
|
5
6
|
// PINNED-BY-END
|
|
6
7
|
/**
|
|
@@ -22,6 +23,7 @@ import { getActiveFocuses } from '../queries/focus-discovery.js';
|
|
|
22
23
|
import { clearPendingReviewDirective, hasPendingSpawnDirective } from '../directive/directive-queue.js';
|
|
23
24
|
import { emitLoopTrigger } from '../loops/index.js';
|
|
24
25
|
import { getFocusDeliveries, getFocusIssues, clearReviewRequestedAt, releaseFocusArm, setReviewCycleCount, setReviewHandoffCount, getFocusReviewReportForSession, getFocusReviewFiledIssueIds, } from '../queries/focuses.js';
|
|
26
|
+
import { getFocusReviewFindingFacts } from '../queries/review-finding-facts.js';
|
|
25
27
|
import { resolveReviewCycleCap, resolveReviewHandoffCap } from '../verify/stall-detector-config.js';
|
|
26
28
|
import { getDeliveryIssues, rehomeIssueToDelivery } from '../queries/issues.js';
|
|
27
29
|
import { createEscalation, hasOpenFocusEscalation, hasOpenEscalationForDelivery, resolveOpenFocusEscalationsOfKind, resolveConvergedFocusEscalations } from '../queries/escalations.js';
|
|
@@ -77,6 +79,7 @@ export const defaultReviewExitDeps = {
|
|
|
77
79
|
emitLoopTrigger,
|
|
78
80
|
getFocusReviewReportForSession,
|
|
79
81
|
getFocusReviewFiledIssueIds,
|
|
82
|
+
getFocusReviewFindingFacts,
|
|
80
83
|
createEscalation,
|
|
81
84
|
};
|
|
82
85
|
//# sourceMappingURL=review-exit-deps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit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EAAE,EAAE;QAC9C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrF,CAAC;IACD,UAAU,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QAC7C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1F,CAAC;IACD,sBAAsB,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,MAAM,kBAAkB,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,IAAI;IACvG,gBAAgB;IAChB,4BAA4B;IAC5B,wBAAwB;IACxB,eAAe;IACf,8BAA8B;IAC9B,2BAA2B;IAC3B,0BAA0B;IAC1B,gBAAgB;CACjB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReviewFindingClasses } from './review-defect-detector.js';
|
|
1
2
|
import type { ReviewFiledFindingSummary } from './review-exit-escalations.js';
|
|
2
3
|
import type { ReviewExitDeps } from './review-exit-deps.js';
|
|
3
4
|
import type { FocusIssueInfo } from '../types/index.js';
|
|
@@ -20,6 +21,13 @@ export interface ReviewExitEvidence {
|
|
|
20
21
|
*/
|
|
21
22
|
focusIssues: FocusIssueInfo[];
|
|
22
23
|
reviewFiledIds: ReadonlySet<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Each review finding's RECORDED class (blocking / concern), keyed by issue id.
|
|
26
|
+
* Every blocking decision above keyed on it through isBlockingReviewFinding;
|
|
27
|
+
* carried so the foreign-finding scope decides with the same facts. Empty when
|
|
28
|
+
* nothing is recorded or the read failed (-> the priority fallback).
|
|
29
|
+
*/
|
|
30
|
+
findingClasses: ReviewFindingClasses;
|
|
23
31
|
}
|
|
24
32
|
/**
|
|
25
33
|
* Gather the review-exit evidence for a focus/session. Every read is best-effort:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-exit-evidence.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-evidence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"review-exit-evidence.d.ts","sourceRoot":"","sources":["../../src/completion/review-exit-evidence.ts"],"names":[],"mappings":"AAsBA,OAAO,EAKL,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKxD,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI,CAAC;IAChD,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,wBAAwB,EAAE,OAAO,CAAC;IAClC,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3C,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClD,oBAAoB,EAAE,yBAAyB,EAAE,CAAC;IAClD;;;;;OAKG;IACH,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC;;;;;OAKG;IACH,cAAc,EAAE,oBAAoB,CAAC;CACtC;AA8BD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAChG,OAAO,CAAC,kBAAkB,CAAC,CAqF7B"}
|
|
@@ -21,6 +21,28 @@ import { resolveAttributedDeliveryIds } from './review-exit-attribution.js';
|
|
|
21
21
|
import { reviewFiledIssueExistsComplete, blockingReviewFiledIssueExistsComplete, filterDeferrableReviewNotesComplete, filterBlockingReviewFiledComplete, } from './review-defect-detector.js';
|
|
22
22
|
import { createLogger } from '../shell/log.js';
|
|
23
23
|
const log = createLogger({ module: 'focus-executor' });
|
|
24
|
+
/**
|
|
25
|
+
* Best-effort read of the focus-wide review-filed id union and the findings'
|
|
26
|
+
* recorded classes. Prefers getFocusReviewFindingFacts (ids + classes); a deps
|
|
27
|
+
* object carrying only getFocusReviewFiledIssueIds reads ids with no recorded
|
|
28
|
+
* classes. A failure logs and degrades to empty (legacy window heuristic +
|
|
29
|
+
* priority fallback).
|
|
30
|
+
*/
|
|
31
|
+
async function readReviewFindingFacts(deps, focusId, focusName) {
|
|
32
|
+
try {
|
|
33
|
+
if (deps.getFocusReviewFindingFacts) {
|
|
34
|
+
const facts = await deps.getFocusReviewFindingFacts(focusId);
|
|
35
|
+
return { reviewFiledIds: new Set(facts.issueIds), findingClasses: facts.findingClasses };
|
|
36
|
+
}
|
|
37
|
+
if (deps.getFocusReviewFiledIssueIds) {
|
|
38
|
+
return { reviewFiledIds: new Set(await deps.getFocusReviewFiledIssueIds(focusId)), findingClasses: new Map() };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
log.warn(`[focus-executor] reading the review-filed findings failed for "${focusName}": ${err.message}`);
|
|
43
|
+
}
|
|
44
|
+
return { reviewFiledIds: new Set(), findingClasses: new Map() };
|
|
45
|
+
}
|
|
24
46
|
/**
|
|
25
47
|
* Gather the review-exit evidence for a focus/session. Every read is best-effort:
|
|
26
48
|
* a failure logs and degrades to the empty/no-evidence default, exactly as the
|
|
@@ -47,30 +69,19 @@ export async function gatherReviewExitEvidence(deps, args) {
|
|
|
47
69
|
// Treat read failure the same as missing.
|
|
48
70
|
}
|
|
49
71
|
let hasIssueEvidence = false;
|
|
50
|
-
// Whether any review-filed issue is BLOCKING (
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
72
|
+
// Whether any review-filed issue is BLOCKING (isBlockingReviewFinding: a
|
|
73
|
+
// recorded `blocking` fact, or -- none recorded -- P0/P1/unset priority). A
|
|
74
|
+
// review that filed ONLY deferrable notes converges cleanly and must not raise
|
|
75
|
+
// the review_missing_report notice or be labeled issue-evidence routing.
|
|
54
76
|
let hasBlockingIssueEvidence = false;
|
|
55
|
-
// Ids of open, review-filed,
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
// (every open issue blocking).
|
|
77
|
+
// Ids of open, review-filed, NON-blocking notes. Used to mark the matching
|
|
78
|
+
// reconciler issues so the verify-routing reconciler does not treat them as
|
|
79
|
+
// blocking open work. Empty on read failure => every open issue blocking.
|
|
59
80
|
let deferrableIssueIds = new Set();
|
|
60
|
-
// The focus-wide, time-independent
|
|
61
|
-
//
|
|
62
|
-
// issues so the classification below keys on
|
|
63
|
-
|
|
64
|
-
// to the legacy review-window heuristic alone.
|
|
65
|
-
let reviewFiledIds = new Set();
|
|
66
|
-
if (deps.getFocusReviewFiledIssueIds) {
|
|
67
|
-
try {
|
|
68
|
-
reviewFiledIds = new Set(await deps.getFocusReviewFiledIssueIds(focusId));
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
71
|
-
log.warn(`[focus-executor] getFocusReviewFiledIssueIds failed for "${focusName}": ${err.message}`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
81
|
+
// The focus-wide, time-independent review-filed id set (focus_reviews
|
|
82
|
+
// created_issue_ids union) and each finding's recorded class, read BEFORE the
|
|
83
|
+
// focus issues so the classification below keys on them.
|
|
84
|
+
const { reviewFiledIds, findingClasses } = await readReviewFindingFacts(deps, focusId, focusName);
|
|
74
85
|
// Delivery attribution for a gaps_found verdict: the deliveries that OWN this
|
|
75
86
|
// review's filed gap issues (the verdict's target set; see
|
|
76
87
|
// review-exit-attribution.ts). A delivery NOT in it converges on its own merits.
|
|
@@ -88,11 +99,11 @@ export async function gatherReviewExitEvidence(deps, args) {
|
|
|
88
99
|
try {
|
|
89
100
|
focusIssues = await deps.getFocusIssues(focusId);
|
|
90
101
|
hasIssueEvidence = reviewFiledIssueExistsComplete(focusIssues, reviewFiledIds, reviewRequestedAt);
|
|
91
|
-
hasBlockingIssueEvidence = blockingReviewFiledIssueExistsComplete(focusIssues, reviewFiledIds, reviewRequestedAt);
|
|
92
|
-
deferrableIssueIds = new Set(filterDeferrableReviewNotesComplete(focusIssues, reviewFiledIds, reviewRequestedAt).map(i => i.id));
|
|
93
|
-
attributedDeliveryIds = resolveAttributedDeliveryIds(focusIssues, createdIssueIdSet);
|
|
94
|
-
reviewFiledTargetDeliveryIds = resolveAttributedDeliveryIds(focusIssues, reviewFiledIds);
|
|
95
|
-
openBlockingFindings = filterBlockingReviewFiledComplete(focusIssues, reviewFiledIds, reviewRequestedAt)
|
|
102
|
+
hasBlockingIssueEvidence = blockingReviewFiledIssueExistsComplete(focusIssues, reviewFiledIds, reviewRequestedAt, findingClasses);
|
|
103
|
+
deferrableIssueIds = new Set(filterDeferrableReviewNotesComplete(focusIssues, reviewFiledIds, reviewRequestedAt, findingClasses).map(i => i.id));
|
|
104
|
+
attributedDeliveryIds = resolveAttributedDeliveryIds(focusIssues, createdIssueIdSet, findingClasses);
|
|
105
|
+
reviewFiledTargetDeliveryIds = resolveAttributedDeliveryIds(focusIssues, reviewFiledIds, findingClasses);
|
|
106
|
+
openBlockingFindings = filterBlockingReviewFiledComplete(focusIssues, reviewFiledIds, reviewRequestedAt, findingClasses)
|
|
96
107
|
.map(i => ({ id: i.id, key: i.key, title: i.title, deliveryId: i.deliveryId ?? null, description: i.description ?? null }));
|
|
97
108
|
}
|
|
98
109
|
catch (err) {
|
|
@@ -113,6 +124,7 @@ export async function gatherReviewExitEvidence(deps, args) {
|
|
|
113
124
|
openBlockingFindings,
|
|
114
125
|
focusIssues,
|
|
115
126
|
reviewFiledIds,
|
|
127
|
+
findingClasses,
|
|
116
128
|
};
|
|
117
129
|
}
|
|
118
130
|
//# sourceMappingURL=review-exit-evidence.js.map
|