diff --git a/packages/spec/scripts/build-schemas-check-mode.git-topology.test.ts b/packages/spec/scripts/build-schemas-check-mode.git-topology.test.ts index f59db13d85e..16521fb533d 100644 --- a/packages/spec/scripts/build-schemas-check-mode.git-topology.test.ts +++ b/packages/spec/scripts/build-schemas-check-mode.git-topology.test.ts @@ -832,6 +832,8 @@ describe('build-schemas.ts — a shallow checkout re-anchors the deletion gate, expect(status).toBe(1); expect(output).toContain('No baseline to anchor the deletion checks on'); expect(output).toContain('authorable-surface.base.json'); + // Both CI remedies: ci.yml's history fetch step, and lint.yml's full checkout. + expect(output).toContain("Fetch this commit's history and the base branch"); expect(output).toContain('fetch-depth: 0'); expect(output).not.toContain('anchors on the origin/main TIP'); expect(output).not.toContain('deleted without proof'); diff --git a/packages/spec/scripts/build-schemas.ts b/packages/spec/scripts/build-schemas.ts index a50ed2cd857..816aa2ce57e 100644 --- a/packages/spec/scripts/build-schemas.ts +++ b/packages/spec/scripts/build-schemas.ts @@ -2426,8 +2426,9 @@ function resolveBaselineWithoutMergeBase( committed: AuthorableSurfaceBase | null, ): { rev: string; why: string } | { refusal: string } { const remedy = - ` A checkout with walkable history anchors on the merge base instead: in CI the\n` + - ` checkout step needs \`fetch-depth: 0\`; locally, \`git fetch --unshallow origin\`.`; + ` A checkout with walkable history anchors on the merge base instead: in CI, run the\n` + + ` step \`Fetch this commit's history and the base branch\` before this build (ci.yml), or\n` + + ` give the checkout \`fetch-depth: 0\` (lint.yml); locally, \`git fetch --unshallow origin\`.`; if (!committed) { return { refusal: diff --git a/ui/scripts/__tests__/check-changeset-presence.test.ts b/ui/scripts/__tests__/check-changeset-presence.test.ts index 974b2e84af6..8962ab6949e 100644 --- a/ui/scripts/__tests__/check-changeset-presence.test.ts +++ b/ui/scripts/__tests__/check-changeset-presence.test.ts @@ -914,6 +914,7 @@ describe('a missing input is a failure, never a silent pass', () => { expect(run.status).toBe(1); expect(run.output).toMatch(/SHALLOW/); expect(run.output).toMatch(/fetch-depth: 0/); + expect(run.output).toContain("Fetch this commit's history and the base branch"); }); it('FAILS when .changeset/ does not exist', () => { diff --git a/ui/scripts/check-changeset-claims.mjs b/ui/scripts/check-changeset-claims.mjs index 62593fe4de9..fadb75e5fe5 100644 --- a/ui/scripts/check-changeset-claims.mjs +++ b/ui/scripts/check-changeset-claims.mjs @@ -1421,8 +1421,10 @@ if (isEntrypoint(import.meta.url)) { ? ' That base was named EXPLICITLY, so it is not guessed around. Name a commit that\n' + ' exists in this clone, or pass none.\n' : base.shallow - ? ' This clone is SHALLOW. In CI, give the checkout `fetch-depth: 0`; locally, run\n' + - ' `git fetch --no-tags origin main` (or `git fetch --unshallow`).\n' + ? ' This clone is SHALLOW. In CI, run the step\n' + + " `Fetch this commit's history and the base branch` before this gate (ci.yml), or give the\n" + + ' checkout `fetch-depth: 0` (lint.yml); locally, run `git fetch --no-tags origin main`\n' + + ' (or `git fetch --unshallow`).\n' : ' Fetch the base branch (`git fetch --no-tags origin main`) and re-run.\n') + ' A failure, not a skip: report-only means this gate declines to fail on its FINDINGS,\n' + ' never that it passes without looking (objectstack#4928, objectui#4690).', diff --git a/ui/scripts/check-changeset-overwrite.mjs b/ui/scripts/check-changeset-overwrite.mjs index 40924f9a3ca..23c63f75c5b 100644 --- a/ui/scripts/check-changeset-overwrite.mjs +++ b/ui/scripts/check-changeset-overwrite.mjs @@ -295,8 +295,10 @@ if (isEntrypoint(import.meta.url)) { ' some other commit would answer a question nobody asked, and answer it\n' + ' confidently. Name a commit that exists in this clone, or pass none.\n' : base.shallow - ? ' This clone is SHALLOW. In CI, give the checkout `fetch-depth: 0`; locally,\n' + - ' run `git fetch --no-tags origin main` (or `git fetch --unshallow`).\n' + ? ' This clone is SHALLOW. In CI, run the step\n' + + " `Fetch this commit's history and the base branch` before this gate (ci.yml), or give the\n" + + ' checkout `fetch-depth: 0` (lint.yml); locally, run `git fetch --no-tags origin main`\n' + + ' (or `git fetch --unshallow`).\n' : ' Fetch the base branch (`git fetch --no-tags origin main`) and re-run.\n') + ' A failure, not a skip: report-only means this gate declines to fail on its\n' + ' FINDINGS, never that it passes without looking (objectstack#4928, objectui#4690).', diff --git a/ui/scripts/check-changeset-presence.mjs b/ui/scripts/check-changeset-presence.mjs index 166f66139f4..d19e820bb6c 100644 --- a/ui/scripts/check-changeset-presence.mjs +++ b/ui/scripts/check-changeset-presence.mjs @@ -1100,8 +1100,10 @@ if (invokedDirectly) { ' confidently. Name a commit that exists in this clone, or pass none and let the\n' + ' merge base with the target branch be found.\n' : base.shallow - ? ' This clone is SHALLOW. In CI, give the checkout `fetch-depth: 0`; locally,\n' + - ' run `git fetch --no-tags origin main` (or `git fetch --unshallow`).\n' + ? ' This clone is SHALLOW. In CI, run the step\n' + + " `Fetch this commit's history and the base branch` before this gate (ci.yml), or give the\n" + + ' checkout `fetch-depth: 0` (lint.yml); locally, run `git fetch --no-tags origin main`\n' + + ' (or `git fetch --unshallow`).\n' : ' Fetch the base branch (`git fetch --no-tags origin main`) and re-run.\n') + ' This is a failure, not a skip: a diff gate with no diff would report a\n' + ' declaration present while having looked at nothing (objectstack#4928).', diff --git a/ui/scripts/check-new-cross-file-line-citations.mjs b/ui/scripts/check-new-cross-file-line-citations.mjs index d46491656ce..b19198a0064 100644 --- a/ui/scripts/check-new-cross-file-line-citations.mjs +++ b/ui/scripts/check-new-cross-file-line-citations.mjs @@ -502,7 +502,8 @@ function main(argv, env = process.env) { ' This run measured NOTHING. It is not a green, and it is not a red about any citation.', ); console.error( - ' In CI the checkout needs `fetch-depth: 0`; locally, `git fetch origin main` first, or', + " In CI, run the step `Fetch this commit's history and the base branch` before this gate\n" + + ' (ci.yml), or give the checkout `fetch-depth: 0` (lint.yml); locally, `git fetch origin main` first, or', ); console.error(' name a base explicitly with `--base `.'); return EXIT_CODES.couldNotRun;