[WRONG BRANCH] ci: restore historical tags for version-line guard - #367
[WRONG BRANCH] ci: restore historical tags for version-line guard#367luvs01 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
There was a problem hiding this comment.
💡 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".
| # 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 |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
fetch-tags: truedoes not expose historical tags outside a depth-limited clone.tests/release-version-line.test.tsmust see the complete tag-bearing history to reliably detect package.json regressions.Description
fetch-depth: 0alongsidefetch-tags: truein the Linux shards, macOS control, and the full-suite checkout in.github/workflows/ci.yml.tests/ci-workflows.test.tsto assert bothfetch-depth: 0andfetch-tags: trueare set for every job that runs tests..github/workflows/ci.yml,tests/ci-workflows.test.ts.Testing
git diff --checkand committed the change asci: fetch full history for version-line guardsuccessfully.bun run typecheckandbun run lint:gui:if-changedwhich completed (typecheck/lint passed).bun test tests/release-version-line.test.tsand the release-version tests passed locally.bun test tests/ci-workflows.test.tsbut the workflow-test harness failed in this environment due toBun.YAMLnot 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