spur-board 0.67.0 → 0.68.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.
@@ -1,5 +1,5 @@
1
- import { ct as configSchema, d as buildCatalogSnapshot, lt as plainHttpAllowed, p as OPERATIONS } from "./chunk-D4cCKVAP.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-DawDZw1u.mjs";
1
+ import { d as buildCatalogSnapshot, lt as configSchema, p as OPERATIONS, ut as plainHttpAllowed } from "./chunk-C11wvkRU.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-t6u2F3E-.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";
@@ -128,6 +128,7 @@ const GATE_CONDITIONS = [
128
128
  "no_conflict",
129
129
  "external_comments_handled",
130
130
  "comment_history_read",
131
+ "threads_resolved",
131
132
  "submit_on_head",
132
133
  "review_on_head",
133
134
  "approved",
@@ -306,11 +307,21 @@ const columnConfig = z.strictObject({
306
307
  id: z.enum(COLUMN_IDS, { error: (issue) => typeof issue.input === "string" ? `Unknown column ${JSON.stringify(issue.input)}: custom columns arrive with custom matchers and are not supported yet. Built-in columns: ${COLUMN_IDS.join(", ")}` : void 0 }).describe("The built-in column this entry configures."),
307
308
  enabled: z.boolean().default(true).describe("false skips the column: tasks move past it and its exit condition is not checked. todo, dev and done cannot be disabled."),
308
309
  orchestrator: nonEmpty.default("none").describe("Who takes the column's turns. none: the task's live worker session, else the operator. operator: the operator, who also gets the questions asked in the column. Otherwise the name of a spurProjects entry with role orchestrator or curator whose sessions orchestrate the column and get the questions others ask in it."),
309
- cycleLimit: z.int().min(1).default(DEFAULT_CYCLE_LIMIT).describe("How many times a task may return to Dev from this column before the board stops it for the operator. Returns by the column executor and for external comments count, a changes-requested review included (it is an external comment, not a separate return); a conflict, red CI and a draft do not."),
310
+ cycleLimit: z.int().min(1).default(DEFAULT_CYCLE_LIMIT).describe("How many times a task may return to Dev from this column before the board stops it for the operator. Returns by the column executor, for external comments and for unresolved review threads count, a changes-requested review included (it is an external comment, not a separate return); a conflict, red CI and a draft do not."),
310
311
  courseCheck: z.int().min(0).default(DEFAULT_COURSE_CHECK).describe("How many returns to Dev from this column, counted as for cycleLimit, before the board holds the task and asks courseCheckTo (by default the curator, or the operator when the project has no curator) to check its course. The answer resets the count and reaches the worker as a task comment. 0 turns the check off; cycleLimit is checked first."),
311
- courseCheckTo: nonEmpty.optional().describe("Who answers this column's course check: operator, the curator's name, or the name of a column orchestrator. Without it, the curator, or the operator when the project has no curator. When the addressee has no live session the question moves to the operator; a conductor that is rung and does not answer keeps it, and the operator gets an item.")
312
+ courseCheckTo: nonEmpty.optional().describe("Who answers this column's course check: operator, the curator's name, or the name of a column orchestrator. Without it, the curator, or the operator when the project has no curator. When the addressee has no live session the question moves to the operator; a conductor that is rung and does not answer keeps it, and the operator gets an item."),
313
+ requireResolvedThreads: z.boolean().optional().describe("true: a task leaves this column, and every column right of it, only when its PR has no unresolved review thread; an unresolved one sends it back to Dev, and the worker's Dev turn lists each thread. Outdated threads count; a thread counts until someone resolves it, whoever wrote it. Defaults to true on ready-to-merge and false elsewhere; allowed on dev through ready-to-merge.")
312
314
  });
313
- /** The board rules: required columns present and enabled, built-ins in canonical order. */
315
+ /** Columns a task never leaves through the Dev gate, so they cannot require resolved threads. */
316
+ const NO_THREAD_GATE = /* @__PURE__ */ new Set([
317
+ "todo",
318
+ "ready-for-dev",
319
+ "done"
320
+ ]);
321
+ /**
322
+ * The board rules: required columns present and enabled, resolved threads required only from Dev
323
+ * to Ready to Merge, built-ins in canonical order.
324
+ */
314
325
  function checkBoard(items, ctx) {
315
326
  rejectDuplicates(items, "id", "column", ctx);
316
327
  for (const required of REQUIRED_COLUMN_IDS) {
@@ -326,6 +337,13 @@ function checkBoard(items, ctx) {
326
337
  message: `Required column ${JSON.stringify(required)} cannot be disabled`
327
338
  });
328
339
  }
340
+ items.forEach((item, i) => {
341
+ if (item.requireResolvedThreads === true && NO_THREAD_GATE.has(item.id)) ctx.addIssue({
342
+ code: "custom",
343
+ path: [i, "requireResolvedThreads"],
344
+ message: `Column ${JSON.stringify(item.id)} cannot require resolved threads: set it on a column from dev to ready-to-merge`
345
+ });
346
+ });
329
347
  let previous = -1;
330
348
  items.forEach((item, i) => {
331
349
  const position = COLUMN_IDS.indexOf(item.id);
@@ -1214,7 +1232,12 @@ const prFactsSchema = z.strictObject({
1214
1232
  commitSha: commitShaSchema.describe("Commit the review was given on."),
1215
1233
  submittedAt: at$2.describe("When the review was submitted.")
1216
1234
  })).describe("The latest review of each reviewer, with the commit it was given on."),
1217
- reviewThreads: z.array(z.strictObject({ resolved: z.boolean().describe("Whether the review thread is resolved.") })).describe("Review threads on the pull request."),
1235
+ reviewThreads: z.array(z.strictObject({
1236
+ resolved: z.boolean().describe("Whether the review thread is resolved."),
1237
+ id: z.string().min(1).optional().describe("Node ID of the review thread; missing in facts stored by an earlier version."),
1238
+ url: webUrl.optional().describe("Web URL of the thread's first comment; missing in facts stored by an earlier version."),
1239
+ outdated: z.boolean().optional().describe("Whether the thread is on a diff line the head no longer has; missing in facts stored by an earlier version.")
1240
+ })).describe("Review threads on the pull request."),
1218
1241
  reviewRequests: z.array(z.strictObject({
1219
1242
  kind: z.enum(REVIEWER_KINDS).optional().describe("Kind of reviewer asked to review."),
1220
1243
  id: z.string().min(1).optional().describe("Login of the user or bot, or the slug of the team."),
@@ -1557,6 +1580,7 @@ const GATE_REASONS = [
1557
1580
  "mergeable_unknown",
1558
1581
  "external_comments",
1559
1582
  "comment_history_incomplete",
1583
+ "unresolved_threads",
1560
1584
  "no_submit_on_head",
1561
1585
  "no_review_on_head",
1562
1586
  "not_approved",
@@ -2159,7 +2183,12 @@ const turnViewSchema = z.strictObject({
2159
2183
  taken: z.strictObject({
2160
2184
  by: actorIdSchema,
2161
2185
  at: z.iso.datetime().describe("When the turn was taken, ISO 8601 UTC.")
2162
- }).nullable().describe("Who took the turn and when; null until it is taken.")
2186
+ }).nullable().describe("Who took the turn and when; null until it is taken."),
2187
+ threads: z.array(z.strictObject({
2188
+ id: z.string().min(1).describe("Node ID of the review thread."),
2189
+ url: z.url({ protocol: /^https?$/ }).describe("Web URL of the thread's first comment."),
2190
+ outdated: z.boolean().describe("Whether the thread is on a diff line the head no longer has.")
2191
+ }).describe("One unresolved review thread.")).min(1).optional().describe("The unresolved review threads on the task's open pull request, read live, in a Dev turn of a project requiring resolved threads; absent when none, or when the pull request is closed, merged or missing. Fix or answer each thread, then resolve it.")
2163
2192
  }).describe("A turn: the executor of a column is asked to act on a task.");
2164
2193
  /** A turn as `task.get` shows it: who executes it, whether it was taken, and how it closed. */
2165
2194
  const taskTurnSchema = turnViewSchema.pick({
@@ -2210,7 +2239,7 @@ const taskWhySchema = z.strictObject({
2210
2239
  gates: z.array(z.strictObject({
2211
2240
  column: z.enum(COLUMN_IDS).describe("Board column."),
2212
2241
  enabled: z.boolean().describe("Whether the column is enabled in the project."),
2213
- ok: z.boolean().describe("Whether the column's own exit conditions pass."),
2242
+ ok: z.boolean().describe("Whether the column's own exit conditions pass. Dev's threads_resolved counts once any enabled column requires resolved threads, while the gates left of that column ignore it."),
2214
2243
  blockedIn: z.enum(COLUMN_IDS).nullable().describe("Leftmost enabled column at or left of this one whose exit conditions fail; null when the cumulative gate passes."),
2215
2244
  conditions: z.array(gateConditionSchema).describe("The column's exit conditions, empty for a column without any.")
2216
2245
  }).describe("The gate of one column.")).describe("The gate of every column, To Do to Done; empty when the pull request facts are missing."),
@@ -2475,7 +2504,8 @@ const failed = (condition, reason) => ({
2475
2504
  });
2476
2505
  /**
2477
2506
  * The gates of a task in Review on a project with To Do, Dev, Review and Done enabled: Dev passes,
2478
- * Review waits for its review on head.
2507
+ * Review waits for its review on head. Ready to Merge is disabled, so no column requires resolved
2508
+ * threads and Dev's `threads_resolved` is met.
2479
2509
  */
2480
2510
  const reviewGates = [
2481
2511
  {
@@ -2504,6 +2534,7 @@ const reviewGates = [
2504
2534
  met("no_conflict"),
2505
2535
  met("external_comments_handled"),
2506
2536
  met("comment_history_read"),
2537
+ met("threads_resolved"),
2507
2538
  met("submit_on_head")
2508
2539
  ]
2509
2540
  },
@@ -4067,4 +4098,4 @@ function assertNever(value) {
4067
4098
  throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
4068
4099
  }
4069
4100
  //#endregion
4070
- export { errorContextSchema as $, sessionTransitionSchema as A, prRefSchema as B, userIdSchema as C, batchSchema as D, AdapterError as E, SESSION_HEALTH_STATES as F, REF_NUMBER as G, sessionFactsSchema as H, SESSION_STATUSES as I, errorCodeOf as J, actorIdSchema as K, isExternalAuthor as L, trackerSourceId as M, PR_STATES as N, entityRefSchema as O, REVIEW_STATES as P, err as Q, parseRingMarker as R, messageRefSchema as S, eventPayloadSchemas as T, ticketFactsSchema as U, ringMarker as V, JIRA_PROJECT_KEY as W, parseRef as X, parseActorId as Y, ERRORS as Z, renderMcpError as _, requestHashOf as a, DEFAULT_SLACK_APP_NAME as at, inboundEventSchema as b, tokenRequestStatusSchema as c, configSchema as ct, buildCatalogSnapshot as d, COLUMN_IDS as dt, errorEnvelopeSchema as et, roleCanUseOperation as f, DISPATCHER_MODES as ft, renderJsonError as g, renderHttpProblem as h, TOKEN_REQUEST_LIMITS as i, DEFAULT_LINK as it, sourceCursorSchema as j, prSourceId as k, BOARD_TICK_MS as l, plainHttpAllowed as lt, turnHandedSchema as m, TASK_HOLDS as mt, doctorReportSchema as n, successEnvelopeSchema as nt, tokenRequestResultSchema as o, DEFAULT_SLACK_COMMAND as ot, OPERATIONS as p, SLACK_BOT_SCOPES as pt, encodeActorId as q, remoteDoctorReportSchema as r, DEFAULT_HTTP_PORT as rt, tokenRequestSchema as s, RESERVED_PROJECT as st, assertNever as t, ok as tt, SYSTEMD_SERVICE_SETTINGS as u, requiredSecretKeys as ut, SPACE_IDS as v, EVENT_KINDS as w, interactionRefSchema as x, conversationRefSchema as y, prFactsSchema as z };
4101
+ export { err as $, prSourceId as A, prFactsSchema as B, userIdSchema as C, AdapterError as D, eventPayloadSchemas as E, REVIEW_STATES as F, JIRA_PROJECT_KEY as G, ringMarker as H, SESSION_HEALTH_STATES as I, encodeActorId as J, REF_NUMBER as K, SESSION_STATUSES as L, sourceCursorSchema as M, trackerSourceId as N, batchSchema as O, PR_STATES as P, ERRORS as Q, isExternalAuthor as R, messageRefSchema as S, GATE_REASONS as T, sessionFactsSchema as U, prRefSchema as V, ticketFactsSchema as W, parseActorId as X, errorCodeOf as Y, parseRef as Z, renderMcpError as _, requestHashOf as a, DEFAULT_LINK as at, inboundEventSchema as b, tokenRequestStatusSchema as c, RESERVED_PROJECT as ct, buildCatalogSnapshot as d, requiredSecretKeys as dt, errorContextSchema as et, roleCanUseOperation as f, COLUMN_IDS as ft, renderJsonError as g, renderHttpProblem as h, TASK_HOLDS as ht, TOKEN_REQUEST_LIMITS as i, DEFAULT_HTTP_PORT as it, sessionTransitionSchema as j, entityRefSchema as k, BOARD_TICK_MS as l, configSchema as lt, turnHandedSchema as m, SLACK_BOT_SCOPES as mt, doctorReportSchema as n, ok as nt, tokenRequestResultSchema as o, DEFAULT_SLACK_APP_NAME as ot, OPERATIONS as p, DISPATCHER_MODES as pt, actorIdSchema as q, remoteDoctorReportSchema as r, successEnvelopeSchema as rt, tokenRequestSchema as s, DEFAULT_SLACK_COMMAND as st, assertNever as t, errorEnvelopeSchema as tt, SYSTEMD_SERVICE_SETTINGS as u, plainHttpAllowed as ut, SPACE_IDS as v, EVENT_KINDS as w, interactionRefSchema as x, conversationRefSchema as y, parseRingMarker as z };
@@ -1,4 +1,4 @@
1
- import { $ as errorContextSchema, Z as ERRORS, c as tokenRequestStatusSchema, et as errorEnvelopeSchema, g as renderJsonError, nt as successEnvelopeSchema, o as tokenRequestResultSchema } from "./chunk-D4cCKVAP.mjs";
1
+ import { Q as ERRORS, c as tokenRequestStatusSchema, et as errorContextSchema, g as renderJsonError, o as tokenRequestResultSchema, rt as successEnvelopeSchema, tt as errorEnvelopeSchema } from "./chunk-C11wvkRU.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { request } from "node:http";
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { K as actorIdSchema, Z as ERRORS, a as requestHashOf, ct as configSchema, f as roleCanUseOperation, nt as successEnvelopeSchema, p as OPERATIONS, pt as SLACK_BOT_SCOPES, r as remoteDoctorReportSchema, u as SYSTEMD_SERVICE_SETTINGS, ut as requiredSecretKeys } from "./chunk-D4cCKVAP.mjs";
1
+ import { Q as ERRORS, a as requestHashOf, dt as requiredSecretKeys, f as roleCanUseOperation, lt as configSchema, mt as SLACK_BOT_SCOPES, p as OPERATIONS, q as actorIdSchema, r as remoteDoctorReportSchema, rt as successEnvelopeSchema, u as SYSTEMD_SERVICE_SETTINGS } from "./chunk-C11wvkRU.mjs";
2
2
  import { t as apiBaseUrl } from "./chunk-DAMwWWmT.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-DawDZw1u.mjs";
4
- import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, f as tokenInFolder, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./chunk-BywmJyLe.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-t6u2F3E-.mjs";
4
+ import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, f as tokenInFolder, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./chunk-AwNJBvcj.mjs";
5
5
  import { createHash, randomBytes, randomUUID } from "node:crypto";
6
6
  import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
7
7
  import { homedir, hostname, userInfo } from "node:os";
package/dist/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-DawDZw1u.mjs";
1
+ import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-t6u2F3E-.mjs";
2
2
  export { fetchCatalogVersion, fetchTokenStatus, requestOperation, requestSkillReload, requestTokenEnrollment };
package/dist/daemon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as sessionTransitionSchema, B as prRefSchema, C as userIdSchema, D as batchSchema, E as AdapterError, F as SESSION_HEALTH_STATES, G as REF_NUMBER, H as sessionFactsSchema, I as SESSION_STATUSES, J as errorCodeOf, K as actorIdSchema, L as isExternalAuthor, M as trackerSourceId, N as PR_STATES, O as entityRefSchema, P as REVIEW_STATES, Q as err, R as parseRingMarker, S as messageRefSchema, T as eventPayloadSchemas, U as ticketFactsSchema, V as ringMarker, W as JIRA_PROJECT_KEY, X as parseRef$1, Y as parseActorId, Z as ERRORS, a as requestHashOf, b as inboundEventSchema, c as tokenRequestStatusSchema, ct as configSchema, d as buildCatalogSnapshot, dt as COLUMN_IDS, f as roleCanUseOperation, ft as DISPATCHER_MODES, h as renderHttpProblem, i as TOKEN_REQUEST_LIMITS, it as DEFAULT_LINK, j as sourceCursorSchema, k as prSourceId, l as BOARD_TICK_MS, lt as plainHttpAllowed, m as turnHandedSchema, mt as TASK_HOLDS, n as doctorReportSchema, nt as successEnvelopeSchema, o as tokenRequestResultSchema, ot as DEFAULT_SLACK_COMMAND, p as OPERATIONS, pt as SLACK_BOT_SCOPES, q as encodeActorId, s as tokenRequestSchema, st as RESERVED_PROJECT, t as assertNever, tt as ok, ut as requiredSecretKeys, v as SPACE_IDS, w as EVENT_KINDS, x as interactionRefSchema, y as conversationRefSchema, z as prFactsSchema } from "./chunk-D4cCKVAP.mjs";
1
+ import { $ as err, A as prSourceId, B as prFactsSchema, C as userIdSchema, D as AdapterError, E as eventPayloadSchemas, F as REVIEW_STATES, G as JIRA_PROJECT_KEY, H as ringMarker, I as SESSION_HEALTH_STATES, J as encodeActorId, K as REF_NUMBER, L as SESSION_STATUSES, M as sourceCursorSchema, N as trackerSourceId, O as batchSchema, P as PR_STATES, Q as ERRORS, R as isExternalAuthor, S as messageRefSchema, T as GATE_REASONS, U as sessionFactsSchema, V as prRefSchema, W as ticketFactsSchema, X as parseActorId, Y as errorCodeOf, Z as parseRef$1, a as requestHashOf, at as DEFAULT_LINK, b as inboundEventSchema, c as tokenRequestStatusSchema, ct as RESERVED_PROJECT, d as buildCatalogSnapshot, dt as requiredSecretKeys, f as roleCanUseOperation, ft as COLUMN_IDS, h as renderHttpProblem, ht as TASK_HOLDS, i as TOKEN_REQUEST_LIMITS, j as sessionTransitionSchema, k as entityRefSchema, l as BOARD_TICK_MS, lt as configSchema, m as turnHandedSchema, mt as SLACK_BOT_SCOPES, n as doctorReportSchema, nt as ok, o as tokenRequestResultSchema, p as OPERATIONS, pt as DISPATCHER_MODES, q as actorIdSchema, rt as successEnvelopeSchema, s as tokenRequestSchema, st as DEFAULT_SLACK_COMMAND, t as assertNever, ut as plainHttpAllowed, v as SPACE_IDS, w as EVENT_KINDS, x as interactionRefSchema, y as conversationRefSchema, z as parseRingMarker } from "./chunk-C11wvkRU.mjs";
2
2
  import { t as apiBaseUrl } from "./chunk-DAMwWWmT.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -14126,7 +14126,22 @@ function executorDone(column, facts, columns) {
14126
14126
  if (orchestratorOf$1(column, columns) !== "none") return false;
14127
14127
  return onHead.some((mark) => mark.kind === "submit" && orchestratorOf$1(mark.column, columns) === "none");
14128
14128
  }
14129
- function devReasons(facts, columns, waived) {
14129
+ /**
14130
+ * The leftmost enabled column that requires resolved threads: `requireResolvedThreads`, by default
14131
+ * true on Ready to Merge only. Undefined when no enabled column requires them.
14132
+ */
14133
+ function threadsFrom(project) {
14134
+ return project.columns.find((c) => c.enabled && (c.requireResolvedThreads ?? c.id === "ready-to-merge"))?.id;
14135
+ }
14136
+ /** Whether any enabled column of the project requires resolved review threads. */
14137
+ function threadsGated(project) {
14138
+ return threadsFrom(project) !== void 0;
14139
+ }
14140
+ /**
14141
+ * Dev's failing reasons. `threads` adds the resolved-threads condition: it holds for the gate of
14142
+ * every column at or right of the leftmost column requiring resolved threads.
14143
+ */
14144
+ function devReasons(facts, columns, waived, threads) {
14130
14145
  const { pr } = facts;
14131
14146
  if (pr === null) return ["no_pr"];
14132
14147
  if (pr.state === "closed") return ["pr_closed"];
@@ -14139,16 +14154,20 @@ function devReasons(facts, columns, waived) {
14139
14154
  if (pr.mergeable === "unknown") reasons.push("mergeable_unknown");
14140
14155
  if (facts.unhandledExternalComments > 0) reasons.push("external_comments");
14141
14156
  if (facts.commentHistory === "incomplete") reasons.push("comment_history_incomplete");
14157
+ if (threads && facts.unresolvedThreads > 0) reasons.push("unresolved_threads");
14142
14158
  if (!executorDone("dev", facts, columns)) reasons.push("no_submit_on_head");
14143
14159
  return reasons;
14144
14160
  }
14145
- /** The failing reasons of one column's exit condition; it does not depend on the column asked. */
14146
- function columnCondition(column, facts, columns, waived) {
14161
+ /**
14162
+ * The failing reasons of one column's exit condition. Only Dev's resolved-threads condition depends
14163
+ * on the column asked: `threads` says whether it counts.
14164
+ */
14165
+ function columnCondition(column, facts, columns, waived, threads) {
14147
14166
  switch (column) {
14148
14167
  case "todo":
14149
14168
  case "ready-for-dev":
14150
14169
  case "done": return [];
14151
- case "dev": return devReasons(facts, columns, waived);
14170
+ case "dev": return devReasons(facts, columns, waived, threads);
14152
14171
  case "review":
14153
14172
  case "product-review": return executorDone(column, facts, columns) ? [] : ["no_review_on_head"];
14154
14173
  case "external-review": return facts.externalReviewApproved ? [] : ["not_approved"];
@@ -14160,17 +14179,21 @@ function columnCondition(column, facts, columns, waived) {
14160
14179
  /**
14161
14180
  * Evaluates the exit conditions of every enabled column from To Do up to and including `column`,
14162
14181
  * and returns the leftmost one that fails. A column absent from the project's columns or disabled
14163
- * passes through. A merged pull request passes every column. Once Dev is evaluated with its check
14164
- * condition passed by `reposWithoutCi`, the result carries `checksWaivedBy`.
14182
+ * passes through. A merged pull request passes every column. Dev's resolved-threads condition
14183
+ * counts when `column` is at or right of the leftmost enabled column requiring resolved threads.
14184
+ * Once Dev is evaluated with its check condition passed by `reposWithoutCi`, the result carries
14185
+ * `checksWaivedBy`.
14165
14186
  */
14166
14187
  function evaluateGate(column, facts, project) {
14167
14188
  if (facts.pr?.state === "merged") return { ok: true };
14168
14189
  const waived = noCiWaives(facts.pr, project);
14190
+ const from = threadsFrom(project);
14191
+ const threads = from !== void 0 && COLUMN_IDS.indexOf(from) <= COLUMN_IDS.indexOf(column);
14169
14192
  let marker = {};
14170
14193
  for (const id of COLUMN_IDS.slice(0, COLUMN_IDS.indexOf(column) + 1)) {
14171
14194
  if (project.columns.find((c) => c.id === id)?.enabled !== true) continue;
14172
14195
  if (id === "dev" && waived) marker = { checksWaivedBy: "reposWithoutCi" };
14173
- const [first, ...rest] = columnCondition(id, facts, project.columns, waived);
14196
+ const [first, ...rest] = columnCondition(id, facts, project.columns, waived, threads);
14174
14197
  if (first !== void 0) return {
14175
14198
  ok: false,
14176
14199
  column: id,
@@ -14194,6 +14217,7 @@ const COLUMN_CONDITIONS = {
14194
14217
  "no_conflict",
14195
14218
  "external_comments_handled",
14196
14219
  "comment_history_read",
14220
+ "threads_resolved",
14197
14221
  "submit_on_head"
14198
14222
  ],
14199
14223
  review: ["review_on_head"],
@@ -14214,6 +14238,7 @@ const CONDITION_OF = {
14214
14238
  mergeable_unknown: "no_conflict",
14215
14239
  external_comments: "external_comments_handled",
14216
14240
  comment_history_incomplete: "comment_history_read",
14241
+ unresolved_threads: "threads_resolved",
14217
14242
  no_submit_on_head: "submit_on_head",
14218
14243
  no_review_on_head: "review_on_head",
14219
14244
  not_approved: "approved",
@@ -14223,20 +14248,22 @@ const CONDITION_OF = {
14223
14248
  const STOPS_DEV = /* @__PURE__ */ new Set(["no_pr", "pr_closed"]);
14224
14249
  /**
14225
14250
  * Every column's own exit conditions with their state, and where its cumulative gate blocks, as
14226
- * `evaluateGate` decides it for each column. A merged pull request passes every column and every
14227
- * condition. `checksWaivedBy` is the marker `evaluateGate('done')` carries, or null.
14251
+ * `evaluateGate` decides it for each column. Dev's own conditions count resolved threads once any
14252
+ * enabled column requires them. A merged pull request passes every column and every condition.
14253
+ * `checksWaivedBy` is the marker `evaluateGate('done')` carries, or null.
14228
14254
  */
14229
14255
  function explainGates(facts, project) {
14230
14256
  const merged = facts.pr?.state === "merged";
14231
14257
  const waived = noCiWaives(facts.pr, project);
14232
- let blockedIn = null;
14258
+ const threads = threadsGated(project);
14233
14259
  let checksWaivedBy = null;
14234
14260
  return {
14235
14261
  gates: COLUMN_IDS.map((column) => {
14236
14262
  const enabled = project.columns.find((c) => c.id === column)?.enabled === true;
14237
- const reasons = merged ? [] : columnCondition(column, facts, project.columns, waived);
14263
+ const reasons = merged ? [] : columnCondition(column, facts, project.columns, waived, threads);
14238
14264
  if (enabled && !merged && column === "dev" && waived) checksWaivedBy = "reposWithoutCi";
14239
- if (enabled && blockedIn === null && reasons.length > 0) blockedIn = column;
14265
+ const gate = evaluateGate(column, facts, project);
14266
+ const blockedIn = gate.ok ? null : gate.column;
14240
14267
  const stopped = reasons.some((reason) => STOPS_DEV.has(reason));
14241
14268
  const conditions = COLUMN_CONDITIONS[column].map((condition) => {
14242
14269
  const reason = reasons.find((r) => CONDITION_OF[r] === condition) ?? null;
@@ -14267,6 +14294,7 @@ const COUNTED = {
14267
14294
  executor: true,
14268
14295
  changes_requested: true,
14269
14296
  external_comments: true,
14297
+ unresolved_threads: true,
14270
14298
  conflict: false,
14271
14299
  checks_red: false,
14272
14300
  draft: false
@@ -14361,7 +14389,7 @@ function dispatch(input) {
14361
14389
  };
14362
14390
  const result = (next) => {
14363
14391
  const deferred = next !== null && input.spurBlind && orchestratorOf(project, next.column) === "none";
14364
- const opened = cycleHeld || deferred ? null : next;
14392
+ const opened = cycleHeld || deferred ? null : withThreads(next);
14365
14393
  const handsOver = opened?.column === "dev" && facts.commentHistory === "complete" && facts.unhandledExternalComments > 0;
14366
14394
  return opened !== null && (opened.kind === "after_submit" || handsOver) ? {
14367
14395
  moves,
@@ -14372,6 +14400,16 @@ function dispatch(input) {
14372
14400
  turn: opened
14373
14401
  };
14374
14402
  };
14403
+ const withThreads = (next) => {
14404
+ if (next?.column !== "dev" || !threadsGated(project) || facts.unresolvedThreads === 0) return next;
14405
+ const { reasons } = next;
14406
+ if (reasons.some((r) => r === "no_pr" || r === "pr_closed" || r === "unresolved_threads")) return next;
14407
+ const added = /* @__PURE__ */ new Set([...reasons, "unresolved_threads"]);
14408
+ return {
14409
+ ...next,
14410
+ reasons: GATE_REASONS.filter((reason) => added.has(reason))
14411
+ };
14412
+ };
14375
14413
  for (let step = 0; step < STEP_BOUND; step++) {
14376
14414
  const merged = facts.pr?.state === "merged";
14377
14415
  if (column === "done") {
@@ -14437,7 +14475,8 @@ const CAUSE_OF = {
14437
14475
  checks_red: "checks_red",
14438
14476
  conflict: "conflict",
14439
14477
  pr_draft: "draft",
14440
- external_comments: "external_comments"
14478
+ external_comments: "external_comments",
14479
+ unresolved_threads: "unresolved_threads"
14441
14480
  };
14442
14481
  /**
14443
14482
  * The cycle causes of a return to Dev: `executor` when the column executor returned it with a
@@ -15852,6 +15891,7 @@ async function readInput(trx, task, project, mode, blind, config, clock) {
15852
15891
  externalReviewApproved: pr !== null && externalApproval(pr, project.operatorGithubLogin),
15853
15892
  commentHistory: pr?.feedbackComplete === true ? "complete" : "incomplete",
15854
15893
  unhandledExternalComments: unhandled.length,
15894
+ unresolvedThreads: pr === null ? 0 : pr.reviewThreads.filter((thread) => !thread.resolved).length,
15855
15895
  marks
15856
15896
  },
15857
15897
  reopened: mergedOpen === void 0 && await trx.selectFrom("link").select("id").where("task_id", "=", task.id).where("reopen_hidden_at", "is not", null).executeTakeFirst() !== void 0,
@@ -16095,6 +16135,43 @@ async function taskSessions(trx, taskId) {
16095
16135
  });
16096
16136
  }
16097
16137
  //#endregion
16138
+ //#region ../core/src/app/turn-view.ts
16139
+ /**
16140
+ * The unresolved review threads a Dev turn lists, read live from the task's PR snapshot: only on a
16141
+ * project requiring resolved threads and an open PR, and only threads with an id and a link (facts
16142
+ * stored by an earlier version lack them). Undefined when none.
16143
+ */
16144
+ async function turnThreads(trx, taskId, project, turn) {
16145
+ if (turn.column !== "dev" || project === void 0 || !threadsGated(project)) return void 0;
16146
+ const pr = await prFacts(trx, taskId);
16147
+ if (pr?.state !== "open") return void 0;
16148
+ const threads = pr.reviewThreads.flatMap(({ resolved, id, url, outdated }) => resolved || id === void 0 || url === void 0 ? [] : [{
16149
+ id,
16150
+ url,
16151
+ outdated: outdated ?? false
16152
+ }]);
16153
+ return threads.length === 0 ? void 0 : threads;
16154
+ }
16155
+ /** A turn as the worker and `task.get --why` read it, with the threads of a Dev turn. */
16156
+ async function turnView(trx, turn, task, project) {
16157
+ const threads = await turnThreads(trx, task.id, project, turn);
16158
+ return {
16159
+ id: `T${String(turn.id)}`,
16160
+ task: task.key,
16161
+ column: turn.column,
16162
+ addressee: turn.role,
16163
+ reason: turn.reason,
16164
+ handed: turnHanded(turn),
16165
+ head: turn.head_sha,
16166
+ at: turn.created_at,
16167
+ taken: turn.acked_by === null || turn.acked_at === null ? null : {
16168
+ by: turn.acked_by,
16169
+ at: turn.acked_at
16170
+ },
16171
+ ...threads === void 0 ? {} : { threads }
16172
+ };
16173
+ }
16174
+ //#endregion
16098
16175
  //#region ../core/src/app/task-queries.ts
16099
16176
  /** How many of the last moves `task.get --why` shows. */
16100
16177
  const WHY_MOVES = 5;
@@ -16208,22 +16285,6 @@ async function taskByKey(trx, key) {
16208
16285
  if (task === void 0) throw new CommandError("not_found", "Check the task key.");
16209
16286
  return task;
16210
16287
  }
16211
- function turnView(turn, key) {
16212
- return {
16213
- id: `T${String(turn.id)}`,
16214
- task: key,
16215
- column: turn.column,
16216
- addressee: turn.role,
16217
- reason: turn.reason,
16218
- handed: turnHanded(turn),
16219
- head: turn.head_sha,
16220
- at: turn.created_at,
16221
- taken: turn.acked_by === null || turn.acked_at === null ? null : {
16222
- by: turn.acked_by,
16223
- at: turn.acked_at
16224
- }
16225
- };
16226
- }
16227
16288
  function createTaskQueries(deps) {
16228
16289
  const { config, clock, completeSince } = deps;
16229
16290
  const taskKey = (key) => {
@@ -16238,12 +16299,12 @@ function createTaskQueries(deps) {
16238
16299
  async function why(trx, task) {
16239
16300
  const column = task.shadow_column ?? task.column;
16240
16301
  const open = await trx.selectFrom("turn").selectAll().where("task_id", "=", task.id).where("closed_at", "is", null).orderBy("id", "desc").executeTakeFirst();
16302
+ const project = config.projects.find((entry) => entry.id === task.project);
16241
16303
  const shared = {
16242
16304
  column,
16243
- turn: open === void 0 ? null : turnView(open, task.key),
16305
+ turn: open === void 0 ? null : await turnView(trx, open, task, project),
16244
16306
  moves: await moveViews(trx, task.id, { limit: WHY_MOVES })
16245
16307
  };
16246
- const project = config.projects.find((entry) => entry.id === task.project);
16247
16308
  if (project === void 0) return {
16248
16309
  ...shared,
16249
16310
  dispatcher: null,
@@ -16362,7 +16423,7 @@ function createTaskQueries(deps) {
16362
16423
  */
16363
16424
  async function inboxTurns(trx, projects, actor) {
16364
16425
  if (parseActorId(actor)?.actor !== "agent" || projects.size === 0) return [];
16365
- const rows = await trx.selectFrom("turn").innerJoin("task", "task.id", "turn.task_id").selectAll("turn").select("task.key").where("task.project", "in", [...projects]).where("turn.closed_at", "is", null).where("turn.role", "!=", "operator").orderBy("turn.id").execute();
16426
+ const rows = await trx.selectFrom("turn").innerJoin("task", "task.id", "turn.task_id").selectAll("turn").select(["task.key", "task.project"]).where("task.project", "in", [...projects]).where("turn.closed_at", "is", null).where("turn.role", "!=", "operator").orderBy("turn.id").execute();
16366
16427
  const turns = [];
16367
16428
  for (const turn of rows) {
16368
16429
  if (turn.acked_by !== actor) {
@@ -16370,7 +16431,11 @@ function createTaskQueries(deps) {
16370
16431
  const mayTake = turn.acked_at === null ? notice?.acked_at === null : turn.role.startsWith("orchestrator:");
16371
16432
  if (notice === void 0 || !mayTake || !await notificationAddressedTo(trx, notice, actor, config)) continue;
16372
16433
  }
16373
- turns.push(turnView(turn, turn.key));
16434
+ const project = config.projects.find((entry) => entry.id === turn.project);
16435
+ turns.push(await turnView(trx, turn, {
16436
+ id: turn.task_id,
16437
+ key: turn.key
16438
+ }, project));
16374
16439
  }
16375
16440
  return turns;
16376
16441
  }
@@ -19393,6 +19458,7 @@ function teamScopeDenied(error, query) {
19393
19458
  const REVIEWER_FIELDS = "requestedReviewer { __typename ... on Bot { login } ... on Mannequin { login } ... on User { login } ... on Team { slug } ... on EnterpriseTeam { slug } } asCodeOwner";
19394
19459
  const REVIEW_FIELDS = "id author { __typename login } state commit { oid } submittedAt";
19395
19460
  const COMMENT_FIELDS = "nodes { id author { __typename login } createdAt body } pageInfo { hasPreviousPage startCursor }";
19461
+ const THREAD_FIELDS = "id isResolved isOutdated comments(first: 1) { nodes { url } }";
19396
19462
  const CLOSING_FIELDS = "nodes { number repository { nameWithOwner } } pageInfo { hasNextPage endCursor }";
19397
19463
  const prFields = (number, closing = false) => `id number url title updatedAt mergedAt closedAt state isDraft mergeable mergeStateStatus
19398
19464
  author { login } headRefName headRefOid
@@ -19402,7 +19468,7 @@ const prFields = (number, closing = false) => `id number url title updatedAt mer
19402
19468
  } pageInfo { hasNextPage endCursor } } }
19403
19469
  reviews(first: 100) { nodes { ${REVIEW_FIELDS} } pageInfo { hasNextPage endCursor } }
19404
19470
  comments(last: 100) { ${COMMENT_FIELDS} }
19405
- reviewThreads(first: 100) { nodes { isResolved } pageInfo { hasNextPage endCursor } }
19471
+ reviewThreads(first: 100) { nodes { ${THREAD_FIELDS} } pageInfo { hasNextPage endCursor } }
19406
19472
  reviewRequests(first: 100) { nodes { ${REVIEWER_FIELDS} } pageInfo { hasNextPage endCursor } }${closing ? `\n closingIssuesReferences(first: 100) { ${CLOSING_FIELDS} }` : ""}`;
19407
19473
  const DISCOVERY_FIELDS = `nodes { number updatedAt author { login } state } pageInfo { hasNextPage endCursor }`;
19408
19474
  const INDEX_FIELDS = `number updatedAt state isDraft mergeable mergeStateStatus headRefOid statusCheckRollup { state contexts(first: 100) { totalCount nodes { ... on CheckRun { __typename name status conclusion completedAt } ... on StatusContext { __typename context state } } } } reviews(first: 100) { totalCount nodes { id state } } reviewThreads(first: 100) { totalCount nodes { isResolved } } reviewRequests(first: 100) { totalCount nodes { ${REVIEWER_FIELDS} } } comments(last: 1) { totalCount nodes { id } }`;
@@ -19425,7 +19491,7 @@ function detailQuery(numbers, closing = false) {
19425
19491
  function pageQuery(connection, bootstrap = false) {
19426
19492
  if (connection === "comments") return `query PrPage($owner: String!, $repo: String!, $number: Int!, $before: String!) { rateLimit { cost remaining resetAt } repository(owner: $owner, name: $repo) { pullRequest(number: $number) { comments(last: 100, before: $before) { ${COMMENT_FIELDS} } } } }`;
19427
19493
  if (connection === "pullRequests") return `query DiscoveryPage($owner: String!, $repo: String!, $after: String!) { rateLimit { cost remaining resetAt } repository(owner: $owner, name: $repo) { pullRequests(first: 100, after: $after, states: [${discoveryStates(bootstrap)}], orderBy: {field: UPDATED_AT, direction: DESC}) { ${DISCOVERY_FIELDS} } } }`;
19428
- return `query PrPage($owner: String!, $repo: String!, $number: Int!, $after: String!) { rateLimit { cost remaining resetAt } repository(owner: $owner, name: $repo) { pullRequest(number: $number) { ${connection === "closingIssuesReferences" ? `closingIssuesReferences(first: 100, after: $after) { ${CLOSING_FIELDS} }` : connection === "contexts" ? `statusCheckRollup { contexts(first: 100, after: $after) { nodes { ... on CheckRun { __typename name status conclusion startedAt completedAt checkSuite { createdAt } isRequired(pullRequestNumber: $number) } ... on StatusContext { __typename context state createdAt isRequired(pullRequestNumber: $number) } } pageInfo { hasNextPage endCursor } } }` : `${connection}(first: 100, after: $after) { nodes { ${connection === "reviews" ? REVIEW_FIELDS : connection === "reviewThreads" ? "isResolved" : REVIEWER_FIELDS} } pageInfo { hasNextPage endCursor } }`} } } }`;
19494
+ return `query PrPage($owner: String!, $repo: String!, $number: Int!, $after: String!) { rateLimit { cost remaining resetAt } repository(owner: $owner, name: $repo) { pullRequest(number: $number) { ${connection === "closingIssuesReferences" ? `closingIssuesReferences(first: 100, after: $after) { ${CLOSING_FIELDS} }` : connection === "contexts" ? `statusCheckRollup { contexts(first: 100, after: $after) { nodes { ... on CheckRun { __typename name status conclusion startedAt completedAt checkSuite { createdAt } isRequired(pullRequestNumber: $number) } ... on StatusContext { __typename context state createdAt isRequired(pullRequestNumber: $number) } } pageInfo { hasNextPage endCursor } } }` : `${connection}(first: 100, after: $after) { nodes { ${connection === "reviews" ? REVIEW_FIELDS : connection === "reviewThreads" ? THREAD_FIELDS : REVIEWER_FIELDS} } pageInfo { hasNextPage endCursor } }`} } } }`;
19429
19495
  }
19430
19496
  /**
19431
19497
  * The failure that GraphQL `errors` mean for the whole request, in rule order: a rate limit is
@@ -19640,7 +19706,12 @@ const prWire = z.object({
19640
19706
  statusCheckRollup: z.object({ contexts: nodes(contextWire) }).nullish(),
19641
19707
  reviews: nodes(reviewWire),
19642
19708
  comments: nodes(commentWire),
19643
- reviewThreads: nodes(z.object({ isResolved: z.boolean() })),
19709
+ reviewThreads: nodes(z.object({
19710
+ id: z.string().optional(),
19711
+ isResolved: z.boolean(),
19712
+ isOutdated: z.boolean().optional(),
19713
+ comments: nodes(z.object({ url: z.string() })).optional()
19714
+ })),
19644
19715
  reviewRequests: nodes(z.object({
19645
19716
  requestedReviewer: reviewerWire,
19646
19717
  asCodeOwner: z.boolean()
@@ -19878,6 +19949,15 @@ function reviewer(wire) {
19878
19949
  default: return assertNever(wire);
19879
19950
  }
19880
19951
  }
19952
+ function reviewThread(node) {
19953
+ const url = node.comments?.nodes[0]?.url;
19954
+ return {
19955
+ resolved: node.isResolved,
19956
+ ...node.id === void 0 ? {} : { id: node.id },
19957
+ ...url === void 0 ? {} : { url },
19958
+ ...node.isOutdated === void 0 ? {} : { outdated: node.isOutdated }
19959
+ };
19960
+ }
19881
19961
  /**
19882
19962
  * `feedbackComplete` says whether the comments in `value`, with the `held` comments an earlier
19883
19963
  * poll read, reach back to the cursor or start.
@@ -19913,7 +19993,7 @@ function normalizePr(repo, value, rule, feedbackComplete, held = []) {
19913
19993
  mergeState,
19914
19994
  ...checks,
19915
19995
  reviews: latestReviews(wire.reviews.nodes),
19916
- reviewThreads: wire.reviewThreads.nodes.map((node) => ({ resolved: node.isResolved })),
19996
+ reviewThreads: wire.reviewThreads.nodes.map(reviewThread),
19917
19997
  reviewRequests: wire.reviewRequests.nodes.flatMap(({ requestedReviewer, asCodeOwner }) => requestedReviewer === null ? [] : [{
19918
19998
  ...reviewer(requestedReviewer),
19919
19999
  asCodeOwner
package/dist/mcp.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { Z as ERRORS, _ as renderMcpError, p as OPERATIONS } from "./chunk-D4cCKVAP.mjs";
2
- import { o as CliError, r as requestOperation } from "./chunk-DawDZw1u.mjs";
3
- import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-BywmJyLe.mjs";
1
+ import { Q as ERRORS, _ as renderMcpError, p as OPERATIONS } from "./chunk-C11wvkRU.mjs";
2
+ import { o as CliError, r as requestOperation } from "./chunk-t6u2F3E-.mjs";
3
+ import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-AwNJBvcj.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { z } from "zod";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spur-board",
3
- "version": "0.67.0",
3
+ "version": "0.68.0",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": "^24.12.0 || ^26.0.0"
@@ -4,7 +4,7 @@
4
4
 
5
5
  `todo`, `ready-for-dev`, `dev`, `review`, `product-review`,
6
6
  `external-review`, `qa`, `ready-to-merge`, `done`.
7
- `projects[].columns[].enabled`: disabled/omitted optional columns skip gates;
7
+ `projects[].columns[].enabled`: disabled/omitted columns skip gates;
8
8
  To Do, Dev, Done stay enabled.
9
9
 
10
10
  Each column has one executor: `projects[].columns[].orchestrator`:
@@ -12,7 +12,7 @@ Each column has one executor: `projects[].columns[].orchestrator`:
12
12
  `orchestrator` or `curator`. The worker owns the code and branch; others inspect/return, never push.
13
13
 
14
14
  `projects[].spurProjects[].role` accepts `worker`, `operator`, `curator` and
15
- `orchestrator`. Curators guide; orchestrators execute.
15
+ `orchestrator`.
16
16
 
17
17
  ## Gates and placement
18
18
 
@@ -21,14 +21,14 @@ per evaluation). Turns follow unmet entry gates, actionable post-submit failures
21
21
  rerouting or Done wrap-up. Holds and existing turns can yield neither action.
22
22
 
23
23
  Moves, turns and course checks need `projects[].dispatcher.mode: on`;
24
- default is `shadow`: proposed placement only; no turns, doorbells or blocks.
24
+ default is `shadow`: no doorbells or blocks.
25
25
 
26
26
  Gates are cumulative: each column checks its enabled gate and those to its left. At a turn boundary, failed gates return to the leftmost failing
27
27
  column. Pending CI, unknown
28
28
  mergeability and incomplete comment history are waits. Downstream handoff waits
29
29
  for settled prerequisites; Dev can receive a repair turn.
30
30
 
31
- Dev needs an open non-draft PR, passing checks, no conflict, handled external
31
+ Dev needs an open non-draft PR, passing checks, no conflict, handled
32
32
  feedback, comment history and current-head submit. Feedback excludes
33
33
  bots, approvals and `projects[].operatorGithubLogin` (agents' account), so worker
34
34
  thread replies never count; others' posts do.
@@ -36,20 +36,26 @@ The repo owner's and the human operator's own accounts count too, unless one is
36
36
  that login: a PR comment is a change request; talk to agents in Slack
37
37
  (`@shortName`) or the Board. A review-thread reply is a new review. An approval
38
38
  hides its inline comments; thread resolution and the head a comment was left on
39
- change nothing. Bots (GitHub Apps) neither return a task, approve it nor block
40
- an approval. Handled means handed by ID to a Dev turn, not answered; in shadow
39
+ change nothing for feedback. Bots (GitHub Apps) neither return a task, approve it nor block
40
+ an approval; their threads still count. Handled means handed by ID to a Dev turn, not answered; in shadow
41
41
  mode, a later submit in Dev or an executor `none` column handles it.
42
42
  A status comment whose last line is a hidden `board-reviewer-progress` or
43
43
  `board-reviewer-unavailable` marker is not external feedback. No required checks: non-skipped count. `projects[].reposWithoutCi` waives absent checks
44
44
  for listed repos; never failed/skipped required ones.
45
45
 
46
46
  Review and Product Review need current-head internal review marks, separate from
47
- External Review's external approval. QA: current-head submit; Ready to Merge awaits merge. Executor `none` may reuse same-head submits from other worker columns. Fixed gate rules have no configuration switch
48
- except enabled/no-CI.
47
+ External Review's external approval. QA: current-head submit; Ready to Merge awaits merge. Executor `none` may reuse same-head submits of other worker columns. Fixed gate rules have no configuration switch
48
+ except enabled columns, no-CI and resolved threads.
49
+
50
+ `projects[].columns[].requireResolvedThreads` (default: `ready-to-merge` only)
51
+ gates that column and those right of it: an unresolved review thread, outdated
52
+ or by anyone, returns the task to Dev, whose turn lists each thread link. The
53
+ worker fixes or answers, then resolves each; reviewers never do. A
54
+ Dev submit on the same head moves right, keeping marks and approval. An
55
+ approval's inline notes are threads; it still passes External Review.
49
56
 
50
57
  Review/Product Review mark lasts across visits on the current head. A visit
51
- submission belongs to one column visit; moving left clears it and those to the right. New heads invalidate internal Review and Product Review marks,
52
- even old heads.
58
+ submission belongs to one column visit; moving left clears it and those to the right. New heads invalidate internal Review and Product Review marks.
53
59
 
54
60
  PR closed without merge with no open PR, or closed
55
61
  ticket with live work and no merged PR. `board status` lists them as operator block threads.
@@ -65,17 +71,16 @@ Unseen heads answer `pending`: that submit is final; do not resubmit or raise a
65
71
  block. Confirm timeout: `projects[].dispatcher.submitConfirmMs`.
66
72
 
67
73
  A new head closes taken turns outside Dev; taken Dev turns survive pushes.
68
- Right of Dev, red CI, a draft, a conflict or an external comment returns the
69
- task to Dev at once, unless a turn is taken; then after its submit or return.
74
+ Right of Dev, red CI, a draft, a conflict, an external comment or an unresolved
75
+ thread where required returns the task to Dev at once, unless a turn is taken; then after its submit or return.
70
76
  The Dev turn hands the comments, beside a return's `code` block.
71
- Operator turns: 1 inbox item + Slack thread until exit.
72
77
 
73
78
  Closed turns receive no further Board sends; Obsolete queued rings are dropped;
74
79
  a message already accepted by Spur cannot be retracted. Check `board inbox` and
75
80
  act only on a current turn; reread after `turn_closed`.
76
81
 
77
82
  Open-turn executors in `needs_input`, `error`, `rate_limited` or `stopped` raise
78
- one question after `health.turnStallAfterMs` (default 600000 ms): curator unless self, else
83
+ one question after `health.turnStallAfterMs` (default 600000): curator unless self, else
79
84
  operator. Time starts at the later turn/state start; taking never resets it.
80
85
  One frozen explanation/dismissal per turn/session/state episode. Recovery,
81
86
  replacement, removal, archive or turn closure withdraws it. Blind Spur opens none,
@@ -102,10 +107,10 @@ curator questions move to operator.
102
107
 
103
108
  ## Course checks and cycle limits
104
109
 
105
- `projects[].columns[].courseCheck` defaults to 3 counted returns to Dev;
110
+ `projects[].columns[].courseCheck` defaults to 3 returns to Dev;
106
111
  `courseCheck: 0` disables it. `projects[].columns[].cycleLimit` defaults to 10 and
107
112
  takes priority. Executor returns and external comments (a changes-requested
108
- review is one) count; CI failures, conflicts and drafts alone do not count, nor
113
+ review is one) count, as do thread returns; CI failures, conflicts and drafts alone do not count, nor
109
114
  reopened tickets or mode switches.
110
115
 
111
116
  If returns keep hitting the same mechanism, fix the bug class once; cover its variants with one table test. Put remaining edges with no user-visible effect under Risk in the PR description. Still fix P0/P1 and user-visible findings in this PR.
@@ -119,12 +124,11 @@ answer keeps the question.
119
124
  ## Blocks and escalation
120
125
 
121
126
  A question (`needs_input`): column orchestrator, else curator, else
122
- operator. Routing avoids asking yourself: orchestrators ask the curator; curators
123
- ask the operator.
127
+ operator. Routing avoids asking yourself; curators ask the operator.
124
128
 
125
129
  A `code` block goes to the worker; `dependency` or `external` block stays with
126
130
  its author's role. Escalation: column orchestrator to curator to
127
- operator; other blocks escalate straight to the operator. Use keyed
131
+ operator; other blocks escalate straight to the operator. Keyed
128
132
  `board escalate <block>` if its addressee cannot resolve it.
129
133
 
130
134
  Taskless: all roles, operator only:
@@ -138,7 +142,7 @@ operator: `board inbox`, keyed `board answer`. Answers reach a current curator s
138
142
  ## Slack now
139
143
 
140
144
  `slack.channels.feed`: curator answers and operator items,
141
- except elsewhere/delivery problems.
145
+ except delivery/health/ended-worker items and blocks.
142
146
  `slack.channels.orchestrators`: block threads addressed to the operator by
143
147
  others. Answer in the existing block thread.
144
148
 
@@ -153,12 +157,12 @@ Middle mentions or Slack `<@U…>` address nobody; unknown names cause no lookup
153
157
  error. The operator checks short-name collisions with workspace names.
154
158
  A task key after the prefix attaches it.
155
159
 
156
- Read `board inbox`; reply with `board answer`. Each operator thread message rings again; `close` or ✅ in the
157
- thread closes it. Replies use `projects[].spurProjects[].displayName` and `icon`,
158
- else project/role icon. No session:
160
+ Read `board inbox`; reply via `board answer`. Each operator thread message rings again; `close` or ✅ in the
161
+ thread closes it. Replies use `projects[].spurProjects[].displayName` and `icon`.
162
+ No session:
159
163
  `board status` lists it as waiting.
160
164
 
161
165
  ## Done follows the ticket
162
166
 
163
167
  One linked PR merging does not by itself finish the task. Done: `projects[].tracker.doneStatuses` for Jira; for GitHub, the Issue must be
164
- closed. If open after merge, link another PR.
168
+ closed. If still open, link another PR.