Skip to content

[WRONG BRANCH] ci: restore historical tags for version-line guard - #367

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-shallow-checkout-issue-in-ci
Draft

[WRONG BRANCH] ci: restore historical tags for version-line guard#367
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-shallow-checkout-issue-in-ci

Conversation

@luvs01

@luvs01 luvs01 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The release-version guard became vacuous under shallow checkouts because fetch-tags: true does not expose historical tags outside a depth-limited clone.
  • CI lanes that run tests/release-version-line.test.ts must see the complete tag-bearing history to reliably detect package.json regressions.

Description

  • Restore full history for relevant checkouts by adding fetch-depth: 0 alongside fetch-tags: true in the Linux shards, macOS control, and the full-suite checkout in .github/workflows/ci.yml.
  • Tighten the workflow hardening test in tests/ci-workflows.test.ts to assert both fetch-depth: 0 and fetch-tags: true are set for every job that runs tests.
  • Files changed: .github/workflows/ci.yml, tests/ci-workflows.test.ts.

Testing

  • Ran git diff --check and committed the change as ci: fetch full history for version-line guard successfully.
  • Ran bun run typecheck and bun run lint:gui:if-changed which completed (typecheck/lint passed).
  • Ran bun test tests/release-version-line.test.ts and the release-version tests passed locally.
  • Ran bun test tests/ci-workflows.test.ts but the workflow-test harness failed in this environment due to Bun.YAML not being available in the ambient Bun (workflow-parsing errors), so the CI-workflows suite could not be fully exercised here; the new assertions are in place to be validated by repository CI.

Codex Task

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eaf309b7-4714-4346-9cf7-1e343968b5b9


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore label Aug 28, 2026
@github-actions github-actions Bot changed the title ci: restore historical tags for version-line guard [WRONG BRANCH] ci: restore historical tags for version-line guard Aug 28, 2026
@github-actions

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request is being kept as a draft automatically. Once every issue above is resolved, it will be marked ready for review again.

@github-actions
github-actions Bot marked this pull request as draft August 28, 2026 07:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00e0f96465

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
# where the tag points at HEAD and the commit is present by definition.
# `fetch-tags` does not fetch historical tags outside a shallow checkout's
# history, so the version-line guard needs the complete tag-bearing history.
fetch-depth: 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid fetching full history just to obtain tags

On every CI-relevant push, this makes each of the four Linux shards and the macOS control download the repository's complete history, with four more full fetches in a manually dispatched Windows run. The pinned checkout action explicitly defines fetch-tags as “Whether to fetch tags, even if fetch-depth > 0” (actions/checkout input documentation); a shallow git fetch --tags also fetches historical tag refs and their target commits, which is all release-version-line.test.ts reads. Retain fetch-tags: true and remove both these fetch-depth: 0 settings and the new test assertion to avoid multiplying checkout time and bandwidth without strengthening the guard.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant