@volter/supercode-orchestrator 0.5.220 → 0.5.222
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/listing.mjs +8 -3
- package/package.json +3 -3
package/board/listing.mjs
CHANGED
|
@@ -103,11 +103,16 @@ export async function listCardsInTurns(db, options = {}) {
|
|
|
103
103
|
const cards = await readCardsInTurns(db, options, revision);
|
|
104
104
|
if (cards !== null) return cards;
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
// Both reads saw a write land between their turns: a burst, as the round a generation switch wakes makes. The third
|
|
107
|
+
// reads every batch in one turn, so a write by this process (the board's one writer) cannot land inside it; it still
|
|
108
|
+
// validates, so a writer outside this process is still refused. It holds the loop for one listing, and only here.
|
|
109
|
+
const cards = await readCardsInTurns(db, options, measured('read revision', () => listRevision(db)), { inTurns: false });
|
|
110
|
+
if (cards !== null) return cards;
|
|
111
|
+
throw Object.assign(new Error('board changed during all three listing reads; run list again'), { code: 'board_listing_changed' });
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
async function readCardsInTurns(db, { detailed = false, status = null, assignee = null, machine = null, includeArchived = false, includeSubtasks = false,
|
|
110
|
-
tenant = null, session = null, workflowTemplateId = null, stepKey = null, tags = [], nativeHolds = false }, revision) {
|
|
115
|
+
tenant = null, session = null, workflowTemplateId = null, stepKey = null, tags = [], nativeHolds = false }, revision, { inTurns = true } = {}) {
|
|
111
116
|
const out = [];
|
|
112
117
|
const page = prepared(db, listPageSql(detailed, tags.length, { nativeHolds })), candidates = prepared(db, LIST_CANDIDATES_SQL);
|
|
113
118
|
const ceiling = measured('last candidate', () => prepared(db, "SELECT COALESCE(MAX(id), '') AS cursor FROM tasks").get().cursor);
|
|
@@ -135,7 +140,7 @@ async function readCardsInTurns(db, { detailed = false, status = null, assignee
|
|
|
135
140
|
}
|
|
136
141
|
});
|
|
137
142
|
cursor = range.last;
|
|
138
|
-
await nextTurn();
|
|
143
|
+
if (inTurns) await nextTurn();
|
|
139
144
|
}
|
|
140
145
|
if (!measured('validate revision', () => sameRevision(revision, listRevision(db)))) return null;
|
|
141
146
|
// The candidate index uses id order; restore the original task row order for tied sorts.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.222",
|
|
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": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"check-types": "node scripts/generate-types.mjs --check"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@volter/supercode-teams": "^0.3.
|
|
39
|
+
"@volter/supercode-teams": "^0.3.379",
|
|
40
40
|
"@volter/supercode-terminal": "^0.3.12",
|
|
41
41
|
"@volter/supercode-harness-sdk": "^0.3.106",
|
|
42
|
-
"@volter/teams": "0.2.
|
|
42
|
+
"@volter/teams": "0.2.105",
|
|
43
43
|
"@volter/ztrack": "^2.4.23",
|
|
44
44
|
"yaml": "^2.9.0"
|
|
45
45
|
},
|