spur-board 0.19.0 → 0.20.0
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/daemon.mjs +15 -3
- package/package.json +1 -1
package/dist/daemon.mjs
CHANGED
|
@@ -11484,6 +11484,11 @@ async function reconcileMembership(trx, config, completeSince, at) {
|
|
|
11484
11484
|
}
|
|
11485
11485
|
//#endregion
|
|
11486
11486
|
//#region ../core/src/domain/health.ts
|
|
11487
|
+
const ENDED_WORKER_KINDS = {
|
|
11488
|
+
complete: "worker_completed",
|
|
11489
|
+
kill: "worker_killed",
|
|
11490
|
+
vanished: "worker_vanished"
|
|
11491
|
+
};
|
|
11487
11492
|
/** Derive actionable health facts without reading the clock or mutating input. */
|
|
11488
11493
|
function evaluateSessionHealth(input) {
|
|
11489
11494
|
const { sessions, tasks, spur, config, now } = input;
|
|
@@ -11530,7 +11535,7 @@ function evaluateSessionHealth(input) {
|
|
|
11530
11535
|
const flag = {
|
|
11531
11536
|
taskId: session.taskId,
|
|
11532
11537
|
sessionId: session.id,
|
|
11533
|
-
kind:
|
|
11538
|
+
kind: ENDED_WORKER_KINDS[session.endReason]
|
|
11534
11539
|
};
|
|
11535
11540
|
(spur.observationComplete ? flags : held).push(flag);
|
|
11536
11541
|
}
|
|
@@ -11567,6 +11572,11 @@ function evaluateSessionHealth(input) {
|
|
|
11567
11572
|
//#endregion
|
|
11568
11573
|
//#region ../core/src/app/fromYou.ts
|
|
11569
11574
|
const episodeSchema = z.object({ startedAt: z.number() }).nullable();
|
|
11575
|
+
const ENDED_WORKER_LABELS = {
|
|
11576
|
+
worker_completed: "worker ended (completed), no PR",
|
|
11577
|
+
worker_killed: "worker ended (killed), no PR",
|
|
11578
|
+
worker_vanished: "worker vanished, no PR"
|
|
11579
|
+
};
|
|
11570
11580
|
/** Reconciles every item in the caller's observation or tick transaction. */
|
|
11571
11581
|
async function reconcileItems(trx, config, now, spurComplete) {
|
|
11572
11582
|
const candidates = [];
|
|
@@ -11712,14 +11722,16 @@ async function reconcileItems(trx, config, now, spurComplete) {
|
|
|
11712
11722
|
const task = taskById.get(Number(flag.taskId));
|
|
11713
11723
|
if (task === void 0) continue;
|
|
11714
11724
|
const fact = subjects.find((subject) => subject.taskId === flag.taskId && subject.id === flag.sessionId);
|
|
11725
|
+
const endedLabel = ENDED_WORKER_LABELS[flag.kind];
|
|
11715
11726
|
candidates.push({
|
|
11716
11727
|
key: healthKey(task.id, flag),
|
|
11717
11728
|
taskId: task.id,
|
|
11718
|
-
summary: `${task.key}: ${flag.kind.replaceAll("_", " ")} (${flag.sessionId})`,
|
|
11729
|
+
summary: `${task.key}: ${endedLabel ?? flag.kind.replaceAll("_", " ")} (${flag.sessionId})`,
|
|
11719
11730
|
factAt: fact?.healthSince ?? null,
|
|
11720
11731
|
source: "spur",
|
|
11721
11732
|
priority: 4,
|
|
11722
|
-
revision:
|
|
11733
|
+
revision: endedLabel === void 0 ? fact?.healthSince ?? null : fact?.endedAt ?? null,
|
|
11734
|
+
suppressFeed: flag.kind === "worker_completed" || flag.kind === "worker_killed"
|
|
11723
11735
|
});
|
|
11724
11736
|
}
|
|
11725
11737
|
const ordered = orderItems(candidates);
|