@futurelastic/colab-handbook 1.15.0-rc.1 → 1.15.0-rc.2
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 +1 -1
- package/tools/colab +13 -4
- package/tools/lib/release-cut.js +31 -1
package/package.json
CHANGED
package/tools/colab
CHANGED
|
@@ -1302,7 +1302,10 @@ Refuses, naming each failed condition (all are reported, not just the first):
|
|
|
1302
1302
|
already-candidate this commit already carries a candidate of the same version
|
|
1303
1303
|
ci-green every run at the commit finished and one succeeded — colab ship's whole-sha check
|
|
1304
1304
|
full-suite every workflow that ran at the commit has a successful run (a cancelled-only
|
|
1305
|
-
workflow never ran its tests)
|
|
1305
|
+
workflow never ran its tests). Both read only the runs that verify the code,
|
|
1306
|
+
by colab ship's rule: a schedule / workflow_dispatch / workflow_run run (a
|
|
1307
|
+
nightly still in flight) is set aside and named; project.yml
|
|
1308
|
+
ship-gate-workflows / ship-ignore-workflows narrow it the same way
|
|
1306
1309
|
schema-additive a migration since the last final tag is destructive (Laravel database/migrations
|
|
1307
1310
|
up() drops/renames/->change(), Prisma DROP/RENAME/ALTER COLUMN, and .php/.sql
|
|
1308
1311
|
under a project.yml \`migrations:\` prefix) or an existing migration was
|
|
@@ -1440,7 +1443,7 @@ function releaseCutChanges(repoAbs, from, sha, declared) {
|
|
|
1440
1443
|
* — by branch window for a fresh head (cut), by commit for an older candidate (finalize). Also
|
|
1441
1444
|
* returns the issue list it read (null when unread or gh unusable), so a caller does not read it twice.
|
|
1442
1445
|
*/
|
|
1443
|
-
function measureCandidateConditions(repoAbs, { sha, lastFinal, at, readRuns, issues: knownIssues }) {
|
|
1446
|
+
function measureCandidateConditions(repoAbs, { sha, lastFinal, at, readRuns, issues: knownIssues, verifying }) {
|
|
1444
1447
|
let ci; let suite; let switches; let issues = null;
|
|
1445
1448
|
if (!isGhUsable(repoAbs)) {
|
|
1446
1449
|
const why = ghUnusableWhy(repoAbs);
|
|
@@ -1449,11 +1452,16 @@ function measureCandidateConditions(repoAbs, { sha, lastFinal, at, readRuns, iss
|
|
|
1449
1452
|
switches = { ok: false, unread: true, detail: `gh not usable (${why}) — the colab:switch markers cannot be read` };
|
|
1450
1453
|
} else {
|
|
1451
1454
|
// #616: a workflow whose every run at the sha was skipped did not run — not counted either way.
|
|
1452
|
-
|
|
1455
|
+
// #624: `verifying` (release cut only) narrows the rows to the runs that verify the code — a
|
|
1456
|
+
// scheduled run still in flight at the sha is not part of its verdict. Finalize passes none.
|
|
1457
|
+
const read = verifying ? releaseCut.verifyingRunsForCut(readRuns(), verifying) : { rows: readRuns() };
|
|
1458
|
+
const note = releaseCut.verifyingNote(read);
|
|
1459
|
+
const rows = releaseCut.withoutSkippedOnlyWorkflows(read.rows);
|
|
1453
1460
|
const run = git.summarizeRunsForCommit(rows, sha);
|
|
1454
1461
|
if (!run) ci = { ok: false, detail: `gh run list failed — cannot confirm CI at ${at}` };
|
|
1455
|
-
else { const v = classifyCiRun(repoAbs, run, at); ci = { ok: v.ok, detail: v.detail }; }
|
|
1462
|
+
else { const v = classifyCiRun(repoAbs, run, at); ci = { ok: v.ok, detail: v.detail + note }; }
|
|
1456
1463
|
suite = releaseCut.fullSuiteVerdict(rows, at);
|
|
1464
|
+
if (note && rows) suite = { ...suite, detail: suite.detail + note };
|
|
1457
1465
|
// #423: an --auto finalize judges several candidates in one run — the issue list is read once.
|
|
1458
1466
|
issues = knownIssues !== undefined ? knownIssues : readAllIssuesForSwitches(repoAbs);
|
|
1459
1467
|
switches = releaseCut.switchVerdict(issues);
|
|
@@ -1721,6 +1729,7 @@ function cmdReleaseCut(argv) {
|
|
|
1721
1729
|
|
|
1722
1730
|
const { ci, suite, schema, switches, issues, migrations: migrationPathsSince } = measureCandidateConditions(repoAbs, {
|
|
1723
1731
|
sha, lastFinal, at, readRuns: () => releaseCut.withoutOwnWorkflow(git.ghRunsForCommit(repoAbs, 'main', sha)), // #425
|
|
1732
|
+
verifying: verifyingPolicy(repoAbs), // #624: the ship gate's rule for which runs may veto
|
|
1724
1733
|
});
|
|
1725
1734
|
const { manifests, ancestry } = measurePreTag(repoAbs, sha, `${remote}/main`); // #424
|
|
1726
1735
|
|
package/tools/lib/release-cut.js
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* already-candidate the commit does not already carry a candidate of this version
|
|
24
24
|
* ci-green §6 condition 1 — every run at the sha finished, one succeeded
|
|
25
25
|
* full-suite §6 condition 2 — every workflow that ran at the sha has a successful run
|
|
26
|
+
* (both over the code-verifying runs only, the ship gate's rule — #624)
|
|
26
27
|
* schema-additive §6 condition 3 — no destructive migration since the last final tag
|
|
27
28
|
* switch-dependencies §6 condition 4 — the colab:switch markers are readable, and no finished
|
|
28
29
|
* switch needs one that is still unfinished
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
const migrationPaths = require('./migration-paths');
|
|
76
77
|
const releaseTag = require('./release-tag');
|
|
77
78
|
const { stripCode } = require('./instruction-file');
|
|
79
|
+
const verifyRuns = require('./verify-runs');
|
|
78
80
|
|
|
79
81
|
const VERSION_RE = /^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/;
|
|
80
82
|
const BUMPS = Object.freeze(['patch', 'minor']);
|
|
@@ -737,6 +739,34 @@ function withoutSkippedOnlyWorkflows(rows) {
|
|
|
737
739
|
return rows.filter((r) => !drop.has((r && r.workflowName) || '(unnamed workflow)'));
|
|
738
740
|
}
|
|
739
741
|
|
|
742
|
+
/**
|
|
743
|
+
* #624: the run rows `release cut` judges ci-green and full-suite over — the runs that VERIFY the code
|
|
744
|
+
* at the sha, by the ship gate's own rule (verify-runs.js, #503: push / pull_request / merge_group
|
|
745
|
+
* triggers, project.yml `ship-gate-workflows` / `ship-ignore-workflows`, the #567 dispatch rescue).
|
|
746
|
+
* One rule for "which workflows may veto", not a second. Measured: a qualified sha whose CI push run
|
|
747
|
+
* had succeeded was refused ci-green AND full-suite because a scheduled `Nightly` run at the same sha
|
|
748
|
+
* was still in progress — a run that comes after the verdict, not part of it. Returns `{ rows,
|
|
749
|
+
* setAside }`; each set-aside row carries `setAsideWhy`. null passes through as `{ rows: null }`.
|
|
750
|
+
*/
|
|
751
|
+
function verifyingRunsForCut(rows, policy) {
|
|
752
|
+
if (!Array.isArray(rows)) return { rows, setAside: [], dispatchCounted: [] };
|
|
753
|
+
const split = verifyRuns.splitVerifying(rows, policy || { gate: null, ignore: [] });
|
|
754
|
+
return { rows: split.counted, setAside: split.setAside, dispatchCounted: split.dispatchCounted || [] };
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* #624: the detail suffix naming what `verifyingRunsForCut` set aside (and any lost-push dispatch run
|
|
759
|
+
* it counted, #567) — the ship gate's own wording, so one reader learns one phrase. '' when neither.
|
|
760
|
+
*/
|
|
761
|
+
function verifyingNote(read) {
|
|
762
|
+
if (!read) return '';
|
|
763
|
+
const summary = (list) => (list || []).map((x) => ({
|
|
764
|
+
workflowName: x.workflowName || null, status: x.status || null, conclusion: x.conclusion || null,
|
|
765
|
+
databaseId: x.databaseId || null, ...(x.setAsideWhy ? { why: x.setAsideWhy } : {}),
|
|
766
|
+
}));
|
|
767
|
+
return verifyRuns.setAsideNote(summary(read.setAside)) + verifyRuns.dispatchCountedNote(summary(read.dispatchCounted));
|
|
768
|
+
}
|
|
769
|
+
|
|
740
770
|
/**
|
|
741
771
|
* The run rows minus the CALLING workflow's own runs (#425). Inside the release workflow
|
|
742
772
|
* (templates/release-auto.yml) `release cut` / `release finalize` read the runs at the very commit
|
|
@@ -1226,7 +1256,7 @@ module.exports = {
|
|
|
1226
1256
|
isFastRoute, isLibraryRoute, decideManifestVersion, spacingVerdict, holdsVerdict, migrationHandoff,
|
|
1227
1257
|
parseVersion, formatVersion, candidateNumbers, nextCandidateNumber, decideVersion,
|
|
1228
1258
|
parseGuardOutput, exportsDiff, switchRemovalsSince, autoSignals, parseMigrationSection, decideAutoVersion, cadenceVerdict, qualifiedShaVerdict,
|
|
1229
|
-
fullSuiteVerdict, withoutOwnWorkflow, withoutSkippedOnlyWorkflows, isMigrationPath, schemaVerdict,
|
|
1259
|
+
fullSuiteVerdict, withoutOwnWorkflow, withoutSkippedOnlyWorkflows, verifyingRunsForCut, verifyingNote, isMigrationPath, schemaVerdict,
|
|
1230
1260
|
parseSwitchMarkers, switchVerdict,
|
|
1231
1261
|
promotionVerdict, decide, tagMessage, versionSourceOf,
|
|
1232
1262
|
DOWNSTREAM_EVENTS, headCandidateVerdict, prereleaseArgs, finalReleaseArgs, handoffTrackingBody,
|