spur-board 0.171.1 → 0.171.3

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.
@@ -1,4 +1,4 @@
1
- import { d as tokenRequestStatusSchema, gt as errorEnvelopeSchema, ht as errorContextSchema, l as tokenRequestResultSchema, pt as ERRORS, vt as successEnvelopeSchema, x as renderJsonError } from "./chunk-CqjDrIzS.mjs";
1
+ import { _t as errorEnvelopeSchema, d as tokenRequestStatusSchema, gt as errorContextSchema, l as tokenRequestResultSchema, mt as ERRORS, x as renderJsonError, yt as successEnvelopeSchema } from "./chunk-DD_jEQTA.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { request } from "node:http";
@@ -2353,12 +2353,15 @@ const MIRROR_FAILURES = {
2353
2353
  fix: "Usually transient: the board retries on its next poll. If it persists, check the daemon log for the GitHub error."
2354
2354
  }
2355
2355
  };
2356
+ const SPUR_REQUEST_TIMEOUT = "spur_request_timeout";
2356
2357
  /** A whole-poll failure (A6). `retryAt` is when the source allows the next attempt. */
2357
2358
  var AdapterError = class extends Error {
2358
2359
  kind;
2359
2360
  retryAt;
2360
2361
  /** The mirror failure code a github-project source reports with this failure. */
2361
2362
  code;
2363
+ /** Operator-facing detail for a timed-out Spur request. */
2364
+ sourceFailure;
2362
2365
  usage;
2363
2366
  constructor(kind, message, options = {}) {
2364
2367
  super(message, "cause" in options ? { cause: options.cause } : void 0);
@@ -2366,6 +2369,7 @@ var AdapterError = class extends Error {
2366
2369
  this.kind = kind;
2367
2370
  this.retryAt = options.retryAt;
2368
2371
  this.code = options.code;
2372
+ this.sourceFailure = options.sourceFailure;
2369
2373
  }
2370
2374
  };
2371
2375
  // ../contracts/src/events.ts
@@ -6253,4 +6257,4 @@ const remoteDoctorReportSchema = z.object({
6253
6257
  function assertNever(value) {
6254
6258
  throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
6255
6259
  }
6256
- export { prApprovalPairSchema as $, skillReloadFilesSchema as A, defaultAddressee as At, entityRefSchema as B, COLUMN_IDS as Bt, SPACE_IDS as C, DEFAULT_STAND_PORT_RANGE as Ct, messageRefSchema as D, columnTurnTimings as Dt, interactionRefSchema as E, boardWideSpurProject as Et, AdapterError as F, resolveWebOrigin as Ft, trackerSourceId as G, TODO_GROUP_COLUMN_IDS as Gt, prSourceId as H, ITEM_KINDS as Ht, MIRROR_FAILURES as I, slackConfigured as It, REVIEW_STATES as J, PR_STATES as K, VIAS as Kt, MIRROR_FAILURE_CODES as L, BLOCK_TYPES as Lt, EVENT_KINDS as M, plainHttpAllowed as Mt, GATE_REASONS as N, readyMirrorOf as Nt, userIdSchema as O, configBindings as Ot, eventPayloadSchemas as P, requiredSecretKeys as Pt, parseRingMarker as Q, batchSchema as R, COLUMNS as Rt, renderMcpError as S, DEFAULT_SLACK_COMMAND as St, inboundEventSchema as T, approvalRuleOf as Tt, sessionTransitionSchema as U, SLACK_BOT_SCOPES as Ut, mirrorSourceId as V, DISPATCHER_MODES as Vt, sourceCursorSchema as W, TASK_HOLDS as Wt, SESSION_STATUSES as X, SESSION_HEALTH_STATES as Y, isExternalAuthor as Z, defaultBranchViewSchema as _, ok as _t, doctorReportSchema as a, ticketFactsSchema as at, renderHttpProblem as b, DEFAULT_LINK as bt, requestHashOf as c, actorIdSchema as ct, tokenRequestStatusSchema as d, parseActorId as dt, prFactsSchema as et, BOARD_TICK_MS as f, parseRef as ft, OPERATIONS as g, errorEnvelopeSchema as gt, roleCanUseOperation as h, errorContextSchema as ht, SPUR_MIN_VERSION as i, sessionFactsSchema as it, sortSkillFiles as j, externalQuietAfterMs as jt, skillReloadFileSchema as k, configSchema as kt, tokenRequestResultSchema as l, encodeActorId as lt, buildCatalogSnapshot as m, err as mt, SLACK_OFF_FIX as n, prReviewRuleSchema as nt, remoteDoctorReportSchema as o, JIRA_PROJECT_KEY as ot, SYSTEMD_SERVICE_SETTINGS as p, ERRORS as pt, REVIEW_DECISIONS as q, isTodoGroupColumn as qt, SLACK_PARTLY_FIX as r, ringMarker as rt, TOKEN_REQUEST_LIMITS as s, REF_NUMBER as st, assertNever as t, prRefSchema as tt, tokenRequestSchema as u, errorCodeOf as ut, inboxNoSessionSchema as v, successEnvelopeSchema as vt, conversationRefSchema as w, RESERVED_PROJECT as wt, renderJsonError as x, DEFAULT_SLACK_APP_NAME as xt, turnHandedSchema as y, DEFAULT_HTTP_PORT as yt, defaultBranchFactSchema as z, COLUMN_GROUPS as zt };
6260
+ export { parseRingMarker as $, skillReloadFilesSchema as A, configSchema as At, defaultBranchFactSchema as B, COLUMN_GROUPS as Bt, SPACE_IDS as C, DEFAULT_SLACK_COMMAND as Ct, messageRefSchema as D, boardWideSpurProject as Dt, interactionRefSchema as E, approvalRuleOf as Et, AdapterError as F, requiredSecretKeys as Ft, sourceCursorSchema as G, TASK_HOLDS as Gt, mirrorSourceId as H, DISPATCHER_MODES as Ht, MIRROR_FAILURES as I, resolveWebOrigin as It, REVIEW_DECISIONS as J, isTodoGroupColumn as Jt, trackerSourceId as K, TODO_GROUP_COLUMN_IDS as Kt, MIRROR_FAILURE_CODES as L, slackConfigured as Lt, EVENT_KINDS as M, externalQuietAfterMs as Mt, GATE_REASONS as N, plainHttpAllowed as Nt, userIdSchema as O, columnTurnTimings as Ot, eventPayloadSchemas as P, readyMirrorOf as Pt, isExternalAuthor as Q, SPUR_REQUEST_TIMEOUT as R, BLOCK_TYPES as Rt, renderMcpError as S, DEFAULT_SLACK_APP_NAME as St, inboundEventSchema as T, RESERVED_PROJECT as Tt, prSourceId as U, ITEM_KINDS as Ut, entityRefSchema as V, COLUMN_IDS as Vt, sessionTransitionSchema as W, SLACK_BOT_SCOPES as Wt, SESSION_HEALTH_STATES as X, REVIEW_STATES as Y, SESSION_STATUSES as Z, defaultBranchViewSchema as _, errorEnvelopeSchema as _t, doctorReportSchema as a, sessionFactsSchema as at, renderHttpProblem as b, DEFAULT_HTTP_PORT as bt, requestHashOf as c, REF_NUMBER as ct, tokenRequestStatusSchema as d, errorCodeOf as dt, prApprovalPairSchema as et, BOARD_TICK_MS as f, parseActorId as ft, OPERATIONS as g, errorContextSchema as gt, roleCanUseOperation as h, err as ht, SPUR_MIN_VERSION as i, ringMarker as it, sortSkillFiles as j, defaultAddressee as jt, skillReloadFileSchema as k, configBindings as kt, tokenRequestResultSchema as l, actorIdSchema as lt, buildCatalogSnapshot as m, ERRORS as mt, SLACK_OFF_FIX as n, prRefSchema as nt, remoteDoctorReportSchema as o, ticketFactsSchema as ot, SYSTEMD_SERVICE_SETTINGS as p, parseRef as pt, PR_STATES as q, VIAS as qt, SLACK_PARTLY_FIX as r, prReviewRuleSchema as rt, TOKEN_REQUEST_LIMITS as s, JIRA_PROJECT_KEY as st, assertNever as t, prFactsSchema as tt, tokenRequestSchema as u, encodeActorId as ut, inboxNoSessionSchema as v, ok as vt, conversationRefSchema as w, DEFAULT_STAND_PORT_RANGE as wt, renderJsonError as x, DEFAULT_LINK as xt, turnHandedSchema as y, successEnvelopeSchema as yt, batchSchema as z, COLUMNS as zt };
@@ -1,5 +1,5 @@
1
- import { It as slackConfigured, Mt as plainHttpAllowed, g as OPERATIONS, kt as configSchema, m as buildCatalogSnapshot } from "./chunk-CqjDrIzS.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-BRiD3EcI.mjs";
1
+ import { At as configSchema, Lt as slackConfigured, Nt as plainHttpAllowed, g as OPERATIONS, m as buildCatalogSnapshot } from "./chunk-DD_jEQTA.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-BYzkU1Kt.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { closeSync, constants, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { homedir } from "node:os";
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { Ct as DEFAULT_STAND_PORT_RANGE, Ft as resolveWebOrigin, It as slackConfigured, Pt as requiredSecretKeys, Ut as SLACK_BOT_SCOPES, c as requestHashOf, ct as actorIdSchema, g as OPERATIONS, h as roleCanUseOperation, j as sortSkillFiles, k as skillReloadFileSchema, kt as configSchema, n as SLACK_OFF_FIX, o as remoteDoctorReportSchema, p as SYSTEMD_SERVICE_SETTINGS, pt as ERRORS, r as SLACK_PARTLY_FIX, vt as successEnvelopeSchema } from "./chunk-CqjDrIzS.mjs";
1
+ import { At as configSchema, Ft as requiredSecretKeys, It as resolveWebOrigin, Lt as slackConfigured, Wt as SLACK_BOT_SCOPES, c as requestHashOf, g as OPERATIONS, h as roleCanUseOperation, j as sortSkillFiles, k as skillReloadFileSchema, lt as actorIdSchema, mt as ERRORS, n as SLACK_OFF_FIX, o as remoteDoctorReportSchema, p as SYSTEMD_SERVICE_SETTINGS, r as SLACK_PARTLY_FIX, wt as DEFAULT_STAND_PORT_RANGE, yt as successEnvelopeSchema } from "./chunk-DD_jEQTA.mjs";
2
2
  import { t as apiBaseUrl } from "./chunk-Bzb7aI8R.mjs";
3
- import { a as requestTokenEnrollment, c as renderCliError, i as requestSkillReload, l as escapeTerminalControls, n as fetchTokenStatus, o as CliError, r as requestOperation, s as errorExitCode } from "./chunk-BRiD3EcI.mjs";
4
- import { a as memoryVerdictCache, c as dataDirectory, d as readConfiguredPort, f as resolveDaemonAddress, i as fileVerdictCache, l as loadClientConfig, n as cliPackageVersion, o as boardSlackState, p as tokenInFolder, s as configFile, t as checkCatalog, u as loadEnrollmentConfig } from "./chunk-CqtrnYE5.mjs";
3
+ import { a as requestTokenEnrollment, c as renderCliError, i as requestSkillReload, l as escapeTerminalControls, n as fetchTokenStatus, o as CliError, r as requestOperation, s as errorExitCode } from "./chunk-BYzkU1Kt.mjs";
4
+ import { a as memoryVerdictCache, c as dataDirectory, d as readConfiguredPort, f as resolveDaemonAddress, i as fileVerdictCache, l as loadClientConfig, n as cliPackageVersion, o as boardSlackState, p as tokenInFolder, s as configFile, t as checkCatalog, u as loadEnrollmentConfig } from "./chunk-d9D_ohWO.mjs";
5
5
  import { createHash, randomBytes, randomUUID } from "node:crypto";
6
6
  import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
7
7
  import { homedir, hostname, tmpdir, userInfo } from "node:os";
package/dist/client.mjs CHANGED
@@ -1 +1 @@
1
- export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-BRiD3EcI.mjs";
1
+ export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-BYzkU1Kt.mjs";
package/dist/daemon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as prApprovalPairSchema, A as skillReloadFilesSchema, At as defaultAddressee, B as entityRefSchema, Bt as COLUMN_IDS, C as SPACE_IDS, D as messageRefSchema, Dt as columnTurnTimings, E as interactionRefSchema, Et as boardWideSpurProject, F as AdapterError, Ft as resolveWebOrigin, G as trackerSourceId, Gt as TODO_GROUP_COLUMN_IDS, H as prSourceId, Ht as ITEM_KINDS, I as MIRROR_FAILURES, It as slackConfigured, J as REVIEW_STATES, K as PR_STATES, Kt as VIAS, L as MIRROR_FAILURE_CODES, Lt as BLOCK_TYPES, M as EVENT_KINDS, Mt as plainHttpAllowed, N as GATE_REASONS, Nt as readyMirrorOf, O as userIdSchema, Ot as configBindings, P as eventPayloadSchemas, Pt as requiredSecretKeys, Q as parseRingMarker, R as batchSchema, Rt as COLUMNS, St as DEFAULT_SLACK_COMMAND, T as inboundEventSchema, Tt as approvalRuleOf, U as sessionTransitionSchema, Ut as SLACK_BOT_SCOPES, V as mirrorSourceId, Vt as DISPATCHER_MODES, W as sourceCursorSchema, Wt as TASK_HOLDS, X as SESSION_STATUSES, Y as SESSION_HEALTH_STATES, Z as isExternalAuthor, _ as defaultBranchViewSchema, _t as ok, a as doctorReportSchema, at as ticketFactsSchema, b as renderHttpProblem, bt as DEFAULT_LINK, c as requestHashOf, ct as actorIdSchema, d as tokenRequestStatusSchema, dt as parseActorId, et as prFactsSchema, f as BOARD_TICK_MS, ft as parseRef$1, g as OPERATIONS, h as roleCanUseOperation, i as SPUR_MIN_VERSION, it as sessionFactsSchema, j as sortSkillFiles, jt as externalQuietAfterMs, kt as configSchema, l as tokenRequestResultSchema, lt as encodeActorId, m as buildCatalogSnapshot, mt as err, n as SLACK_OFF_FIX, nt as prReviewRuleSchema, ot as JIRA_PROJECT_KEY, pt as ERRORS, q as REVIEW_DECISIONS, qt as isTodoGroupColumn, r as SLACK_PARTLY_FIX, rt as ringMarker, s as TOKEN_REQUEST_LIMITS, st as REF_NUMBER, t as assertNever, tt as prRefSchema, u as tokenRequestSchema, ut as errorCodeOf, v as inboxNoSessionSchema, vt as successEnvelopeSchema, w as conversationRefSchema, wt as RESERVED_PROJECT, y as turnHandedSchema, z as defaultBranchFactSchema, zt as COLUMN_GROUPS } from "./chunk-CqjDrIzS.mjs";
1
+ import { $ as parseRingMarker, A as skillReloadFilesSchema, At as configSchema, B as defaultBranchFactSchema, Bt as COLUMN_GROUPS, C as SPACE_IDS, Ct as DEFAULT_SLACK_COMMAND, D as messageRefSchema, Dt as boardWideSpurProject, E as interactionRefSchema, Et as approvalRuleOf, F as AdapterError, Ft as requiredSecretKeys, G as sourceCursorSchema, Gt as TASK_HOLDS, H as mirrorSourceId, Ht as DISPATCHER_MODES, I as MIRROR_FAILURES, It as resolveWebOrigin, J as REVIEW_DECISIONS, Jt as isTodoGroupColumn, K as trackerSourceId, Kt as TODO_GROUP_COLUMN_IDS, L as MIRROR_FAILURE_CODES, Lt as slackConfigured, M as EVENT_KINDS, Mt as externalQuietAfterMs, N as GATE_REASONS, Nt as plainHttpAllowed, O as userIdSchema, Ot as columnTurnTimings, P as eventPayloadSchemas, Pt as readyMirrorOf, Q as isExternalAuthor, R as SPUR_REQUEST_TIMEOUT, Rt as BLOCK_TYPES, T as inboundEventSchema, Tt as RESERVED_PROJECT, U as prSourceId, Ut as ITEM_KINDS, V as entityRefSchema, Vt as COLUMN_IDS, W as sessionTransitionSchema, Wt as SLACK_BOT_SCOPES, X as SESSION_HEALTH_STATES, Y as REVIEW_STATES, Z as SESSION_STATUSES, _ as defaultBranchViewSchema, a as doctorReportSchema, at as sessionFactsSchema, b as renderHttpProblem, c as requestHashOf, ct as REF_NUMBER, d as tokenRequestStatusSchema, dt as errorCodeOf, et as prApprovalPairSchema, f as BOARD_TICK_MS, ft as parseActorId, g as OPERATIONS, h as roleCanUseOperation, ht as err, i as SPUR_MIN_VERSION, it as ringMarker, j as sortSkillFiles, jt as defaultAddressee, kt as configBindings, l as tokenRequestResultSchema, lt as actorIdSchema, m as buildCatalogSnapshot, mt as ERRORS, n as SLACK_OFF_FIX, nt as prRefSchema, ot as ticketFactsSchema, pt as parseRef$1, q as PR_STATES, qt as VIAS, r as SLACK_PARTLY_FIX, rt as prReviewRuleSchema, s as TOKEN_REQUEST_LIMITS, st as JIRA_PROJECT_KEY, t as assertNever, tt as prFactsSchema, u as tokenRequestSchema, ut as encodeActorId, v as inboxNoSessionSchema, vt as ok, w as conversationRefSchema, xt as DEFAULT_LINK, y as turnHandedSchema, yt as successEnvelopeSchema, z as batchSchema, zt as COLUMNS } from "./chunk-DD_jEQTA.mjs";
2
2
  import { t as apiBaseUrl } from "./chunk-Bzb7aI8R.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -19159,6 +19159,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19159
19159
  kind: "board_observation",
19160
19160
  taskId: null,
19161
19161
  summary: `${source.source}: ${source.blind_message ?? source.blind_reason}`,
19162
+ ...source.source === "spur" && source.blind_reason === "stale" && source.failure_code === "spur_request_timeout" && { hashedSummary: "spur_request_timeout" },
19162
19163
  factAt: source.observed_at,
19163
19164
  source: source.source,
19164
19165
  priority: source.blind_reason === "auth" || source.blind_reason === "config" ? 2 : 4
@@ -19185,6 +19186,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19185
19186
  const tasks = await trx.selectFrom("task").selectAll().where("membership", "!=", "archived").execute();
19186
19187
  const taskById = new Map(tasks.map((task) => [task.id, task]));
19187
19188
  const endedHolders = await endedTurnItems(trx, taskById, candidates, new Date(now), sourceById.get("spur")?.last_complete_at ?? null);
19189
+ const confirmedIssueMisses = /* @__PURE__ */ new Map();
19188
19190
  const misses = await trx.selectFrom("source_miss").selectAll().execute();
19189
19191
  for (const miss of misses) {
19190
19192
  if (miss.gone !== 1) continue;
@@ -19212,6 +19214,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19212
19214
  continue;
19213
19215
  }
19214
19216
  if (ref.kind !== "ticket") continue;
19217
+ if (miss.confirmed_missing_at !== null) confirmedIssueMisses.set(miss.ref_key, miss.confirmed_missing_at);
19215
19218
  const task = tasks.find((entry) => entry.key === ref.key);
19216
19219
  if (task === void 0) continue;
19217
19220
  candidates.push({
@@ -19293,19 +19296,21 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19293
19296
  "pr_snapshot.state",
19294
19297
  "pr_snapshot.source",
19295
19298
  "pr_snapshot.observed_at",
19299
+ "pr_snapshot.merged_seen_at",
19296
19300
  "pr_snapshot.detail"
19297
19301
  ]).where("link.entity", "=", "pr").where("link.banned", "=", 0).where(pastReopenFloor).execute();
19298
- const tickets = await trx.selectFrom("ticket_snapshot").select([
19302
+ const tickets = new Map((await trx.selectFrom("ticket_snapshot").select([
19299
19303
  "task_id",
19300
19304
  "status",
19301
19305
  "detail",
19302
19306
  "source",
19303
- "observed_at"
19304
- ]).execute();
19307
+ "observed_at",
19308
+ "last_read_at"
19309
+ ]).execute()).map((ticket) => [ticket.task_id, ticket]));
19305
19310
  const taskPrs = {};
19306
19311
  for (const task of tasks) {
19307
19312
  const project = config.projects.find((entry) => entry.id === task.project);
19308
- const ticket = tickets.find((entry) => entry.task_id === task.id);
19313
+ const ticket = tickets.get(task.id);
19309
19314
  taskPrs[String(task.id)] = {
19310
19315
  hasOpenPr: false,
19311
19316
  hasMergedPr: false,
@@ -19318,6 +19323,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19318
19323
  return facts === null ? NaN : Date.parse(facts.closedAt ?? facts.updatedAt);
19319
19324
  };
19320
19325
  const mergedAt = /* @__PURE__ */ new Map();
19326
+ const mergedSeenAt = /* @__PURE__ */ new Map();
19321
19327
  const newestMerge = /* @__PURE__ */ new Map();
19322
19328
  const judged = /* @__PURE__ */ new Map();
19323
19329
  const mergedByTask = /* @__PURE__ */ new Map();
@@ -19326,6 +19332,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19326
19332
  if (state === void 0) continue;
19327
19333
  if (pr.state === "open") state.hasOpenPr = true;
19328
19334
  if (pr.state !== "merged") continue;
19335
+ mergedSeenAt.set(pr.task_id, latest$1([mergedSeenAt.get(pr.task_id), pr.merged_seen_at]));
19329
19336
  const facts = parsePr(pr.detail ?? void 0);
19330
19337
  const at = facts === null ? null : facts.mergedAt ?? facts.updatedAt;
19331
19338
  const newest = mergedAt.get(pr.task_id) ?? null;
@@ -19367,7 +19374,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19367
19374
  const closedAt = Math.max(...closed.map((pr) => pr.closedAt));
19368
19375
  const key = `pr-closed:${String(task.id)}`;
19369
19376
  const project = config.projects.find((entry) => entry.id === task.project);
19370
- if (Number.isFinite(mergedSince) && project !== void 0 && !seenOpenSince(project, config, tickets.find((entry) => entry.task_id === task.id), task.manual_include === 1, mergedSince) || state.prCompleteAt === null || !(state.prCompleteAt >= closedAt)) {
19377
+ if (Number.isFinite(mergedSince) && project !== void 0 && !seenOpenSince(project, config, tickets.get(task.id), task.manual_include === 1, mergedSince) || state.prCompleteAt === null || !(state.prCompleteAt >= closedAt)) {
19371
19378
  prClosed.set(task.id, {
19372
19379
  held: true,
19373
19380
  key
@@ -19397,7 +19404,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19397
19404
  const task = taskById.get(taskId);
19398
19405
  if (state === void 0 || task === void 0) continue;
19399
19406
  const project = config.projects.find((entry) => entry.id === task.project);
19400
- const ticket = tickets.find((entry) => entry.task_id === taskId);
19407
+ const ticket = tickets.get(taskId);
19401
19408
  const storedMerge = latest$1([facts?.mergedAt, newestMerge.get(taskId)]);
19402
19409
  const judgement = facts === null || project === void 0 ? "unconfirmed" : mergedTicket(project, config, ticket, task.manual_include === 1, {
19403
19410
  ...facts,
@@ -19423,7 +19430,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19423
19430
  for (const task of tasks) {
19424
19431
  const state = taskPrs[String(task.id)];
19425
19432
  const project = config.projects.find((entry) => entry.id === task.project);
19426
- const ticket = tickets.find((entry) => entry.task_id === task.id);
19433
+ const ticket = tickets.get(task.id);
19427
19434
  const closedWhileLive = state !== void 0 && project !== void 0 && ticket !== void 0 && ticketDone(project, ticket.status) && (state.hasOpenPr || liveSessionTasks.has(String(task.id))) && !state.hasMergedPr && !prs.some((pr) => pr.task_id === task.id && pr.state === "merged");
19428
19435
  if (task.membership === "out_of_filter" && !closedWhileLive) candidates.push({
19429
19436
  key: `filter:${String(task.id)}`,
@@ -19597,7 +19604,7 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19597
19604
  value: toJson(episodeSchema, health.episode)
19598
19605
  }).onConflict((oc) => oc.column("key").doUpdateSet({ value: toJson(episodeSchema, health.episode) })).execute();
19599
19606
  const resting = await restingHolders(trx, config, now);
19600
- const restingIdle = (flag) => flag.kind === "worker_idle" && resting.has(`${flag.taskId}:${flag.sessionId}`);
19607
+ const skipIdle = (task, flag) => flag.kind === "worker_idle" && (task.column === "done" || resting.has(`${flag.taskId}:${flag.sessionId}`));
19601
19608
  const turnTasks = new Set(turns.map((turn) => turn.task_id));
19602
19609
  const latestDoneTurns = new Map((await trx.selectFrom("turn").innerJoin("task", "task.id", "turn.task_id").select([
19603
19610
  "turn.task_id",
@@ -19615,9 +19622,20 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19615
19622
  const stoppedInDone = new Set(subjects.filter((subject) => subject.role === "worker" && subject.lifecycle === "stopped" && subject.endedAt === null && addressed.has(`${subject.taskId}:${subject.id}`)).map((subject) => `${subject.taskId}:${subject.id}`));
19616
19623
  const stoppedRetained = (flag) => ["stuck_worker", "needs_input"].includes(flag.kind) && stoppedInDone.has(`${flag.taskId}:${flag.sessionId}`);
19617
19624
  for (const flag of health.flags) {
19618
- if (endedHolders.has(`${flag.taskId}:${flag.sessionId}`) || restingIdle(flag) || stoppedRetained(flag)) continue;
19619
19625
  const task = taskById.get(Number(flag.taskId));
19620
- if (task === void 0) continue;
19626
+ if (task === void 0 || endedHolders.has(`${flag.taskId}:${flag.sessionId}`) || skipIdle(task, flag) || stoppedRetained(flag)) continue;
19627
+ if (flag.kind === "worker_idle" && task.tracker_kind === "github-issues") {
19628
+ const merged = mergedSeenAt.get(task.id);
19629
+ if (merged != null && now < Date.parse(merged) + 2 * config.adapters.githubIssues.intervalMs) {
19630
+ const project = config.projects.find((entry) => entry.id === task.project);
19631
+ const miss = project === void 0 ? void 0 : confirmedIssueMisses.get(`ticket:${trackerSourceId(project)}:${task.tracker_id ?? task.key}`);
19632
+ const checked = latest$1([tickets.get(task.id)?.last_read_at, miss]);
19633
+ if (checked === null || Date.parse(checked) <= Date.parse(merged)) {
19634
+ heldKeys.push(healthKey(task.id, flag));
19635
+ continue;
19636
+ }
19637
+ }
19638
+ }
19621
19639
  const fact = subjects.find((subject) => subject.taskId === flag.taskId && subject.id === flag.sessionId);
19622
19640
  if ([
19623
19641
  "stuck_worker",
@@ -19676,9 +19694,9 @@ async function reconcileItems(trx, config, now, spurComplete, warnSkipped, spurC
19676
19694
  const ordered = orderItems(candidates);
19677
19695
  const seen = /* @__PURE__ */ new Set([...ordered.map((item) => item.key), ...heldKeys]);
19678
19696
  for (const flag of health.held) {
19679
- if (endedHolders.has(`${flag.taskId}:${flag.sessionId}`) || restingIdle(flag) || stoppedRetained(flag)) continue;
19680
19697
  const task = taskById.get(Number(flag.taskId));
19681
- if (task !== void 0 && !stalled.has(`${flag.taskId}:${flag.sessionId}`)) seen.add(healthKey(task.id, flag));
19698
+ if (task === void 0 || endedHolders.has(`${flag.taskId}:${flag.sessionId}`) || skipIdle(task, flag) || stoppedRetained(flag)) continue;
19699
+ if (!stalled.has(`${flag.taskId}:${flag.sessionId}`)) seen.add(healthKey(task.id, flag));
19682
19700
  }
19683
19701
  const existing = await trx.selectFrom("operator_item").selectAll().where("kind", "in", RECONCILED_KINDS).where("cleared_at", "is", null).execute();
19684
19702
  const stillInError = new Set(health.hostLoad === null ? [] : subjects.filter((subject) => subject.endedAt === null && subject.health === "error" && subject.role !== "other" && !stalled.has(`${subject.taskId}:${subject.id}`) && !stoppedInDone.has(`${subject.taskId}:${subject.id}`)).map((subject) => healthKey(Number(subject.taskId), {
@@ -24347,8 +24365,9 @@ function sourceText(item, state) {
24347
24365
  const reason = state?.blind_reason ?? null;
24348
24366
  const service = serviceOf(source);
24349
24367
  if (item.cleared_at !== null || reason === null || service === void 0) return stored;
24350
- const problem = PROBLEMS[reason];
24351
- const thing = reason === "auth" ? `the ${service} token` : reason === "config" ? `the ${source} settings in the board config` : reason === "stale" && source === "spur" ? "the Spur daemon" : void 0;
24368
+ const spurTimedOut = reason === "stale" && source === "spur" && state?.failure_code === "spur_request_timeout";
24369
+ const problem = spurTimedOut ? "answered slower than the timeout" : PROBLEMS[reason];
24370
+ const thing = reason === "auth" ? `the ${service} token` : reason === "config" ? `the ${source} settings in the board config` : reason === "stale" && source === "spur" ? spurTimedOut ? "tracked session count and host load" : "the Spur daemon" : void 0;
24352
24371
  if (problem === void 0 || thing === void 0) return stored;
24353
24372
  const message = state?.blind_message ?? null;
24354
24373
  return {
@@ -24434,7 +24453,8 @@ function createOperatorInbox(deps) {
24434
24453
  sourceIds.length === 0 ? Promise.resolve([]) : trx.selectFrom("source_state").select([
24435
24454
  "source",
24436
24455
  "blind_reason",
24437
- "blind_message"
24456
+ "blind_message",
24457
+ "failure_code"
24438
24458
  ]).where("source", "in", sourceIds).execute(),
24439
24459
  deliveryUrls(trx, items),
24440
24460
  waitingTurns(trx, openItems),
@@ -25532,13 +25552,15 @@ async function ticket(trx, config, fact, at, source) {
25532
25552
  assignee: fact.assignee,
25533
25553
  detail: toJson(ticketFactsSchema, fact),
25534
25554
  source,
25535
- observed_at: at
25555
+ observed_at: at,
25556
+ last_read_at: at
25536
25557
  }).onConflict((oc) => oc.column("task_id").doUpdateSet({
25537
25558
  status: fact.status,
25538
25559
  assignee: fact.assignee,
25539
25560
  detail: toJson(ticketFactsSchema, fact),
25540
25561
  source,
25541
- observed_at: at
25562
+ observed_at: at,
25563
+ last_read_at: at
25542
25564
  })).execute();
25543
25565
  if (previousFact === null || comparableFacts(previousFact, "updatedAt") !== comparableFacts(fact, "updatedAt")) {
25544
25566
  if (previousFact?.status !== fact.status) {
@@ -25574,7 +25596,7 @@ function comparableFacts(facts, timestamp) {
25574
25596
  * counted check's run (`countedChecks`, by name and completion time) with the checks unchanged
25575
25597
  * still writes one, with `from` equal to `to`.
25576
25598
  */
25577
- async function pr(trx, config, fact, at, source, scheduled, reviewRule) {
25599
+ async function pr(trx, config, fact, at, acceptedAt, source, scheduled, reviewRule) {
25578
25600
  await trx.deleteFrom("source_miss").where("source", "=", source).where("ref_key", "=", refKey({
25579
25601
  kind: "pr",
25580
25602
  repo: fact.repo,
@@ -25582,6 +25604,7 @@ async function pr(trx, config, fact, at, source, scheduled, reviewRule) {
25582
25604
  })).execute();
25583
25605
  const old = await trx.selectFrom("pr_snapshot").selectAll().where(sql`lower(repo) = ${fact.repo.toLowerCase()}`).where("number", "=", fact.number).executeTakeFirst();
25584
25606
  const previous = old === void 0 ? null : parseJson(prFactsSchema, old.detail);
25607
+ const mergedSeenAt = fact.state !== "merged" ? null : old?.state === "merged" ? old.merged_seen_at : acceptedAt;
25585
25608
  const recheckAt = fact.state === "closed" ? new Date(Date.parse(at) + 216e5).toISOString() : null;
25586
25609
  if (old !== void 0 && previous !== null && old.source !== source) await savePrPolling(trx, old.source, previous, old.closed_recheck_at, true);
25587
25610
  await savePrPolling(trx, source, fact, recheckAt);
@@ -25598,9 +25621,11 @@ async function pr(trx, config, fact, at, source, scheduled, reviewRule) {
25598
25621
  detail: toJson(prFactsSchema, fact),
25599
25622
  source,
25600
25623
  observed_at: at,
25601
- closed_recheck_at: recheckAt
25624
+ closed_recheck_at: recheckAt,
25625
+ merged_seen_at: mergedSeenAt
25602
25626
  }).onConflict((oc) => oc.columns(["repo", "number"]).doUpdateSet({
25603
25627
  closed_recheck_at: recheckAt,
25628
+ merged_seen_at: mergedSeenAt,
25604
25629
  head_sha: fact.headSha,
25605
25630
  head_branch: fact.headBranch,
25606
25631
  state: fact.state,
@@ -26059,7 +26084,9 @@ function createObservationCore(deps) {
26059
26084
  async observe(source, observation) {
26060
26085
  const { batch } = observation;
26061
26086
  const now = clock.now();
26087
+ let acceptedAt;
26062
26088
  await transact(async (trx) => {
26089
+ acceptedAt ??= new Date(clock.now()).toISOString();
26063
26090
  const wasBlind = await blindReason(trx, source);
26064
26091
  const previousSpur = source === "spur" ? await trx.selectFrom("source_state").select("last_complete_at").where("source", "=", source).executeTakeFirst() : void 0;
26065
26092
  const spurGap = previousSpur?.last_complete_at != null && Date.parse(batch.observedAt) > Date.parse(previousSpur.last_complete_at) + config.adapters.spur.intervalMs * config.thresholds.staleMultiplier;
@@ -26084,19 +26111,25 @@ function createObservationCore(deps) {
26084
26111
  }, recheckAt);
26085
26112
  await trx.updateTable("pr_snapshot").set({ closed_recheck_at: recheckAt }).where("source", "=", source).where(sql`lower(repo) = ${probe.ref.repo.toLowerCase()}`).where("number", "=", probe.ref.number).where("state", "=", "closed").execute();
26086
26113
  }
26114
+ const project = config.projects.find((entry) => trackerSourceId(entry) === source);
26087
26115
  for (const outcome of observation.outcomes) {
26088
- const answer = batch.entities.find((entity) => refKey(entity.ref) === refKey(outcome.ref));
26116
+ const ref = outcome.ref;
26117
+ const answer = batch.entities.find((entity) => refKey(entity.ref) === refKey(ref));
26118
+ const confirmedMissingAt = project?.tracker.type === "github-issues" && ref.kind === "ticket" && ref.trackerId === source && batch.complete && outcome.gone && answer?.status === "not_found" ? batch.observedAt : null;
26089
26119
  await trx.insertInto("source_miss").values({
26090
26120
  source,
26091
- ref_key: refKey(outcome.ref),
26092
- ref: toJson(entityRefSchema, outcome.ref),
26121
+ ref_key: refKey(ref),
26122
+ ref: toJson(entityRefSchema, ref),
26093
26123
  misses: outcome.misses,
26094
26124
  gone: outcome.gone ? 1 : 0,
26095
- outcome: answer?.status ?? null
26125
+ outcome: answer?.status ?? null,
26126
+ confirmed_missing_at: confirmedMissingAt
26096
26127
  }).onConflict((oc) => oc.columns(["source", "ref_key"]).doUpdateSet({
26097
26128
  misses: outcome.misses,
26098
26129
  gone: outcome.gone ? 1 : 0,
26099
- outcome: answer?.status ?? null
26130
+ outcome: answer?.status ?? null,
26131
+ ...answer?.status === "ok" && { confirmed_missing_at: null },
26132
+ ...confirmedMissingAt !== null && { confirmed_missing_at: sql`max(coalesce(source_miss.confirmed_missing_at, ${confirmedMissingAt}), ${confirmedMissingAt})` }
26100
26133
  })).execute();
26101
26134
  }
26102
26135
  const branchCounts = /* @__PURE__ */ new Map();
@@ -26109,7 +26142,7 @@ function createObservationCore(deps) {
26109
26142
  const confirmedCancels = [];
26110
26143
  for (const item of orderedItems) if (item.kind === "ticket") await ticket(trx, config, item.facts, batch.observedAt, source);
26111
26144
  else if (item.kind === "pr") {
26112
- if (await pr(trx, config, item.facts, batch.observedAt, source, observation.effectiveComplete, item.reviewRule)) confirmedCancels.push(item.facts);
26145
+ if (await pr(trx, config, item.facts, batch.observedAt, acceptedAt, source, observation.effectiveComplete, item.reviewRule)) confirmedCancels.push(item.facts);
26113
26146
  await holdContinuation(trx, source, item);
26114
26147
  await recordApprovalPairs(trx, item.facts, item.approvalPairs);
26115
26148
  } else await session(trx, config, item.facts, batch.observedAt, source, ambiguous, batch.sessionTransitions !== void 0);
@@ -26140,7 +26173,6 @@ function createObservationCore(deps) {
26140
26173
  }
26141
26174
  if (observation.effectiveComplete) await trx.updateTable("session_snapshot").set({ absent_since: batch.observedAt }).where("source", "=", source).where("absent_since", "is", null).where("last_seen", "<", batch.observedAt).execute();
26142
26175
  if (observation.effectiveComplete) {
26143
- const project = config.projects.find((entry) => trackerSourceId(entry) === source);
26144
26176
  if (project !== void 0) {
26145
26177
  const seen = new Set(batch.items.flatMap((item) => item.kind === "ticket" && item.facts.inFilter ? [item.facts.id] : []));
26146
26178
  const unresolved = new Set(batch.entities.flatMap((entity) => entity.ref.kind === "ticket" && entity.status !== "ok" && !observation.outcomes.some((outcome) => refKey(outcome.ref) === refKey(entity.ref) && outcome.gone) ? [entity.ref.id ?? entity.ref.key] : []));
@@ -31223,21 +31255,31 @@ function runSource(entry, options, runnerStartMs, budgetWaits) {
31223
31255
  let lastReported;
31224
31256
  function state() {
31225
31257
  const deadline = staleDeadline(lastCompleteMs, runnerStartMs, staleMultiplier, intervalMs);
31226
- const blind = errorBlind ?? (now() > deadline ? staleBlind : void 0);
31258
+ let blind = errorBlind ?? (now() > deadline ? staleBlind : void 0);
31259
+ let failure = errorFailure;
31260
+ if (failure?.code === "spur_request_timeout") {
31261
+ if (blind?.reason === "stale") blind = {
31262
+ reason: "stale",
31263
+ message: failure.message
31264
+ };
31265
+ else failure = void 0;
31266
+ }
31227
31267
  return {
31228
31268
  ...lastCompleteMs === void 0 ? {} : { lastCompleteAt: iso$1(lastCompleteMs) },
31229
31269
  ...blind === void 0 ? {} : { blind },
31230
- ...errorFailure === void 0 ? {} : { failure: errorFailure },
31270
+ ...failure === void 0 ? {} : { failure },
31231
31271
  gone
31232
31272
  };
31233
31273
  }
31234
- /** The failure a failed poll reports: the error's code or the entry's default, else none. */
31274
+ /** The diagnostic a failed poll can report: a Spur timeout or a mirror failure. */
31235
31275
  function failureOf(error, step) {
31236
- const code = (error instanceof AdapterError ? error.code : void 0) ?? entry.defaultFailureCode;
31276
+ const adapterError = error instanceof AdapterError ? error : void 0;
31277
+ if (source === "spur" && step === "poll" && adapterError?.sourceFailure !== void 0) return adapterError.sourceFailure;
31278
+ const code = adapterError?.code ?? entry.defaultFailureCode;
31237
31279
  if (code === void 0) return void 0;
31238
31280
  return {
31239
31281
  code,
31240
- message: error instanceof AdapterError ? error.message : `The ${step} step failed`
31282
+ message: adapterError?.message ?? `The ${step} step failed`
31241
31283
  };
31242
31284
  }
31243
31285
  /** Appends the current state to the serial report chain; resolves when its step is done. */
@@ -31693,10 +31735,7 @@ const REQUEST_TIMEOUT_MS = 5e3;
31693
31735
  const TRANSITIONS_TIMEOUT_MS = 15e3;
31694
31736
  /** The longest wait between two failed Spur polls, so Spur load episodes blind the board briefly. */
31695
31737
  const SPUR_MAX_BACKOFF_MS = 6e4;
31696
- /**
31697
- * A failed Spur request with its place. It never carries `code`: the runner would report it as a
31698
- * source failure.
31699
- */
31738
+ /** A failed Spur request with its place for logging. */
31700
31739
  var SpurRequestError = class extends AdapterError {
31701
31740
  path;
31702
31741
  durationMs;
@@ -31817,7 +31856,20 @@ function createSpurAdapter(options) {
31817
31856
  };
31818
31857
  } catch (error) {
31819
31858
  if (callerAborted()) throw new Error("Spur poll aborted", { cause: error });
31820
- if (didTimeOut()) throw new SpurRequestError("transient", "Spur request timed out", place(), { cause: error });
31859
+ if (didTimeOut()) {
31860
+ const timedOutAt = place();
31861
+ const route = describePlace({
31862
+ path: page !== void 0 ? "sessions/transitions" : path === "sessions" ? path : "sessions/<id>",
31863
+ page
31864
+ });
31865
+ throw new SpurRequestError("transient", "Spur request timed out", timedOutAt, {
31866
+ cause: error,
31867
+ sourceFailure: {
31868
+ code: SPUR_REQUEST_TIMEOUT,
31869
+ message: `${route} timed out after ${String(timedOutAt.durationMs)} ms (timeout ${String(timeoutMs)} ms)`
31870
+ }
31871
+ });
31872
+ }
31821
31873
  if (error instanceof AdapterError) throw error;
31822
31874
  throw new SpurRequestError("transient", "Spur request failed", place(), { cause: error });
31823
31875
  } finally {
package/dist/mcp.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { S as renderMcpError, g as OPERATIONS, pt as ERRORS } from "./chunk-CqjDrIzS.mjs";
2
- import { o as CliError, r as requestOperation } from "./chunk-BRiD3EcI.mjs";
3
- import { a as memoryVerdictCache, l as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-CqtrnYE5.mjs";
1
+ import { S as renderMcpError, g as OPERATIONS, mt as ERRORS } from "./chunk-DD_jEQTA.mjs";
2
+ import { o as CliError, r as requestOperation } from "./chunk-BYzkU1Kt.mjs";
3
+ import { a as memoryVerdictCache, l as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-d9D_ohWO.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { z } from "zod";
@@ -0,0 +1,3 @@
1
+ -- Poll start times can predate accepting a merge, and inferred absence is not a ticket read.
2
+ ALTER TABLE pr_snapshot ADD COLUMN merged_seen_at TEXT;
3
+ ALTER TABLE ticket_snapshot ADD COLUMN last_read_at TEXT;
@@ -0,0 +1 @@
1
+ ALTER TABLE source_miss ADD COLUMN confirmed_missing_at TEXT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spur-board",
3
- "version": "0.171.1",
3
+ "version": "0.171.3",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": "^24.12.0 || ^26.0.0"
@@ -25,6 +25,13 @@ Reopening a ticket finished without a PR returns the task to To Do.
25
25
 
26
26
  ## Merged PR alerts
27
27
 
28
+ When the Board first observes a linked PR as merged on a GitHub Issue task, it waits to raise a
29
+ new worker idle alert. The usual idle rules resume once a poll started after that observation
30
+ reads the issue or confirms it is missing, or after two GitHub Issues poll intervals have elapsed
31
+ since the observation, whichever comes first. An existing idle alert can stay open during the wait.
32
+ Entering Done clears any worker idle alert, even while the wrap-up turn is open. PRs already
33
+ recorded as merged at upgrade keep their prior idle alert timing.
34
+
28
35
  An agent holding the current open non-Done turn raises an `ended-turn:` item (`worker_ended`) when
29
36
  it ends, whatever its PRs; it has no `health:` item (see the [inbox](how-board-works-inbox.md)).
30
37
  Without a turn, a worker that completed, was killed or vanished raises its `health:` item
@@ -17,15 +17,15 @@ Kinds of [operator inbox](how-board-works-blocks.md#operator-inbox) entries: wha
17
17
  | `inbound_failure` | a chat message could not be applied | check the daemon log, then retry the item | failure | a retry applies it or you close the item | stored target |
18
18
  | `inbound_gap` | chat messages may be missing | check the conversation for missed messages | failure | you close the item | stored target |
19
19
  | `board_observation` | any other key | check the task, then close the item | attention | the condition ends or you close the item | stored target |
20
- | `board_observation` `source:` | a source is blind | check the token, settings, daemon or source it names | failure | the source reads again | official GitHub REST troubleshooting or Jira REST docs; absent for Spur or unknown sources |
21
- | `board_observation` `default-branch:` | the latest check run of a push-triggered workflow on a linked repo's default-branch head failed, was cancelled or timed out, or a commit status there failed; other runs (scheduled, manual) and non-workflow check runs never count, and branch protection is not read. The text names the repo, first red commit, check and run; each red re-read moves its fact time, not the text; `status.get` shows `sources[].defaultBranch` | open the failing run; fix or revert | failure | a later default-branch head is green | stored failing run or status target, retained after handling |
20
+ | `board_observation` `source:` | a source is blind. Stale Spur shows path, elapsed time and limit if its latest poll timed out | for a Spur timeout, check tracked session count and host load. Otherwise follow the item's guidance | failure | reads resume. Dismissed timeouts stay closed across recovery | GitHub or Jira REST docs if applicable |
21
+ | `board_observation` `default-branch:` | on a linked repo's default-branch head, a commit status failed or any check's latest run from a push-triggered workflow failed, was cancelled or timed out. Other runs, non-workflow checks and branch protection are ignored. Shows repo, first red commit, check and run. Red reads refresh fact time only. See `sources[].defaultBranch` in `status.get`. | open the run, then fix or revert | failure | a later head is green | run or status target, kept after handling |
22
22
  | `board_observation` `pr-outcome:` | a linked PR closed unmerged or vanished | check the PR, then close the item or archive the task | attention | the PR is seen again or you close the item; unlinking does not clear it | stored target |
23
23
  | `board_observation` `lookup:` | the ticket lookup failed | check the tracker ticket, then close the item or archive the task | attention | a lookup succeeds or you close the item | stored target |
24
24
  | `board_observation` `operator-block:` | a block waits for you | not listed: shown as its block | attention | the block closes, also via Close on its feed line | stored target |
25
25
  | `board_observation` `block:` | a block waits for its addressee | answer `B<n>` if it is a question, or close it with a reason; listed only when the block is not addressed to you; otherwise shown as its block | attention | the block closes | stored target |
26
26
  | `board_observation` `filter:` | the ticket left the tracker filter but work is live | return the ticket to the filter, or finish or unlink the linked work (`board unlink <task> --pr <pr> --reason <reason>`) | attention | the ticket is back in the filter or no linked open PR or live session is left | stored target |
27
- | `board_observation` `health:` | a session health flag | check session `<session>` in Spur; a vanished worker: start a new one or archive the task | attention | the flag ends; for a vanished worker also when the ticket is done | stored target |
28
- | `board_observation` `no-session:` | a named-orchestrator column's untaken turns have no live session to ring for its `noRecipientAfterMs` (default 10 min), timed from the later of the ring and the first end, absence or finished state (stopped, killed, errored, completed) of the last recipient session of the column's Spur project or the task's linked orchestrator; one item per project and column, on the oldest waiting turn's task, with the waiting count and minutes without a live session; doctor check `orchestrator.sessions` also warns `no live session` | start a session in Spur project `<spur>`, or take over its turns with an inbox ack | attention | a live session appears or the turns are taken or closed; a later full-length gap raises it again; once closed, it stays closed while the same oldest turn waits | stored target |
27
+ | `board_observation` `health:` | health flag. A newly observed merge can defer new idle alerts. Open alerts can remain. [Timing](how-board-works-done.md#merged-pr-alerts) | check Spur; replace a vanished worker or archive the task | attention | flag ends, vanished worker's ticket is done, or idle task enters Done | stored target |
28
+ | `board_observation` `no-session:` | untaken turns in a named-orchestrator column have no recipient for `noRecipientAfterMs` (default 10 min), measured from the later of the ring and when the last eligible recipient became unavailable. Recipients include the column's Spur project sessions and linked orchestrators. One item per project and column on the oldest waiting turn's task, with the count and minutes without a live session. Doctor's `orchestrator.sessions` warns `no live session` | start a session in `<spur>` or ack its turns | attention | a recipient appears or the turns are taken or closed. A later full gap raises it again. Closing it holds while the same oldest turn waits | stored target |
29
29
  | `board_observation` `review-rule:` | under `github-rules`, an External Review task whose head GitHub left undecided 30 min (unknown or behind merge state, unreadable rule), or blocks with every thread resolved, approval in place, no reviewer awaited, column unbound (at once; threads return it to Dev); one per task, PR, head stretch, naming the cause, raw `mergeStateStatus`, `mergeable`, `reviewDecision` (undecided: first raise per cause; blocked: current). Undecided time elsewhere counts; a closed item stays closed in its stretch until its text (not raw values) changes. Drafts, conflicts, changes requested (GitHub's too), unmet required checks have own reasons; `awaiting_required_reviewers` waits (set `quietAfterMs`) | check the PR and rules: update the branch, let the token read rules or wait, then close it | attention | the head is decided otherwise, gets its own reason or is replaced, or the task leaves | stored target |
30
30
  | `board_observation` `external-quiet:` | a task with an open PR sat in External Review past its `quietAfterMs` with no new external review round; held while GitHub is blind or stale | request a new external review round or approve the PR by hand | attention | a new external review or head, or the task leaves | stored target |
31
31
  | `worker_ended` | an agent holding the current open non-Done turn ended for any reason, PRs or links aside; also a killed worker without a PR whose ticket is not done; a new item posts a feed line with Close; each complete Spur poll moves its fact time | start a new worker or archive the task; an operator turn: retake it (`board inbox ack`) | attention | the turn closes, its holder changes, the task leaves the column visit or is archived; a turnless worker: the health flag ends or the ticket is done | stored target |
@@ -64,6 +64,11 @@ Opened from the bar or by `?open=services`, the left panel shows boxes from `sta
64
64
  and adds `Failure <code> · <message>` and a note that `ready-for-dev` is frozen. It has no
65
65
  status bar button.
66
66
 
67
+ When Spur is stale and its latest poll timed out, the Blind row and terminal `board status`
68
+ show the request path, any transitions page number, and the elapsed time and timeout in
69
+ milliseconds. The detail path appears as `sessions/<id>`. If the next poll gets a refusal or
70
+ an invalid response, the generic stale message returns. A complete poll clears the diagnostic.
71
+
67
72
  A box name adds `· <repo>` only when its group has two sources of that kind. A service button
68
73
  scrolls the panel to its service's failing box, else its degraded box, else its first box; among
69
74
  boxes in the same state it takes the one whose word the button shows, the source the daemon