From 18e761a30b860c405670e1b7ce76aa7e9ac4d4e2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 20:19:33 +0000 Subject: [PATCH 1/2] 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 Claude-Session: https://claude.ai/code/session_01QsR2jQqimUnb4io8LpGcvH --- .../scripts/build-schemas-check-mode.git-topology.test.ts | 2 ++ packages/spec/scripts/build-schemas.ts | 5 +++-- ui/scripts/check-changeset-claims.mjs | 6 ++++-- ui/scripts/check-new-cross-file-line-citations.mjs | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) 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/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-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; From 243250a61fe5e7761608d7eddbff55feaac452ad Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 20:21:28 +0000 Subject: [PATCH 2/2] fix(devx): same history-fetch remedy in the two changeset diff gates check-changeset-overwrite and check-changeset-presence printed the same shallow-clone remedy as check-changeset-claims. They now carry its wording, and the presence gate's shallow pin also asserts the step name. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01QsR2jQqimUnb4io8LpGcvH --- ui/scripts/__tests__/check-changeset-presence.test.ts | 1 + ui/scripts/check-changeset-overwrite.mjs | 6 ++++-- ui/scripts/check-changeset-presence.mjs | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) 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-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).',