@futurelastic/colab-handbook 1.15.0-rc.5 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -33,5 +33,5 @@
33
33
  "engines": {
34
34
  "node": ">=18"
35
35
  },
36
- "version": "1.15.0-rc.5"
36
+ "version": "1.15.0"
37
37
  }
@@ -379,8 +379,8 @@ function wiring(fires) {
379
379
 
380
380
  /**
381
381
  * The combined run's verdict from every run row at the batch head (`{status, conclusion, attempt,
382
- * databaseId}`). Same all-runs rule as summarizeRunsForCommit: any finished not-green row (cancelled
383
- * aside) makes it red; any unfinished row keeps it pending; green needs every row finished and at
382
+ * databaseId, workflowName}`). Same all-runs rule as summarizeRunsForCommit: any finished not-green
383
+ * row (cancelled aside) makes it red; a named workflow with only cancelled rows makes it red (#629); any unfinished row keeps it pending; green needs every row finished and at
384
384
  * least one success. `attempt` is the highest run attempt seen — how many times it was re-run.
385
385
  * Unlike summarizeRunsForCommit it does NOT reduce to the newest run per workflow (#461): a batch
386
386
  * ref is built fresh and re-run in place (same run, higher `attempt`), so it carries no superseded
@@ -395,6 +395,18 @@ function combinedVerdict(rows) {
395
395
  const bad = list.find((r) => r.status === 'completed' && r.conclusion !== 'success' && r.conclusion !== 'cancelled');
396
396
  if (bad) return { state: 'red', attempt, runIds, why: `a run finished ${bad.conclusion}` };
397
397
  if (list.some((r) => r.status !== 'completed')) return { state: 'pending', attempt, runIds, why: 'a run is still in flight' };
398
+ // #629 (the batch-ref twin of #628): a NAMED workflow whose rows here are all cancelled verified
399
+ // nothing, and another workflow's success must not carry the verdict for it — measured shape: the
400
+ // test workflow hung and was cancelled, a lint workflow passed, and the batch read green. A
401
+ // batch ref is re-run in place (same run, higher attempt), so a cancelled row is never a
402
+ // superseded straggler beside a newer run of its workflow; a same-workflow success still clears
403
+ // it. Unnamed rows (batch-stats.js projections, older fixtures) stay neutral, as in #628.
404
+ const succeeded = new Set(list.filter((r) => r.conclusion === 'success' && r.workflowName).map((r) => r.workflowName));
405
+ const cancelledOnly = list.find((r) => r.workflowName && r.conclusion === 'cancelled' && !succeeded.has(r.workflowName));
406
+ if (cancelledOnly) {
407
+ const id = cancelledOnly.databaseId !== null && cancelledOnly.databaseId !== undefined ? ` (run ${cancelledOnly.databaseId})` : '';
408
+ return { state: 'red', attempt, runIds, why: `workflow "${cancelledOnly.workflowName}" never finished here — its only run${id} was cancelled, so it verified nothing; re-run it` };
409
+ }
398
410
  if (list.some((r) => r.conclusion === 'success')) return { state: 'green', attempt, runIds, why: `${list.length} run(s): all success` };
399
411
  return { state: 'red', attempt, runIds, why: 'every run was cancelled' };
400
412
  }