@volter/supercode-orchestrator 0.5.132 → 0.5.133
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/board/ci.mjs +9 -4
- package/package.json +1 -1
package/board/ci.mjs
CHANGED
|
@@ -333,22 +333,27 @@ async function knownRepositories() {
|
|
|
333
333
|
|
|
334
334
|
/** Whether the arc's open PRs (`[{ url, head }]`) call for its review: some head no verdict judged that is new work.
|
|
335
335
|
* Before any verdict every unjudged head is. After a verdict, a PR it judged with a new head is, and so is a head
|
|
336
|
-
* committed after that verdict (a new PR carrying the fixes, or any PR after a verdict that named none).
|
|
337
|
-
* joins with a head committed before the verdict is not:
|
|
338
|
-
*
|
|
336
|
+
* committed after that verdict (a new PR carrying the fixes, or any PR after a verdict that named none). After changes
|
|
337
|
+
* are requested, a PR that joins with a head committed before the verdict is not: the next run is the implementer's
|
|
338
|
+
* until it pushes. After a pass nothing is owed by the implementer, so a PR that verdict's request did not name is due
|
|
339
|
+
* at whatever head it has: one that was a draft or stacked on another PR's branch when the request was made, and
|
|
340
|
+
* became the arc's once that PR merged (t_bbbd2086's #1355, committed 2 h before the pass that named only #1353). */
|
|
339
341
|
export async function reviewDue(board, id, prs) {
|
|
340
342
|
const unjudged = prs.filter((p) => !judgedHead(board, id, p.head));
|
|
341
343
|
if (!unjudged.length) return false;
|
|
342
344
|
const voided = board.db.prepare("SELECT r.payload FROM task_events v JOIN task_events r ON r.id=json_extract(v.payload,'$.review_request') AND r.task_id=v.task_id WHERE v.task_id=? AND v.kind='review_voided' ORDER BY v.id DESC LIMIT 1").get(id);
|
|
343
345
|
if (candidatePullRequests(voided && JSON.parse(voided.payload)?.ci).some(j => unjudged.some(p => p.url === j.pr.url && p.head === j.commit))) return true;
|
|
344
346
|
const last = board.db.prepare(`SELECT r.payload, (SELECT MIN(v.created_at) FROM task_events v WHERE v.task_id = r.task_id
|
|
345
|
-
AND v.kind IN ('changes_requested', 'review_pass') AND v.id > r.id) AS verdict_at
|
|
347
|
+
AND v.kind IN ('changes_requested', 'review_pass') AND v.id > r.id) AS verdict_at,
|
|
348
|
+
(SELECT v.kind FROM task_events v WHERE v.task_id = r.task_id
|
|
349
|
+
AND v.kind IN ('changes_requested', 'review_pass') AND v.id > r.id ORDER BY v.id LIMIT 1) AS verdict
|
|
346
350
|
FROM task_events r WHERE r.task_id = ? AND r.kind = 'review_requested'
|
|
347
351
|
AND EXISTS (SELECT 1 FROM task_events v WHERE v.task_id = r.task_id AND v.kind IN ('changes_requested', 'review_pass') AND v.id > r.id)
|
|
348
352
|
ORDER BY r.id DESC LIMIT 1`).get(id);
|
|
349
353
|
if (!last) return true;
|
|
350
354
|
const judged = candidatePullRequests(JSON.parse(last.payload)?.ci);
|
|
351
355
|
if (judged.some((j) => prs.some((p) => p.url === j.pr.url && p.head !== j.commit))) return true;
|
|
356
|
+
if (last.verdict === 'review_pass' && unjudged.some((p) => !judged.some((j) => j.pr.url === p.url))) return true;
|
|
352
357
|
for (const p of unjudged) if (((await commitTime(p)) ?? 0) > Number(last.verdict_at)) return true;
|
|
353
358
|
return false;
|
|
354
359
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.133",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The orchestrator runtime over the Volter Harness ontology: one typed operational model whose folder is its serialization, read and written through the harness orchestration doors (docs/ORCHESTRATOR-IR.md)",
|
|
6
6
|
"exports": {
|