@ai-dossier/sched 0.2.0 → 0.2.1
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/dist/dispatch.d.ts +103 -0
- package/dist/dispatch.d.ts.map +1 -0
- package/dist/dispatch.js +262 -0
- package/dist/dispatch.js.map +1 -0
- package/dist/engine.d.ts +71 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +590 -0
- package/dist/engine.js.map +1 -0
- package/dist/enqueue.d.ts +38 -0
- package/dist/enqueue.d.ts.map +1 -0
- package/dist/enqueue.js +220 -0
- package/dist/enqueue.js.map +1 -0
- package/dist/groundtruth.d.ts +74 -0
- package/dist/groundtruth.d.ts.map +1 -0
- package/dist/groundtruth.js +114 -0
- package/dist/groundtruth.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/journal.d.ts +32 -0
- package/dist/journal.d.ts.map +1 -0
- package/dist/journal.js +113 -0
- package/dist/journal.js.map +1 -0
- package/dist/persist.d.ts +54 -0
- package/dist/persist.d.ts.map +1 -0
- package/dist/persist.js +334 -0
- package/dist/persist.js.map +1 -0
- package/dist/project.d.ts +41 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +124 -0
- package/dist/project.js.map +1 -0
- package/dist/readiness.d.ts +43 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +102 -0
- package/dist/readiness.js.map +1 -0
- package/dist/scheduler.d.ts +66 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +174 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/state.d.ts +39 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +360 -0
- package/dist/state.js.map +1 -0
- package/dist/status.d.ts +32 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +76 -0
- package/dist/status.js.map +1 -0
- package/dist/types.d.ts +214 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +87 -0
- package/dist/types.js.map +1 -0
- package/package.json +2 -2
package/dist/state.js
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure state machines for the scheduler core — RFC-0001 §D as explicit typed
|
|
4
|
+
* transitions. Every function here is pure: it takes a state and returns a new
|
|
5
|
+
* state (immutable spreads, like `packages/worktree-pool/src/pool-state.ts`),
|
|
6
|
+
* and every edge NOT in the tables throws `IllegalTransitionError` (AC3).
|
|
7
|
+
*
|
|
8
|
+
* Failure edges: RFC-0001 §D.1 states "any → blocked(dep-failed) |
|
|
9
|
+
* decision-pending | failed(escalation-cap)" — encoded generically for every
|
|
10
|
+
* non-terminal issue status rather than repeated per row.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.TRANSITIONS = void 0;
|
|
14
|
+
exports.createEmptyState = createEmptyState;
|
|
15
|
+
exports.validateState = validateState;
|
|
16
|
+
exports.transitionIssue = transitionIssue;
|
|
17
|
+
exports.transitionBatch = transitionBatch;
|
|
18
|
+
exports.transitionSlot = transitionSlot;
|
|
19
|
+
exports.findEntry = findEntry;
|
|
20
|
+
exports.findBatch = findBatch;
|
|
21
|
+
const types_1 = require("./types");
|
|
22
|
+
// --- Transition tables ---
|
|
23
|
+
const ISSUE_BASE_TRANSITIONS = {
|
|
24
|
+
queued: ['classified'],
|
|
25
|
+
classified: ['dispatched', 'batched'],
|
|
26
|
+
dispatched: ['shipped'],
|
|
27
|
+
shipped: ['done'],
|
|
28
|
+
// batched/waiting/validated also carry `evicted`: RFC-0001 §D.2 dissolving
|
|
29
|
+
// requeues members at ANY batch stage, not just mid-member (F.8).
|
|
30
|
+
batched: ['waiting', 'evicted'],
|
|
31
|
+
waiting: ['in-work', 'evicted'],
|
|
32
|
+
'in-work': ['committed', 'evicted'],
|
|
33
|
+
committed: ['validated', 'evicted'],
|
|
34
|
+
validated: ['shipped-in-batch', 'evicted'],
|
|
35
|
+
'shipped-in-batch': ['done'],
|
|
36
|
+
evicted: ['requeued'],
|
|
37
|
+
requeued: ['dispatched'],
|
|
38
|
+
blocked: ['queued', 'waiting', 'evicted'],
|
|
39
|
+
'decision-pending': ['queued'],
|
|
40
|
+
done: [],
|
|
41
|
+
failed: [],
|
|
42
|
+
};
|
|
43
|
+
/** Failure edges RFC-0001 §D.1 attaches to ANY state (blocked / decision-pending / failed). */
|
|
44
|
+
const ISSUE_UNIVERSAL_FAILURE_EDGES = [
|
|
45
|
+
'blocked',
|
|
46
|
+
'decision-pending',
|
|
47
|
+
'failed',
|
|
48
|
+
];
|
|
49
|
+
function allowedIssueTransitions(from) {
|
|
50
|
+
const base = ISSUE_BASE_TRANSITIONS[from];
|
|
51
|
+
if (types_1.TERMINAL_ISSUE_STATUSES.has(from))
|
|
52
|
+
return base; // no failure edges out of terminal states
|
|
53
|
+
return [...base, ...ISSUE_UNIVERSAL_FAILURE_EDGES];
|
|
54
|
+
}
|
|
55
|
+
const BATCH_TRANSITIONS = {
|
|
56
|
+
forming: ['ready', 'dissolving'],
|
|
57
|
+
ready: ['executing', 'dissolving'],
|
|
58
|
+
// executing → executing advances the member pointer (i/N); the ⟲ in RFC-0001 §D.2.
|
|
59
|
+
executing: ['executing', 'validating', 'dissolving'],
|
|
60
|
+
validating: ['attributing', 'reviewing', 'dissolving'],
|
|
61
|
+
attributing: ['fixing', 'evicting'],
|
|
62
|
+
fixing: ['validating', 'dissolving'],
|
|
63
|
+
evicting: ['validating', 'dissolving'],
|
|
64
|
+
reviewing: ['shipping', 'dissolving'],
|
|
65
|
+
shipping: ['awaiting-merge', 'dissolving'],
|
|
66
|
+
'awaiting-merge': ['rebasing', 'merged'],
|
|
67
|
+
rebasing: ['re-validating', 'dissolving'],
|
|
68
|
+
're-validating': ['shipping', 'dissolving'],
|
|
69
|
+
merged: ['deployed'],
|
|
70
|
+
deployed: ['reported'],
|
|
71
|
+
reported: ['done'],
|
|
72
|
+
done: [],
|
|
73
|
+
dissolving: ['dissolved'],
|
|
74
|
+
dissolved: [],
|
|
75
|
+
};
|
|
76
|
+
const SLOT_BASE_TRANSITIONS = {
|
|
77
|
+
idle: ['assigned'],
|
|
78
|
+
// assigned → idle releases a unit that was claimed but never spawned.
|
|
79
|
+
assigned: ['running', 'idle'],
|
|
80
|
+
running: ['exited', 'recovering'],
|
|
81
|
+
exited: ['verifying'],
|
|
82
|
+
// #464: verifying → recovering is the verify-fail rail — an agent that
|
|
83
|
+
// exited WITHOUT a verified completion is redispatched stronger, exactly
|
|
84
|
+
// like a stall (RFC-0001 §D.3's diagram predates AC2's "an agent exiting
|
|
85
|
+
// is never proof of completion"; this edge is its redispatch path).
|
|
86
|
+
verifying: ['complete', 'recovering'],
|
|
87
|
+
complete: ['idle'],
|
|
88
|
+
recovering: ['running', 'failed'],
|
|
89
|
+
failed: ['idle'],
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Operator-abort rail (`sched abandon`, RFC-0001 §D.3 extension): any slot
|
|
93
|
+
* holding a unit that has not completed verification may be forced to
|
|
94
|
+
* `failed` → `idle`. `complete` is excluded — verification passed and the
|
|
95
|
+
* slot is already releasing.
|
|
96
|
+
*/
|
|
97
|
+
const SLOT_ABORTABLE_STATUSES = new Set([
|
|
98
|
+
'assigned',
|
|
99
|
+
'running',
|
|
100
|
+
'exited',
|
|
101
|
+
'verifying',
|
|
102
|
+
'recovering',
|
|
103
|
+
]);
|
|
104
|
+
function allowedSlotTransitions(from) {
|
|
105
|
+
const base = SLOT_BASE_TRANSITIONS[from];
|
|
106
|
+
if (SLOT_ABORTABLE_STATUSES.has(from))
|
|
107
|
+
return [...base, 'failed'];
|
|
108
|
+
return base;
|
|
109
|
+
}
|
|
110
|
+
// --- Construction and validation ---
|
|
111
|
+
/** An empty state carries no timestamps — nothing exists yet to stamp. */
|
|
112
|
+
function createEmptyState() {
|
|
113
|
+
return {
|
|
114
|
+
schema_version: types_1.SCHEMA_VERSION,
|
|
115
|
+
paused: false,
|
|
116
|
+
entries: [],
|
|
117
|
+
batches: [],
|
|
118
|
+
slots: [],
|
|
119
|
+
next_slot_id: 1,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const ISSUE_STATUSES = new Set(Object.keys(ISSUE_BASE_TRANSITIONS));
|
|
123
|
+
const BATCH_STATUSES = new Set(Object.keys(BATCH_TRANSITIONS));
|
|
124
|
+
const SLOT_STATUSES = new Set(Object.keys(SLOT_BASE_TRANSITIONS));
|
|
125
|
+
const CYCLE_MODES = new Set(['full', 'slot']);
|
|
126
|
+
const MODEL_TIERS = new Set(['mechanical', 'mid', 'strong']);
|
|
127
|
+
function isIsoDateString(value) {
|
|
128
|
+
return typeof value === 'string' && !Number.isNaN(Date.parse(value));
|
|
129
|
+
}
|
|
130
|
+
function validateQueueEntry(data, where) {
|
|
131
|
+
if (data === null || typeof data !== 'object' || Array.isArray(data)) {
|
|
132
|
+
throw new Error(`${where(0)}: entry must be an object`);
|
|
133
|
+
}
|
|
134
|
+
const entry = data;
|
|
135
|
+
if (!Number.isInteger(entry.issue) || entry.issue <= 0) {
|
|
136
|
+
throw new Error(`${where(entry.issue)}: issue must be a positive integer`);
|
|
137
|
+
}
|
|
138
|
+
const label = where(entry.issue);
|
|
139
|
+
if (!CYCLE_MODES.has(String(entry.mode))) {
|
|
140
|
+
throw new Error(`${label}: mode must be 'full' or 'slot'`);
|
|
141
|
+
}
|
|
142
|
+
if (entry.mode === 'full' ? entry.batch !== null : typeof entry.batch !== 'string') {
|
|
143
|
+
throw new Error(`${label}: batch must be a string for slot mode, null for full mode`);
|
|
144
|
+
}
|
|
145
|
+
if (!Array.isArray(entry.deps) ||
|
|
146
|
+
entry.deps.some((d) => !Number.isInteger(d) || d <= 0)) {
|
|
147
|
+
throw new Error(`${label}: deps must be an array of positive issue numbers`);
|
|
148
|
+
}
|
|
149
|
+
if (!MODEL_TIERS.has(String(entry.tier))) {
|
|
150
|
+
throw new Error(`${label}: tier must be mechanical | mid | strong`);
|
|
151
|
+
}
|
|
152
|
+
if (!ISSUE_STATUSES.has(String(entry.status))) {
|
|
153
|
+
throw new Error(`${label}: unknown issue status ${String(entry.status)}`);
|
|
154
|
+
}
|
|
155
|
+
if (entry.reason !== null && typeof entry.reason !== 'string') {
|
|
156
|
+
throw new Error(`${label}: reason must be a string or null`);
|
|
157
|
+
}
|
|
158
|
+
if (!isIsoDateString(entry.enqueued_at) || !isIsoDateString(entry.updated_at)) {
|
|
159
|
+
throw new Error(`${label}: enqueued_at/updated_at must be ISO date strings`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Strict validation of persisted state (mirrors pool-state's `validateState`):
|
|
164
|
+
* wrong schema version or malformed shape throws instead of being coerced, so
|
|
165
|
+
* a corrupt file is a loud failure, never a silent queue reset.
|
|
166
|
+
*
|
|
167
|
+
* Legacy schema versions (1.0.0, pre-#464) are accepted and migrated: slot
|
|
168
|
+
* `branch`/`last_head` backfill to null and the state upgrades to the current
|
|
169
|
+
* schema on the next save.
|
|
170
|
+
*/
|
|
171
|
+
function validateState(data) {
|
|
172
|
+
if (!data || typeof data !== 'object') {
|
|
173
|
+
throw new Error('Scheduler state must be an object');
|
|
174
|
+
}
|
|
175
|
+
const obj = data;
|
|
176
|
+
const version = String(obj.schema_version);
|
|
177
|
+
if (version !== types_1.SCHEMA_VERSION && !types_1.LEGACY_SCHEMA_VERSIONS.includes(version)) {
|
|
178
|
+
throw new Error(`Unsupported schema version: ${version} (expected ${types_1.SCHEMA_VERSION})`);
|
|
179
|
+
}
|
|
180
|
+
if (typeof obj.paused !== 'boolean') {
|
|
181
|
+
throw new Error('Scheduler state must have a paused boolean');
|
|
182
|
+
}
|
|
183
|
+
if (!Array.isArray(obj.entries)) {
|
|
184
|
+
throw new Error('Scheduler state must have an entries array');
|
|
185
|
+
}
|
|
186
|
+
obj.entries.forEach((entry, i) => {
|
|
187
|
+
validateQueueEntry(entry, (n) => `entries[${i}] (issue ${n})`);
|
|
188
|
+
});
|
|
189
|
+
const seenIssues = new Set();
|
|
190
|
+
for (const entry of obj.entries) {
|
|
191
|
+
if (seenIssues.has(entry.issue)) {
|
|
192
|
+
throw new Error(`Duplicate queue entry for issue ${entry.issue}`);
|
|
193
|
+
}
|
|
194
|
+
seenIssues.add(entry.issue);
|
|
195
|
+
}
|
|
196
|
+
if (!Array.isArray(obj.batches)) {
|
|
197
|
+
throw new Error('Scheduler state must have a batches array');
|
|
198
|
+
}
|
|
199
|
+
const seenBatches = new Set();
|
|
200
|
+
for (const batch of obj.batches) {
|
|
201
|
+
if (typeof batch.id !== 'string' || batch.id.length === 0) {
|
|
202
|
+
throw new Error('Batch id must be a non-empty string');
|
|
203
|
+
}
|
|
204
|
+
if (seenBatches.has(batch.id)) {
|
|
205
|
+
throw new Error(`Duplicate batch id ${batch.id}`);
|
|
206
|
+
}
|
|
207
|
+
seenBatches.add(batch.id);
|
|
208
|
+
if (!BATCH_STATUSES.has(String(batch.status))) {
|
|
209
|
+
throw new Error(`Batch ${batch.id}: unknown batch status ${String(batch.status)}`);
|
|
210
|
+
}
|
|
211
|
+
if (!Array.isArray(batch.members) ||
|
|
212
|
+
batch.members.some((m) => !Number.isInteger(m) || m <= 0)) {
|
|
213
|
+
throw new Error(`Batch ${batch.id}: members must be positive issue numbers`);
|
|
214
|
+
}
|
|
215
|
+
if (typeof batch.base_branch !== 'string' || batch.base_branch.length === 0) {
|
|
216
|
+
throw new Error(`Batch ${batch.id}: base_branch must be a non-empty string`);
|
|
217
|
+
}
|
|
218
|
+
if (!Number.isInteger(batch.executing_member) || batch.executing_member < 0) {
|
|
219
|
+
throw new Error(`Batch ${batch.id}: executing_member must be a non-negative integer`);
|
|
220
|
+
}
|
|
221
|
+
if (!isIsoDateString(batch.created_at) || !isIsoDateString(batch.updated_at)) {
|
|
222
|
+
throw new Error(`Batch ${batch.id}: created_at/updated_at must be ISO date strings`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
for (const entry of obj.entries) {
|
|
226
|
+
if (entry.batch !== null && !seenBatches.has(entry.batch)) {
|
|
227
|
+
throw new Error(`Issue ${entry.issue}: batch ${entry.batch} does not exist`);
|
|
228
|
+
}
|
|
229
|
+
if (entry.batch !== null) {
|
|
230
|
+
const batch = obj.batches.find((b) => b.id === entry.batch);
|
|
231
|
+
if (batch && !batch.members.includes(entry.issue)) {
|
|
232
|
+
throw new Error(`Issue ${entry.issue}: not listed in batch ${entry.batch} members`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (!Array.isArray(obj.slots)) {
|
|
237
|
+
throw new Error('Scheduler state must have a slots array');
|
|
238
|
+
}
|
|
239
|
+
const seenSlots = new Set();
|
|
240
|
+
for (const slot of obj.slots) {
|
|
241
|
+
if (!Number.isInteger(slot.id) || slot.id <= 0) {
|
|
242
|
+
throw new Error('Slot id must be a positive integer');
|
|
243
|
+
}
|
|
244
|
+
if (seenSlots.has(slot.id)) {
|
|
245
|
+
throw new Error(`Duplicate slot id ${slot.id}`);
|
|
246
|
+
}
|
|
247
|
+
seenSlots.add(slot.id);
|
|
248
|
+
if (!SLOT_STATUSES.has(String(slot.status))) {
|
|
249
|
+
throw new Error(`Slot ${slot.id}: unknown slot status ${String(slot.status)}`);
|
|
250
|
+
}
|
|
251
|
+
if (slot.unit !== null && typeof slot.unit !== 'string') {
|
|
252
|
+
throw new Error(`Slot ${slot.id}: unit must be a string or null`);
|
|
253
|
+
}
|
|
254
|
+
if (slot.pid !== null && !Number.isInteger(slot.pid)) {
|
|
255
|
+
throw new Error(`Slot ${slot.id}: pid must be an integer or null`);
|
|
256
|
+
}
|
|
257
|
+
if (slot.pid_start !== null &&
|
|
258
|
+
slot.pid_start !== undefined &&
|
|
259
|
+
(!Number.isInteger(slot.pid_start) || slot.pid_start < 0)) {
|
|
260
|
+
throw new Error(`Slot ${slot.id}: pid_start must be a non-negative integer or null`);
|
|
261
|
+
}
|
|
262
|
+
if (slot.phase !== null && typeof slot.phase !== 'string') {
|
|
263
|
+
throw new Error(`Slot ${slot.id}: phase must be a string or null`);
|
|
264
|
+
}
|
|
265
|
+
if (slot.last_progress_at !== null && !isIsoDateString(slot.last_progress_at)) {
|
|
266
|
+
throw new Error(`Slot ${slot.id}: last_progress_at must be an ISO string or null`);
|
|
267
|
+
}
|
|
268
|
+
if (slot.branch !== null && slot.branch !== undefined && typeof slot.branch !== 'string') {
|
|
269
|
+
throw new Error(`Slot ${slot.id}: branch must be a string or null`);
|
|
270
|
+
}
|
|
271
|
+
if (slot.last_head !== null &&
|
|
272
|
+
slot.last_head !== undefined &&
|
|
273
|
+
typeof slot.last_head !== 'string') {
|
|
274
|
+
throw new Error(`Slot ${slot.id}: last_head must be a string or null`);
|
|
275
|
+
}
|
|
276
|
+
if (!Number.isInteger(slot.recoveries) || slot.recoveries < 0) {
|
|
277
|
+
throw new Error(`Slot ${slot.id}: recoveries must be a non-negative integer`);
|
|
278
|
+
}
|
|
279
|
+
if (!isIsoDateString(slot.updated_at)) {
|
|
280
|
+
throw new Error(`Slot ${slot.id}: updated_at must be an ISO date string`);
|
|
281
|
+
}
|
|
282
|
+
if (slot.status === 'idle' && slot.unit !== null) {
|
|
283
|
+
throw new Error(`Slot ${slot.id}: idle slot must not hold a unit`);
|
|
284
|
+
}
|
|
285
|
+
if (slot.status !== 'idle' && slot.unit === null) {
|
|
286
|
+
throw new Error(`Slot ${slot.id}: non-idle slot must hold a unit`);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
if (!Number.isInteger(obj.next_slot_id) || obj.next_slot_id < 1) {
|
|
290
|
+
throw new Error('next_slot_id must be a positive integer');
|
|
291
|
+
}
|
|
292
|
+
// Migration: pre-#464 (1.0.0) slots carry no branch/last_head/pid_start —
|
|
293
|
+
// backfill null so the returned state always has the current shape.
|
|
294
|
+
const slots = obj.slots.map((slot) => ({
|
|
295
|
+
...slot,
|
|
296
|
+
branch: slot.branch ?? null,
|
|
297
|
+
last_head: slot.last_head ?? null,
|
|
298
|
+
pid_start: slot.pid_start ?? null,
|
|
299
|
+
}));
|
|
300
|
+
return { ...data, schema_version: types_1.SCHEMA_VERSION, slots };
|
|
301
|
+
}
|
|
302
|
+
function transition(kind, allowed, current, to, patch, now) {
|
|
303
|
+
const from = current.status;
|
|
304
|
+
if (!allowed(from).includes(to)) {
|
|
305
|
+
throw new types_1.IllegalTransitionError(kind, from, to);
|
|
306
|
+
}
|
|
307
|
+
return { ...current, ...patch, status: to, updated_at: now.toISOString() };
|
|
308
|
+
}
|
|
309
|
+
// --- Issue transitions ---
|
|
310
|
+
function transitionIssue(state, issue, to, patch = {}, now = new Date()) {
|
|
311
|
+
const idx = state.entries.findIndex((e) => e.issue === issue);
|
|
312
|
+
if (idx === -1) {
|
|
313
|
+
throw new types_1.SchedNotFoundError(`Queue entry not found: ${issue}`);
|
|
314
|
+
}
|
|
315
|
+
const entries = [...state.entries];
|
|
316
|
+
entries[idx] = transition('issue', (from) => allowedIssueTransitions(from), entries[idx], to, patch, now);
|
|
317
|
+
return { ...state, entries };
|
|
318
|
+
}
|
|
319
|
+
// --- Batch transitions ---
|
|
320
|
+
function transitionBatch(state, batchId, to, patch = {}, now = new Date()) {
|
|
321
|
+
const idx = state.batches.findIndex((b) => b.id === batchId);
|
|
322
|
+
if (idx === -1) {
|
|
323
|
+
throw new types_1.SchedNotFoundError(`Batch not found: ${batchId}`);
|
|
324
|
+
}
|
|
325
|
+
const batches = [...state.batches];
|
|
326
|
+
batches[idx] = transition('batch', (from) => BATCH_TRANSITIONS[from], batches[idx], to, patch, now);
|
|
327
|
+
return { ...state, batches };
|
|
328
|
+
}
|
|
329
|
+
// --- Slot transitions ---
|
|
330
|
+
function transitionSlot(state, slotId, to, patch = {}, now = new Date()) {
|
|
331
|
+
const idx = state.slots.findIndex((s) => s.id === slotId);
|
|
332
|
+
if (idx === -1) {
|
|
333
|
+
throw new types_1.SchedNotFoundError(`Slot not found: ${slotId}`);
|
|
334
|
+
}
|
|
335
|
+
const slots = [...state.slots];
|
|
336
|
+
const clearing = to === 'idle'
|
|
337
|
+
? { unit: null, pid: null, pid_start: null, phase: null, branch: null, last_head: null }
|
|
338
|
+
: {};
|
|
339
|
+
const resetting = to === 'idle' ? { recoveries: 0 } : {};
|
|
340
|
+
slots[idx] = transition('slot', (from) => allowedSlotTransitions(from), slots[idx], to, { ...clearing, ...resetting, ...patch }, now);
|
|
341
|
+
return { ...state, slots };
|
|
342
|
+
}
|
|
343
|
+
// --- Lookups ---
|
|
344
|
+
function findEntry(state, issue) {
|
|
345
|
+
return state.entries.find((e) => e.issue === issue);
|
|
346
|
+
}
|
|
347
|
+
function findBatch(state, batchId) {
|
|
348
|
+
return state.batches.find((b) => b.id === batchId);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* All transition tables, exposed as public API — future consumers (#464's
|
|
352
|
+
* dispatcher, status previews) render next-state choices from here instead of
|
|
353
|
+
* re-deriving the RFC tables.
|
|
354
|
+
*/
|
|
355
|
+
exports.TRANSITIONS = {
|
|
356
|
+
issue: (from) => allowedIssueTransitions(from),
|
|
357
|
+
batch: (from) => BATCH_TRANSITIONS[from],
|
|
358
|
+
slot: (from) => allowedSlotTransitions(from),
|
|
359
|
+
};
|
|
360
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAkHH,4CASC;AAwDD,sCA6IC;AA0BD,0CAqBC;AAID,0CAqBC;AAID,wCA0BC;AAID,8BAEC;AAED,8BAEC;AA9aD,mCAaiB;AAEjB,4BAA4B;AAE5B,MAAM,sBAAsB,GAAuC;IACjE,MAAM,EAAE,CAAC,YAAY,CAAC;IACtB,UAAU,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;IACrC,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,OAAO,E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AAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AACtD,CAAC;AAED,SAAgB,SAAS,CAAC,KAAiB,EAAE,OAAe;IAC1D,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACU,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,uBAAuB,CAAC,IAAI,CAAC;IAC3D,KAAK,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC;IACrD,IAAI,EAAE,CAAC,IAAgB,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;CACzD,CAAC"}
|
package/dist/status.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sched status` report (AC4): queue, slots, batches, and the blocked/failed
|
|
3
|
+
* sets as a machine-readable report. Text rendering lives in the CLI
|
|
4
|
+
* (`cli/src/commands/sched.ts`, on top of the CLI's shared `renderTable`) —
|
|
5
|
+
* the package deliberately has no dependency on CLI utilities.
|
|
6
|
+
*/
|
|
7
|
+
import type { BatchEntry, QueueEntry, SchedConfig, SchedState, SlotEntry } from './types';
|
|
8
|
+
/** An entry that cannot progress, with the human reason. */
|
|
9
|
+
export interface BlockedItem {
|
|
10
|
+
issue: number;
|
|
11
|
+
status: string;
|
|
12
|
+
reason: string;
|
|
13
|
+
}
|
|
14
|
+
/** Machine-readable status report (`sched status --json`). */
|
|
15
|
+
export interface StatusReport {
|
|
16
|
+
/** Project slug the report was built for (which state bucket this is). */
|
|
17
|
+
project: string;
|
|
18
|
+
paused: boolean;
|
|
19
|
+
max_slots: number;
|
|
20
|
+
live_slots: number;
|
|
21
|
+
queue: QueueEntry[];
|
|
22
|
+
slots: SlotEntry[];
|
|
23
|
+
batches: BatchEntry[];
|
|
24
|
+
/** How many units are runnable right now. */
|
|
25
|
+
runnable: number;
|
|
26
|
+
/** Which units are runnable (`issue:<n>` / `batch:<id>`), in dispatch order. */
|
|
27
|
+
runnable_units: string[];
|
|
28
|
+
blocked: BlockedItem[];
|
|
29
|
+
failed: QueueEntry[];
|
|
30
|
+
}
|
|
31
|
+
export declare function buildStatusReport(state: SchedState, config: SchedConfig, project: string): StatusReport;
|
|
32
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG1F,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,GACd,YAAY,CAwEd"}
|
package/dist/status.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `sched status` report (AC4): queue, slots, batches, and the blocked/failed
|
|
4
|
+
* sets as a machine-readable report. Text rendering lives in the CLI
|
|
5
|
+
* (`cli/src/commands/sched.ts`, on top of the CLI's shared `renderTable`) —
|
|
6
|
+
* the package deliberately has no dependency on CLI utilities.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.buildStatusReport = buildStatusReport;
|
|
10
|
+
const readiness_1 = require("./readiness");
|
|
11
|
+
const types_1 = require("./types");
|
|
12
|
+
function buildStatusReport(state, config, project) {
|
|
13
|
+
const blocked = [];
|
|
14
|
+
const failed = [];
|
|
15
|
+
const describeBlocker = (b) => b.reason === 'not-in-queue'
|
|
16
|
+
? `dependency #${b.dep} is not in the queue`
|
|
17
|
+
: `dependency #${b.dep} not merged (status: ${b.depStatus ?? 'unknown'})`;
|
|
18
|
+
for (const entry of state.entries) {
|
|
19
|
+
if (entry.status === 'failed') {
|
|
20
|
+
failed.push(entry);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (entry.status === 'blocked' || entry.status === 'decision-pending') {
|
|
24
|
+
blocked.push({
|
|
25
|
+
issue: entry.issue,
|
|
26
|
+
status: entry.status,
|
|
27
|
+
reason: entry.reason ?? entry.status,
|
|
28
|
+
});
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (types_1.TERMINAL_ISSUE_STATUSES.has(entry.status) || types_1.SATISFIED_ISSUE_STATUSES.has(entry.status)) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (entry.mode === 'full') {
|
|
35
|
+
if (readiness_1.DISPATCHABLE_ISSUE_STATUSES.has(entry.status)) {
|
|
36
|
+
const blockers = (0, readiness_1.dependencyBlockers)(state, entry);
|
|
37
|
+
if (blockers.length > 0) {
|
|
38
|
+
blocked.push({
|
|
39
|
+
issue: entry.issue,
|
|
40
|
+
status: entry.status,
|
|
41
|
+
reason: blockers.map(describeBlocker).join('; '),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
// Slot mode: the member runs when its batch dispatches. Cross-batch /
|
|
48
|
+
// external dependency blockers come from the batch's edge set.
|
|
49
|
+
const batch = state.batches.find((b) => b.id === entry.batch);
|
|
50
|
+
if (batch && batch.status !== 'forming' && batch.status !== 'dissolved') {
|
|
51
|
+
const mine = (0, readiness_1.batchBlockers)(state, batch).filter((b) => b.issue === entry.issue);
|
|
52
|
+
if (mine.length > 0) {
|
|
53
|
+
blocked.push({
|
|
54
|
+
issue: entry.issue,
|
|
55
|
+
status: entry.status,
|
|
56
|
+
reason: mine.map(describeBlocker).join('; '),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const units = state.paused ? [] : (0, readiness_1.runnableUnits)(state);
|
|
62
|
+
return {
|
|
63
|
+
project,
|
|
64
|
+
paused: state.paused,
|
|
65
|
+
max_slots: config.max_slots,
|
|
66
|
+
live_slots: state.slots.filter((s) => types_1.LIVE_SLOT_STATUSES.has(s.status)).length,
|
|
67
|
+
queue: state.entries,
|
|
68
|
+
slots: state.slots,
|
|
69
|
+
batches: state.batches,
|
|
70
|
+
runnable: units.length,
|
|
71
|
+
runnable_units: units.map((u) => u.kind === 'issue' ? `issue:${u.issue}` : `batch:${u.batch}`),
|
|
72
|
+
blocked,
|
|
73
|
+
failed,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAoCH,8CA4EC;AA9GD,2CAK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