@futurelastic/colab-handbook 1.14.1-rc.6 → 1.14.1-rc.8
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 +35 -4
- package/tools/lib/release-tag.js +8 -3
package/package.json
CHANGED
package/tools/colab
CHANGED
|
@@ -1311,7 +1311,8 @@ Refuses, naming each failed condition (all are reported, not just the first):
|
|
|
1311
1311
|
judgement on the diff
|
|
1312
1312
|
switch-dependencies a colab:switch marker is malformed, or a finished switch needs one that is not
|
|
1313
1313
|
manifest-version the tag does not equal the version a manifest declares (VERSION, package.json,
|
|
1314
|
-
Cargo.toml [package],
|
|
1314
|
+
Cargo.toml [package], else [workspace.package] (#620), pyproject.toml
|
|
1315
|
+
[project]/[tool.poetry]) — none declared
|
|
1315
1316
|
passes: the tag is the version (#424). Under release.version-source: tag (#438;
|
|
1316
1317
|
the default where the machine cuts the tag, #484) a differing manifest is DERIVABLE — skipped, named in the tag message, and
|
|
1317
1318
|
stamped from the tag by the repo's own release step (never on trunk)
|
|
@@ -13601,6 +13602,31 @@ function handoffEvidence(v) {
|
|
|
13601
13602
|
return v ? ` · landed from the executor's hand-off ${v.url} — its claim and worktree stay until it confirms the land` : '';
|
|
13602
13603
|
}
|
|
13603
13604
|
|
|
13605
|
+
/**
|
|
13606
|
+
* #619: the one line a failed B1 git step is reported by. Never `stderr.split('\n')[0]` — a
|
|
13607
|
+
* pre-commit hook that prints a banner first (gitleaks' ASCII art opens with `○`) made the banner
|
|
13608
|
+
* the entire report and discarded the reason. gitFailureLine picks the `fatal:` line or the LAST
|
|
13609
|
+
* line, which is where a hook's verdict lands. stdout is the fallback because git writes some
|
|
13610
|
+
* failures there with an empty stderr (`merge --squash` conflicts, `nothing to commit`).
|
|
13611
|
+
*/
|
|
13612
|
+
function b1FailureLine(r, fallback) {
|
|
13613
|
+
return git.gitFailureLine(r.stderr) || git.gitFailureLine(r.stdout) || fallback;
|
|
13614
|
+
}
|
|
13615
|
+
|
|
13616
|
+
/**
|
|
13617
|
+
* #619: the full output of a failed B1 git step, indented under the one-line summary, so the cause
|
|
13618
|
+
* survives even when no single line names it (the measured failure could not be recovered: an
|
|
13619
|
+
* identical retry passed). Empty when there is at most one line — the summary already said it.
|
|
13620
|
+
* Capped at the last 40 lines; a hook's verdict is at the end, not the start.
|
|
13621
|
+
*/
|
|
13622
|
+
function b1FailureDetail(r) {
|
|
13623
|
+
const lines = String((r.stderr || '').trim() ? r.stderr : (r.stdout || '')).split('\n').filter((l) => l.trim());
|
|
13624
|
+
if (lines.length <= 1) return '';
|
|
13625
|
+
const shown = lines.slice(-40);
|
|
13626
|
+
const head = lines.length > shown.length ? ` … ${lines.length - shown.length} earlier line(s) omitted\n` : '';
|
|
13627
|
+
return ` git output:\n${head}${shown.map((l) => ` ${l}`).join('\n')}\n`;
|
|
13628
|
+
}
|
|
13629
|
+
|
|
13604
13630
|
function shipRefFor(repoAbs, branch) {
|
|
13605
13631
|
const r = git.branchRefs(repoAbs, branch);
|
|
13606
13632
|
return r.localSha || r.remoteSha || branch;
|
|
@@ -14546,14 +14572,19 @@ function cmdShip(argv) {
|
|
|
14546
14572
|
const sq = git.git(['merge', '--squash', sess.branch], targetDir);
|
|
14547
14573
|
if (!sq.ok) {
|
|
14548
14574
|
git.git(['merge', '--abort'], targetDir); cleanupEphemeral(); cleanupTarget();
|
|
14549
|
-
|
|
14575
|
+
// #619: never stderr's first line — a conflict reports on STDOUT with an empty stderr.
|
|
14576
|
+
process.stderr.write(`✗ B1: squash-merge failed: ${b1FailureLine(sq, 'no output from git')}. Nothing pushed.\n${b1FailureDetail(sq)}`);
|
|
14577
|
+
process.stderr.write(` Sync ${target} into the branch (\`git merge ${shipRemote}/${target}\` in its worktree), resolve, push, then re-run \`colab ship --branch ${sess.branch}\`.\n`);
|
|
14550
14578
|
return 1;
|
|
14551
14579
|
}
|
|
14552
14580
|
const commit = git.run('git', ['commit', '-m', commitMsg], { cwd: targetDir });
|
|
14553
14581
|
if (!commit.ok) {
|
|
14554
14582
|
git.git(['reset', '--hard', `${shipRemote}/${target}`], targetDir); cleanupEphemeral(); cleanupTarget();
|
|
14555
|
-
//
|
|
14556
|
-
|
|
14583
|
+
// #619: a hook that prints a banner first (gitleaks' ASCII art) made stderr's FIRST line the
|
|
14584
|
+
// whole report, discarding the reason. gitFailureLine picks the `fatal:` / last line instead,
|
|
14585
|
+
// and the full hook output follows so the cause survives even when no single line names it.
|
|
14586
|
+
process.stderr.write(`✗ B1: commit failed (${b1FailureLine(commit, 'nothing to commit?')}). ${target} reset, nothing pushed.\n${b1FailureDetail(commit)}`);
|
|
14587
|
+
process.stderr.write(` Fix what the output above names on ${sess.branch}, push, then re-run \`colab ship --branch ${sess.branch}\` once it passes.\n`);
|
|
14557
14588
|
return 1;
|
|
14558
14589
|
}
|
|
14559
14590
|
const sha = git.git(['rev-parse', '--short', 'HEAD'], targetDir).stdout;
|
package/tools/lib/release-tag.js
CHANGED
|
@@ -176,10 +176,15 @@ function manifestVersions(readFile) {
|
|
|
176
176
|
if (j && typeof j.version === 'string') out.push({ file, version: j.version });
|
|
177
177
|
else if (j && j.version !== undefined) out.push({ file, error: `package.json version is ${JSON.stringify(j.version)}, not a string` });
|
|
178
178
|
} else if (file === 'Cargo.toml') {
|
|
179
|
+
// #620: a workspace root states the shared version in [workspace.package] — the form Cargo
|
|
180
|
+
// documents — and may have no [package] at all, or one that inherits it with
|
|
181
|
+
// version.workspace = true. Either way that is the version this repo releases. A literal
|
|
182
|
+
// [package] version still wins: [workspace.package] is only what members inherit.
|
|
179
183
|
const v = tomlTableVersion(text, 'package');
|
|
180
|
-
if (!v) continue;
|
|
181
|
-
|
|
182
|
-
|
|
184
|
+
if (v && !v.workspace) { if (v.value !== undefined) out.push({ file, version: v.value }); continue; }
|
|
185
|
+
const ws = tomlTableVersion(text, 'workspace.package');
|
|
186
|
+
if (ws && ws.value !== undefined) out.push({ file, version: ws.value });
|
|
187
|
+
else if (v && v.workspace) out.push({ file, error: 'Cargo.toml takes version.workspace = true but declares no [workspace.package] version — this is a member crate, and its workspace root is not read here' });
|
|
183
188
|
} else if (file === 'pyproject.toml') {
|
|
184
189
|
const v = tomlTableVersion(text, 'project') || tomlTableVersion(text, 'tool.poetry');
|
|
185
190
|
if (!v) continue;
|