@tablation/crew 0.163.2 → 0.164.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +77 -38
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7567,16 +7567,16 @@ var State = class _State {
7567
7567
  reason: roleMax === 1 ? `${role} is already running (pid ${roleHolders[0]})` : `${role} is already running ${roleMax} agents (its roleConcurrency cap; pid${roleHolders.length > 1 ? "s" : ""} ${[...new Set(roleHolders)].join(", ")})`
7568
7568
  };
7569
7569
  }
7570
- const slot = this.acquireN("crew-slot", max);
7571
- if (!slot.ok) {
7570
+ const slot2 = this.acquireN("crew-slot", max);
7571
+ if (!slot2.ok) {
7572
7572
  roleLock.release();
7573
7573
  return {
7574
7574
  ok: false,
7575
- reason: `at capacity \u2014 ${max} agent(s) already running (pid${slot.heldBy.length > 1 ? "s" : ""} ${slot.heldBy.join(", ")})`
7575
+ reason: `at capacity \u2014 ${max} agent(s) already running (pid${slot2.heldBy.length > 1 ? "s" : ""} ${slot2.heldBy.join(", ")})`
7576
7576
  };
7577
7577
  }
7578
7578
  return { ok: true, release: () => {
7579
- slot.release();
7579
+ slot2.release();
7580
7580
  roleLock.release();
7581
7581
  } };
7582
7582
  }
@@ -9188,6 +9188,7 @@ var STATUS_MEANINGS = [
9188
9188
  { id: "wontFix", label: "Won\u2019t fix", defaultValue: "closed_wont_fix", contractKey: "wontFix", open: false, resolved: true, meaning: "Called off without merging." },
9189
9189
  { id: "duplicate", label: "Duplicate", defaultValue: "closed_duplicate", open: false, resolved: true, meaning: "Closed in favor of another ticket." },
9190
9190
  { id: "completed", label: "Completed", defaultValue: "closed_completed", open: false, resolved: true, meaning: "Done with nothing to deploy." },
9191
+ { id: "obsolete", label: "Obsolete", defaultValue: "closed_obsolete", open: false, resolved: true, optional: true, mappedOnly: true, meaning: "Overtaken or no longer wanted, closed without being built. Releases a dependent exactly as Won\u2019t fix does (interface 1.4)." },
9191
9192
  { id: "cantReproduce", label: "Can\u2019t reproduce", defaultValue: "closed_cant_reproduce", open: false, resolved: true, meaning: "Closed as written, unreproducible." },
9192
9193
  { id: "draft", label: "Draft", defaultValue: "draft", contractKey: "draft", open: false, resolved: false, optional: true, meaning: "Held back; never polled." }
9193
9194
  ];
@@ -9209,10 +9210,10 @@ function defaultQuestionStatuses() {
9209
9210
  return { open: v("open"), answered: v("answered"), withdrawn: v("withdrawn") };
9210
9211
  }
9211
9212
  function defaultStatusValues() {
9212
- const open2 = STATUS_MEANINGS.filter((s) => s.open && s.defaultValue).map((s) => s.defaultValue);
9213
- const resolved = STATUS_MEANINGS.filter((s) => s.resolved && s.defaultValue).map((s) => s.defaultValue);
9213
+ const open2 = STATUS_MEANINGS.filter((s) => s.open && s.defaultValue && !s.mappedOnly).map((s) => s.defaultValue);
9214
+ const resolved = STATUS_MEANINGS.filter((s) => s.resolved && s.defaultValue && !s.mappedOnly).map((s) => s.defaultValue);
9214
9215
  const single2 = {};
9215
- for (const s of STATUS_MEANINGS) if (s.contractKey) single2[s.contractKey] = s.defaultValue || null;
9216
+ for (const s of STATUS_MEANINGS) if (s.contractKey && !s.mappedOnly) single2[s.contractKey] = s.defaultValue || null;
9216
9217
  return { open: open2, resolved, single: single2 };
9217
9218
  }
9218
9219
  function versionLabel(v) {
@@ -9252,7 +9253,7 @@ function contractFromMapping(base, mapping) {
9252
9253
  const open2 = [];
9253
9254
  const resolved = [];
9254
9255
  for (const s of STATUS_MEANINGS) {
9255
- const v = mapped[s.id] ?? (s.defaultValue || null);
9256
+ const v = mapped[s.id] ?? (s.mappedOnly ? null : s.defaultValue || null);
9256
9257
  if (s.contractKey) Object.assign(next.statuses, { [s.contractKey]: v });
9257
9258
  if (!v) continue;
9258
9259
  if (s.open && !open2.includes(v)) open2.push(v);
@@ -18861,18 +18862,19 @@ function blockerInfoMap(tickets, extra = []) {
18861
18862
  }
18862
18863
  return info;
18863
18864
  }
18864
- function computeBlockedIds(tickets, info) {
18865
+ function computeBlockedIds(tickets, info, opts = {}) {
18865
18866
  const blocked = /* @__PURE__ */ new Set();
18866
- for (const t of tickets) if (unresolvedBlockers(t, info).length > 0) blocked.add(t.id);
18867
+ for (const t of tickets) if (unresolvedBlockers(t, info, opts).length > 0) blocked.add(t.id);
18867
18868
  return blocked;
18868
18869
  }
18869
18870
  function unresolvedBlockers(t, info, opts = {}) {
18870
18871
  const mergeGated = opts.mergeGated ?? true;
18872
+ const resolved = opts.resolved ?? RESOLVED_STATUSES;
18871
18873
  return (t.blocked_by ?? []).filter((id) => {
18872
18874
  const b = info[id];
18873
18875
  const status2 = b?.status;
18874
18876
  if (!b || status2 === void 0) return false;
18875
- if (!RESOLVED_STATUSES.has(status2)) return true;
18877
+ if (!resolved.has(status2)) return true;
18876
18878
  return mergeGated && status2 === "verified" && !!t.repo_id && b.repo_id === t.repo_id && !b.merged_at && !b.commit_sha;
18877
18879
  });
18878
18880
  }
@@ -18891,12 +18893,12 @@ function sweepDiagnostics(tickets, info) {
18891
18893
  return { dangling, selfBlocked: [...new Set(selfBlocked)] };
18892
18894
  }
18893
18895
  var describeBlockers = (t, info) => (t.blocked_by ?? []).map((id) => `${info[id]?.issue_tag ?? info[id]?.issue_id ?? "?"} (${info[id]?.status ?? "unknown"})`).join(", ");
18894
- function planSweep(tickets, info, blocked, wm, footprintWaits) {
18896
+ function planSweep(tickets, info, blocked, wm, footprintWaits, resolved) {
18895
18897
  const steps = [];
18896
18898
  for (const t of withinWorkMode(tickets, wm)) {
18897
18899
  if (t.status === "accepted" && blocked.has(t.id)) {
18898
18900
  const fw = footprintWaits?.get(t.id);
18899
- const byFiles = fw && unresolvedBlockers(t, info).length === 0;
18901
+ const byFiles = fw && unresolvedBlockers(t, info, { resolved }).length === 0;
18900
18902
  steps.push({
18901
18903
  action: "park",
18902
18904
  ticket: t,
@@ -18967,9 +18969,9 @@ This is automatic and reversible: a ticket that would change a file another acti
18967
18969
  }
18968
18970
  return step.action === "park" ? `Parked as **Blocked** by the crew \u2014 waiting on: ${step.blockers}.
18969
18971
 
18970
- This is automatic and reversible: an approved ticket whose \`Blocked by\` entries are not all resolved is parked out of the queue, and restored on the first poll after the last one resolves. Nothing else about the ticket changes. A blocker counts as resolved at \`closed_deployed\`, \`closed_wont_fix\` or \`closed_duplicate\`, or at \`verified\` when it is in a different repository or already merged (\`merged_at\` set) \u2014 not at \`fixed\`, which is still an unmerged branch awaiting QA, and not at \`verified\` for a blocker in this ticket's own repository until the release has merged it, so nothing gets built stacked on an unmerged branch.` : `Restored to **Approved** by the crew \u2014 ${step.blockers ? "every blocker has resolved" : "nothing holds it back now (the tickets it waited for no longer hold its files)"}${step.blockers && step.blockers !== "\u2014" ? ` (${step.blockers})` : ""}.
18972
+ This is automatic and reversible: an approved ticket whose \`Blocked by\` entries are not all resolved is parked out of the queue, and restored on the first poll after the last one resolves. Nothing else about the ticket changes. A blocker counts as resolved at \`closed_deployed\`, \`closed_wont_fix\`, \`closed_duplicate\` or \`closed_obsolete\` (where the app maps it), or at \`verified\` when it is in a different repository or already merged (\`merged_at\` set) \u2014 not at \`fixed\`, which is still an unmerged branch awaiting QA, and not at \`verified\` for a blocker in this ticket's own repository until the release has merged it, so nothing gets built stacked on an unmerged branch.` : `Restored to **Approved** by the crew \u2014 ${step.blockers ? "every blocker has resolved" : "nothing holds it back now (the tickets it waited for no longer hold its files)"}${step.blockers && step.blockers !== "\u2014" ? ` (${step.blockers})` : ""}.
18971
18973
 
18972
- This restores the status it was approved at before being parked; it is back in the queue and a role may pick it up. If a blocker resolved as \`closed_wont_fix\` or \`closed_duplicate\` this ticket may still not be buildable as written \u2014 that is a call for a human, not the crew.`;
18974
+ This restores the status it was approved at before being parked; it is back in the queue and a role may pick it up. If a blocker resolved as \`closed_wont_fix\`, \`closed_duplicate\` or \`closed_obsolete\` (where the app maps it) this ticket may still not be buildable as written \u2014 that is a call for a human, not the crew.`;
18973
18975
  }
18974
18976
  async function applySweep(writer, steps, memberId, log) {
18975
18977
  let parked = 0;
@@ -19541,7 +19543,7 @@ ${p.finalText.split("\n").map((l) => `> ${l}`).join("\n")}
19541
19543
  "\nWork the first one you are not required to skip. Tickets waiting on an\nunresolved dependency are already out of this table \u2014 see Blocked below.\n",
19542
19544
  table(step2, i, header, row),
19543
19545
  "\n### Blocked \u2014 waiting on a dependency, not yours to start\n",
19544
- '\nListed rather than hidden so "nothing to do" stays distinguishable from\n"everything is parked". The loop parks and restores these itself, on every\npoll: an approved ticket whose `Blocked by` entries are unresolved moves to\n`blocked`, and back to `accepted` once the last one resolves. **Do not pick\none up, do not set or clear `blocked` by hand, and do not "unblock" one by\nediting its `Blocked by` field** \u2014 if a blocker looks wrong, say so in your\nrun summary. A blocker counts as resolved at `closed_deployed`,\n`closed_wont_fix` or `closed_duplicate`, or at `verified` when it is in another\nrepository or already merged; `fixed` is still an unmerged branch awaiting QA,\nand a `verified` blocker in the same repository as the blocked ticket is unmerged until the\nrelease merges it, so neither counts.\n',
19546
+ '\nListed rather than hidden so "nothing to do" stays distinguishable from\n"everything is parked". The loop parks and restores these itself, on every\npoll: an approved ticket whose `Blocked by` entries are unresolved moves to\n`blocked`, and back to `accepted` once the last one resolves. **Do not pick\none up, do not set or clear `blocked` by hand, and do not "unblock" one by\nediting its `Blocked by` field** \u2014 if a blocker looks wrong, say so in your\nrun summary. A blocker counts as resolved at `closed_deployed`,\n`closed_wont_fix`, `closed_duplicate` or `closed_obsolete`, or at `verified` when it is in another\nrepository or already merged; `fixed` is still an unmerged branch awaiting QA,\nand a `verified` blocker in the same repository as the blocked ticket is unmerged until the\nrelease merges it, so neither counts.\n',
19545
19547
  blockedTable(i.tickets.filter(isBlocked)),
19546
19548
  ...heldTable ? [heldTable] : []
19547
19549
  ]);
@@ -19570,7 +19572,7 @@ function qaDigest(i) {
19570
19572
  ### Waiting on blockers \u2014 not yours to verify yet
19571
19573
 
19572
19574
  A \`fixed\` or \`qa\` ticket whose \`Blocked by\` names something not yet resolved
19573
- (\`closed_deployed\`, \`closed_wont_fix\` or \`closed_duplicate\`, or \`verified\` once merged or in another repository) is held out of
19575
+ (\`closed_deployed\`, \`closed_wont_fix\`, \`closed_duplicate\` or \`closed_obsolete\` (where the app maps it), or \`verified\` once merged or in another repository) is held out of
19574
19576
  verification: its change needs the blocker released first. It becomes yours on
19575
19577
  the first poll after the last blocker resolves. No one needs to change the ticket.
19576
19578
 
@@ -20088,7 +20090,8 @@ async function decideCycle(o) {
20088
20090
  const extra = await tracker.ticketsByIds(missingBlockerIds(tickets));
20089
20091
  const info = blockerInfoMap(tickets, extra);
20090
20092
  await reportTruncated(tracker, route2.route, state, emit);
20091
- const blocked = computeBlockedIds(tickets, info);
20093
+ const resolvedStatuses = new Set(tracker.contract.statuses.resolved);
20094
+ const blocked = computeBlockedIds(tickets, info, { resolved: resolvedStatuses });
20092
20095
  const footprintEvents = await optional("footprint events", readFootprintEvents(tracker), { declared: /* @__PURE__ */ new Map(), pushed: /* @__PURE__ */ new Map() });
20093
20096
  const footprintPlan = planFootprintsFor(route2, tickets, footprintEvents, new Set(blocked));
20094
20097
  for (const id of footprintPlan.waits.keys()) blocked.add(id);
@@ -20101,7 +20104,7 @@ async function decideCycle(o) {
20101
20104
  if (diag.selfBlocked.length) {
20102
20105
  emit.warn(`ticket(s) blocking themselves, parked permanently: ${diag.selfBlocked.join(", ")}`);
20103
20106
  }
20104
- const sweep = planSweep(tickets, info, blocked, workModes, footprintPlan.waits);
20107
+ const sweep = planSweep(tickets, info, blocked, workModes, footprintPlan.waits, resolvedStatuses);
20105
20108
  const holdReleases = planHoldReleases(tickets, tracker.contract);
20106
20109
  const stalled = planStalled(tickets, comments, ships, tracker.contract, holds2, Date.now(), workModes, stalledEvents);
20107
20110
  const skipped = await skippedCounts(tracker, tickets, projectModes);
@@ -20124,7 +20127,7 @@ async function decideCycle(o) {
20124
20127
  reportTypeColumn: tracker.contract.columns.reportType,
20125
20128
  coordinatingValue: tracker.contract.coordinatingValue
20126
20129
  };
20127
- for (const r of rollUpParents(tickets, void 0, coordinating)) {
20130
+ for (const r of rollUpParents(tickets, resolvedStatuses, coordinating)) {
20128
20131
  if (r.complete) {
20129
20132
  emit.note(`every child is done \u2014 this coordinating ticket is too`, { ticket: r.parent.issue_id });
20130
20133
  }
@@ -21501,9 +21504,10 @@ function checkGuards(cwd, base = "main") {
21501
21504
  detail: `working tree has ${changes.length} change(s)${untrackedNote}: ${names}${more}`
21502
21505
  };
21503
21506
  }
21504
- function heldByBlockers(tickets, verifiedStatus, info) {
21507
+ function heldByBlockers(tickets, verifiedStatus, info, resolved) {
21505
21508
  if (!info) return [];
21506
- return tickets.filter((t) => t.status === verifiedStatus && unresolvedBlockers(t, info, { mergeGated: false }).length > 0).map((ticket) => ({ ticket, blockers: describeUnresolved(ticket, info, { mergeGated: false }) }));
21509
+ const opts = { mergeGated: false, resolved };
21510
+ return tickets.filter((t) => t.status === verifiedStatus && unresolvedBlockers(t, info, opts).length > 0).map((ticket) => ({ ticket, blockers: describeUnresolved(ticket, info, opts) }));
21507
21511
  }
21508
21512
  var describeHeld = (held) => held.map((h) => `${h.ticket.issue_tag ?? h.ticket.issue_id} held: blocked by ${h.blockers}`);
21509
21513
  var CHANGELOG_LINE = /^Changelog:[ \t]*(.*)$/gm;
@@ -21531,7 +21535,7 @@ function dedupeChangelogEntries(entries, ticket) {
21531
21535
  }
21532
21536
  var BUMP_LINE = /^Bump:[ \t]*(major|minor|patch)\b/gim;
21533
21537
  function planMerge(cwd, tickets, contract, lastReleased, branchFor = (t) => branchForIssue(cwd, t.issue_id), base = "main", blockerInfo, ref = "HEAD") {
21534
- const held = new Set(heldByBlockers(tickets, contract.statuses.verified, blockerInfo).map((h) => h.ticket.id));
21538
+ const held = new Set(heldByBlockers(tickets, contract.statuses.verified, blockerInfo, new Set(contract.statuses.resolved)).map((h) => h.ticket.id));
21535
21539
  const verified = tickets.filter((t) => t.status === contract.statuses.verified && !held.has(t.id)).sort((a, b) => Number.parseInt(a.issue_id.replace(/^\D+/, ""), 10) - Number.parseInt(b.issue_id.replace(/^\D+/, ""), 10));
21536
21540
  return verified.map((ticket) => {
21537
21541
  const branch = branchFor(ticket);
@@ -21665,7 +21669,7 @@ function decideRelease(cwd, tickets, contract, opts = {}) {
21665
21669
  return {
21666
21670
  block,
21667
21671
  merges,
21668
- held: heldByBlockers(tickets, contract.statuses.verified, opts.blockerInfo),
21672
+ held: heldByBlockers(tickets, contract.statuses.verified, opts.blockerInfo, new Set(contract.statuses.resolved)),
21669
21673
  head,
21670
21674
  lastTag,
21671
21675
  lastReleased,
@@ -23395,6 +23399,30 @@ Passed: ${passed}.${willClose ? " Closing this alert." : ""}`,
23395
23399
  return out;
23396
23400
  }
23397
23401
 
23402
+ // src/run-tags.ts
23403
+ var slot = (route2, key) => `${route2}\0${key}`;
23404
+ async function resolveRunTags(refs, sourceFor) {
23405
+ const byRoute2 = /* @__PURE__ */ new Map();
23406
+ for (const r of refs) {
23407
+ if (!r.route) continue;
23408
+ const want = byRoute2.get(r.route) ?? { ids: /* @__PURE__ */ new Set(), keys: /* @__PURE__ */ new Set() };
23409
+ if (r.ticketRecordId) want.ids.add(r.ticketRecordId);
23410
+ if (r.ticket) want.keys.add(r.ticket);
23411
+ byRoute2.set(r.route, want);
23412
+ }
23413
+ const tags = /* @__PURE__ */ new Map();
23414
+ await Promise.all([...byRoute2].map(async ([route2, want]) => {
23415
+ const source = sourceFor(route2);
23416
+ if (!source) return;
23417
+ const found = [
23418
+ ...want.ids.size ? await source.ticketsByIds([...want.ids]).catch(() => []) : [],
23419
+ ...want.keys.size ? await source.ticketsByKeys([...want.keys]).catch(() => []) : []
23420
+ ];
23421
+ for (const t of found) tags.set(slot(route2, t.issue_id), displayKey(t));
23422
+ }));
23423
+ return (route2, key) => key ? (route2 ? tags.get(slot(route2, key)) : void 0) ?? key : null;
23424
+ }
23425
+
23398
23426
  // src/comment-delivery.ts
23399
23427
  import { basename as basename11 } from "path";
23400
23428
  var MESSAGE_MAX_CHARS = 4e3;
@@ -29177,7 +29205,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
29177
29205
  import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
29178
29206
  import { join as join60 } from "path";
29179
29207
  function builtVersion() {
29180
- return true ? "0.163.2" : null;
29208
+ return true ? "0.164.1" : null;
29181
29209
  }
29182
29210
  var REBUILD_HINT = "rebuild with npm run build";
29183
29211
  function newestMtime(path) {
@@ -37204,13 +37232,24 @@ ${where.join("\n")}`);
37204
37232
  (await statusTracker.ticketsByIds([...new Set(runs.map((x) => x.ticketRecordId).filter((id) => !!id))]).catch(() => [])).map((t) => [t.id, t.title ?? null])
37205
37233
  );
37206
37234
  const lastRuns = lastRunsBySeat(cfg.ship.stateDir);
37207
- const wantedKeys = [...new Set([...runs.map((x) => x.ticket), ...[...lastRuns.values()].map((l) => l.ticket)].filter((k) => !!k))];
37208
- const tagByKey = /* @__PURE__ */ new Map();
37209
- for (const t of [
37210
- ...await statusTracker.ticketsByIds([...new Set(runs.map((x) => x.ticketRecordId).filter((id) => !!id))]).catch(() => []),
37211
- ...await statusTracker.ticketsByKeys(wantedKeys).catch(() => [])
37212
- ]) tagByKey.set(t.issue_id, displayKey(t));
37213
- const tagOf = (k) => k ? tagByKey.get(k) ?? k : null;
37235
+ const thisSlug = routeSlug(route2.route);
37236
+ const otherSources = /* @__PURE__ */ new Map();
37237
+ const sourceFor = (slug2) => {
37238
+ if (slug2 === thisSlug) return statusTracker;
37239
+ if (!otherSources.has(slug2)) {
37240
+ const rt = cfg.routes.find((x) => routeSlug(x.route) === slug2);
37241
+ let t;
37242
+ try {
37243
+ t = rt ? new Tracker(rt, cfg.ship) : void 0;
37244
+ } catch (e) {
37245
+ if (!(e instanceof ConfigError)) throw e;
37246
+ }
37247
+ otherSources.set(slug2, t);
37248
+ }
37249
+ return otherSources.get(slug2);
37250
+ };
37251
+ const resolvedTag = await resolveRunTags([...runs, ...lastRuns.values()], sourceFor);
37252
+ const tagOf = (route3, k) => resolvedTag(route3, k);
37214
37253
  const periscopes = await periscopesForStatus(cfg.ship.stateDir);
37215
37254
  const runPreviews = new Map(periscopes.filter((p) => p.serving).map((p) => [p.ticketRecordId, p.url]));
37216
37255
  if (flag("json")) {
@@ -37238,7 +37277,7 @@ ${where.join("\n")}`);
37238
37277
  // Additive (CREW-2822): how many runs this seat has live right now.
37239
37278
  running: runs.filter((x) => x.role === r && x.route === routeSlug(route2.route)).length,
37240
37279
  // Additive (CREW-3247): this seat's newest finished run on this ship, or null.
37241
- lastRun: ((l) => l ? { ticket: tagOf(l.ticket), startedAt: l.startedAt, finishedAt: l.finishedAt, outcome: l.outcome, exitCode: l.exitCode } : null)(lastRuns.get(`${routeSlug(route2.route)}/${r}`))
37280
+ lastRun: ((l) => l ? { ticket: tagOf(l.route, l.ticket), startedAt: l.startedAt, finishedAt: l.finishedAt, outcome: l.outcome, exitCode: l.exitCode } : null)(lastRuns.get(`${routeSlug(route2.route)}/${r}`))
37242
37281
  };
37243
37282
  });
37244
37283
  process.stdout.write(`${JSON.stringify({
@@ -37288,7 +37327,7 @@ ${where.join("\n")}`);
37288
37327
  seats: seats2
37289
37328
  },
37290
37329
  // Additive (CREW-2822): every live run on this ship. `version` stays 1.
37291
- runs: runs.map((x) => describeRun(x, route2, seatIds, void 0, { titles: runTitles, previews: runPreviews, tags: tagByKey })),
37330
+ runs: runs.map((x) => describeRun(x, route2, seatIds, void 0, { titles: runTitles, previews: runPreviews, tags: new Map(x.ticket ? [[x.ticket, tagOf(x.route, x.ticket) ?? x.ticket]] : []) })),
37292
37331
  // Additive (CREW-2857): every live periscope on this ship, from its local record. `version` stays 1.
37293
37332
  periscopes,
37294
37333
  watermark: state.watermark(routeSlug(route2.route)),
@@ -37359,8 +37398,8 @@ ${where.join("\n")}`);
37359
37398
  try {
37360
37399
  const open2 = await statusTracker.openTickets();
37361
37400
  const blockerInfo = blockerInfoMap(open2, await statusTracker.ticketsByIds(missingBlockerIds(open2)));
37362
- heldReleases = describeHeld(heldByBlockers(open2, statusTracker.contract.statuses.verified, blockerInfo));
37363
- waitViews = [...planFootprintsFor(route2, open2, await readFootprintEvents(statusTracker), computeBlockedIds(open2, blockerInfo)).waits.values()].map((w) => ({ ticket: displayKey(w.ticket), waitingFor: w.waitingFor, files: w.files }));
37401
+ heldReleases = describeHeld(heldByBlockers(open2, statusTracker.contract.statuses.verified, blockerInfo, new Set(statusTracker.contract.statuses.resolved)));
37402
+ waitViews = [...planFootprintsFor(route2, open2, await readFootprintEvents(statusTracker), computeBlockedIds(open2, blockerInfo, { resolved: new Set(statusTracker.contract.statuses.resolved) })).waits.values()].map((w) => ({ ticket: displayKey(w.ticket), waitingFor: w.waitingFor, files: w.files }));
37364
37403
  const minutes = Math.min(...(await resolvedRepos(route2)).map((r) => r.config.release.rightOfWayMinutes ?? DEFAULT_RIGHT_OF_WAY_MINUTES), DEFAULT_RIGHT_OF_WAY_MINUTES);
37365
37404
  if (open2.some((t) => t.status === statusTracker.contract.statuses.verified)) {
37366
37405
  deferredReleases = deferredFromLog(
@@ -37385,7 +37424,7 @@ ${where.join("\n")}`);
37385
37424
  });
37386
37425
  }
37387
37426
  const reloadWaitingAt = readReloadRequestedAt(cfg.ship.stateDir);
37388
- const lastRunView = [...lastRuns.values()].filter((l) => l.route === routeSlug(route2.route)).map((l) => ({ role: l.role, ticket: tagOf(l.ticket), finishedAt: l.finishedAt, outcome: l.outcome }));
37427
+ const lastRunView = [...lastRuns.values()].filter((l) => l.route === routeSlug(route2.route)).map((l) => ({ role: l.role, ticket: tagOf(l.route, l.ticket), finishedAt: l.finishedAt, outcome: l.outcome }));
37389
37428
  for (const line of renderStatus({
37390
37429
  ship: { name: cfg.ship.name, platform: cfg.ship.platform },
37391
37430
  route: { name: route2.route, dir: route2.dir, enabled: route2.enabled },
@@ -37400,7 +37439,7 @@ ${where.join("\n")}`);
37400
37439
  watermark: String(state.watermark(routeSlug(route2.route))),
37401
37440
  projects: projects.map((p) => p.label),
37402
37441
  reloadRequestedSecondsAgo: reloadWaitingAt === null ? null : Math.max(0, Math.round((Date.now() - reloadWaitingAt) / 1e3)),
37403
- runs: runs.map((x) => ({ role: x.role, ticket: tagOf(x.ticket), repo: x.repo, pid: x.pid, spawnedAt: x.spawnedAt, deadline: x.deadline })),
37442
+ runs: runs.map((x) => ({ role: x.role, ticket: tagOf(x.route, x.ticket), repo: x.repo, pid: x.pid, spawnedAt: x.spawnedAt, deadline: x.deadline })),
37404
37443
  lastRuns: lastRunView,
37405
37444
  attention: shipAttention.map((i) => ({ kind: i.kind, message: i.message, since: i.since })),
37406
37445
  waiting: todo.map((i) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.163.2",
3
+ "version": "0.164.1",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",