Skip to content

Commit 18e761a

Browse files
committed
fix(devx): point shallow-clone refusals at ci.yml's history fetch step
Three refusal messages told a CI reader to give the checkout `fetch-depth: 0`. ci.yml's history-reading jobs now check out at depth 1 and run the step "Fetch this commit's history and the base branch"; lint.yml still checks out full history. Each message now names both remedies. Local advice, exit codes and every other line are unchanged. The spec topology pin also asserts the step name. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQqimUnb4io8LpGcvH
1 parent 532230f commit 18e761a

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎packages/spec/scripts/build-schemas-check-mode.git-topology.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,8 @@ describe('build-schemas.ts — a shallow checkout re-anchors the deletion gate,
832832
expect(status).toBe(1);
833833
expect(output).toContain('No baseline to anchor the deletion checks on');
834834
expect(output).toContain('authorable-surface.base.json');
835+
// Both CI remedies: ci.yml's history fetch step, and lint.yml's full checkout.
836+
expect(output).toContain("Fetch this commit's history and the base branch");
835837
expect(output).toContain('fetch-depth: 0');
836838
expect(output).not.toContain('anchors on the origin/main TIP');
837839
expect(output).not.toContain('deleted without proof');

‎packages/spec/scripts/build-schemas.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,8 +2426,9 @@ function resolveBaselineWithoutMergeBase(
24262426
committed: AuthorableSurfaceBase | null,
24272427
): { rev: string; why: string } | { refusal: string } {
24282428
const remedy =
2429-
` A checkout with walkable history anchors on the merge base instead: in CI the\n` +
2430-
` checkout step needs \`fetch-depth: 0\`; locally, \`git fetch --unshallow origin\`.`;
2429+
` A checkout with walkable history anchors on the merge base instead: in CI, run the\n` +
2430+
` step \`Fetch this commit's history and the base branch\` before this build (ci.yml), or\n` +
2431+
` give the checkout \`fetch-depth: 0\` (lint.yml); locally, \`git fetch --unshallow origin\`.`;
24312432
if (!committed) {
24322433
return {
24332434
refusal:

‎ui/scripts/check-changeset-claims.mjs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,8 +1421,10 @@ if (isEntrypoint(import.meta.url)) {
14211421
? ' That base was named EXPLICITLY, so it is not guessed around. Name a commit that\n' +
14221422
' exists in this clone, or pass none.\n'
14231423
: base.shallow
1424-
? ' This clone is SHALLOW. In CI, give the checkout `fetch-depth: 0`; locally, run\n' +
1425-
' `git fetch --no-tags origin main` (or `git fetch --unshallow`).\n'
1424+
? ' This clone is SHALLOW. In CI, run the step\n' +
1425+
" `Fetch this commit's history and the base branch` before this gate (ci.yml), or give the\n" +
1426+
' checkout `fetch-depth: 0` (lint.yml); locally, run `git fetch --no-tags origin main`\n' +
1427+
' (or `git fetch --unshallow`).\n'
14261428
: ' Fetch the base branch (`git fetch --no-tags origin main`) and re-run.\n') +
14271429
' A failure, not a skip: report-only means this gate declines to fail on its FINDINGS,\n' +
14281430
' never that it passes without looking (objectstack#4928, objectui#4690).',

‎ui/scripts/check-new-cross-file-line-citations.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,8 @@ function main(argv, env = process.env) {
502502
' This run measured NOTHING. It is not a green, and it is not a red about any citation.',
503503
);
504504
console.error(
505-
' In CI the checkout needs `fetch-depth: 0`; locally, `git fetch origin main` first, or',
505+
" In CI, run the step `Fetch this commit's history and the base branch` before this gate\n" +
506+
' (ci.yml), or give the checkout `fetch-depth: 0` (lint.yml); locally, `git fetch origin main` first, or',
506507
);
507508
console.error(' name a base explicitly with `--base <ref>`.');
508509
return EXIT_CODES.couldNotRun;

0 commit comments

Comments
 (0)