@futurelastic/colab-handbook 1.15.0-rc.5 → 1.15.1-rc.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.
- package/audit/audit.mjs +11 -2
- package/package.json +1 -1
- package/tools/lib/ship-batch.js +14 -2
package/audit/audit.mjs
CHANGED
|
@@ -264,7 +264,9 @@ function parseScalarValue(raw) {
|
|
|
264
264
|
return val;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
const NESTED_MAP_KEYS = new Set(["release", "owner", "gate", "thresholds"]); // owner: #394 · gate: #410 · thresholds: #560
|
|
267
|
+
const NESTED_MAP_KEYS = new Set(["release", "owner", "gate", "thresholds", "contention"]); // owner: #394 · gate: #410 · thresholds: #560 · contention: #630
|
|
268
|
+
// The one map whose pairs may hold an INLINE list (`coupled: [a, b]`) — still one level, still no block list (#630).
|
|
269
|
+
const LIST_IN_MAP_KEYS = new Set(["contention"]);
|
|
268
270
|
|
|
269
271
|
function parseFlatYaml(text) {
|
|
270
272
|
const out = {};
|
|
@@ -291,7 +293,14 @@ function parseFlatYaml(text) {
|
|
|
291
293
|
const [, indent, sub, subRaw] = pair;
|
|
292
294
|
if (mapIndent === null) mapIndent = indent.length;
|
|
293
295
|
const subTrimmed = subRaw.replace(/\s+#.*$/, "").trim();
|
|
294
|
-
|
|
296
|
+
const inlineList = /^\[.*\]$/.test(subTrimmed);
|
|
297
|
+
if (indent.length === mapIndent && inlineList && LIST_IN_MAP_KEYS.has(mapKey)) {
|
|
298
|
+
if (out[mapKey] === null || typeof out[mapKey] !== "object") out[mapKey] = {};
|
|
299
|
+
const inner = subTrimmed.slice(1, -1).trim();
|
|
300
|
+
out[mapKey][sub] = inner === "" ? [] : inner.split(",").map((s) => parseScalarValue(s));
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
if (indent.length === mapIndent && subTrimmed !== "" && !inlineList) {
|
|
295
304
|
if (out[mapKey] === null || typeof out[mapKey] !== "object") out[mapKey] = {};
|
|
296
305
|
// #439: an unquoted whole number under `release:` is a number, as the CLI's YAML reader
|
|
297
306
|
// reads it (`candidates-per-day: 1`, `final-grant: 7`) — kept a string, the one reading
|
package/package.json
CHANGED
package/tools/lib/ship-batch.js
CHANGED
|
@@ -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
|
|
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
|
}
|