Inside an Actions job the gate reads bun's ::group:: file header, so a file red only beside others is run again alone #68

Open
tdobbertin-espo wants to merge 1 commit from tdobbertin-espo/forge:fix/shards-actions-headers into main
First-time contributor

With GITHUB_ACTIONS=true (Forgejo's runner sets it too), bun starts each file's tests with ::group::path: and not path:. failingFiles (scripts/shards.ts) read the marker as part of the path. So the retry-alone ran ::group::test/x.test.ts, found no file, and cleared nothing. In an Actions job, a file that was red only beside others always failed the gate. The two retry-alone tests in test/shards.test.ts failed there too, on every commit, main included. We saw it on a Forgejo runner, bun 1.3.14. bun prints the markers only when GITHUB_ACTIONS=true and the caller is not an AI agent, so a local run, or a run by an agent, does not show it.

The header pattern now takes an optional ::group:: prefix. A new unit test holds a report as a runner logged it.

A report without the markers is read as before. Nothing else changes: one regular expression and its comment.

Regression test

test/shards.test.ts, bun 1.3.13, in a scrubbed environment (no agent variables):

  • This branch, GITHUB_ACTIONS=true: 70 pass, 0 fail (69 tests and the new unit test).
  • This branch, without GITHUB_ACTIONS: 70 pass, 0 fail.
  • main 9900e4ba, GITHUB_ACTIONS=true: 67 pass, 2 fail: "a failing file is run once more alone > red only beside another file: the shard is green and the tail names it" and "a failing file is run once more alone > red alone too: it stays red". Both expect the tail line fails only beside others: test/fixtures/shard-victim.test.ts …. main never prints it, because the report heads that file ::group::test/fixtures/shard-victim.test.ts:.
  • This branch, GITHUB_ACTIONS=true, with test/check-list.test.ts and test/hollow.test.ts: 110 pass, 0 fail across 3 files.
  • bun scripts/gate.ts and tsc --noEmit: clean.

🤖 Generated with Claude Code

With `GITHUB_ACTIONS=true` (Forgejo's runner sets it too), bun starts each file's tests with `::group::path:` and not `path:`. `failingFiles` (`scripts/shards.ts`) read the marker as part of the path. So the retry-alone ran `::group::test/x.test.ts`, found no file, and cleared nothing. In an Actions job, a file that was red only beside others always failed the gate. The two retry-alone tests in `test/shards.test.ts` failed there too, on every commit, `main` included. We saw it on a Forgejo runner, bun 1.3.14. bun prints the markers only when `GITHUB_ACTIONS=true` and the caller is not an AI agent, so a local run, or a run by an agent, does not show it. The header pattern now takes an optional `::group::` prefix. A new unit test holds a report as a runner logged it. A report without the markers is read as before. Nothing else changes: one regular expression and its comment. ### Regression test `test/shards.test.ts`, bun 1.3.13, in a scrubbed environment (no agent variables): - This branch, `GITHUB_ACTIONS=true`: **70 pass, 0 fail** (69 tests and the new unit test). - This branch, without `GITHUB_ACTIONS`: **70 pass, 0 fail**. - `main` 9900e4ba, `GITHUB_ACTIONS=true`: **67 pass, 2 fail**: "a failing file is run once more alone > red only beside another file: the shard is green and the tail names it" and "a failing file is run once more alone > red alone too: it stays red". Both expect the tail line `fails only beside others: test/fixtures/shard-victim.test.ts …`. `main` never prints it, because the report heads that file `::group::test/fixtures/shard-victim.test.ts:`. - This branch, `GITHUB_ACTIONS=true`, with `test/check-list.test.ts` and `test/hollow.test.ts`: **110 pass, 0 fail** across 3 files. - `bun scripts/gate.ts` and `tsc --noEmit`: clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Inside an Actions job the gate reads bun's ::group:: file header, so a file red only beside others is run again alone
Some checks are pending
preview / preview (pull_request) Blocked by required conditions
f98330a57a
With GITHUB_ACTIONS=true (Forgejo's runner sets it too), bun starts
each file's tests with `::group::path:` and not `path:`. failingFiles
read the marker as part of the path. So the retry-alone ran
`::group::test/x.test.ts`, found no file and cleared nothing. In an
Actions job, a file that was red only beside others always failed the
gate, and the two retry-alone tests in test/shards.test.ts failed there
on every commit (seen on a Forgejo runner, bun 1.3.14). bun prints the
markers only when GITHUB_ACTIONS=true and the caller is not an AI
agent, so a local run did not show it.

The header pattern now takes an optional `::group::` prefix. A unit
test holds a report as a runner logged it. A report without the
markers is read as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some checks are pending
preview / preview (pull_request) Blocked by required conditions
This pull request has changes conflicting with the target branch.
  • test/shards.test.ts
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/shards-actions-headers:tdobbertin-espo-fix/shards-actions-headers
git switch tdobbertin-espo-fix/shards-actions-headers

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff tdobbertin-espo-fix/shards-actions-headers
git switch tdobbertin-espo-fix/shards-actions-headers
git rebase main
git switch main
git merge --ff-only tdobbertin-espo-fix/shards-actions-headers
git switch tdobbertin-espo-fix/shards-actions-headers
git rebase main
git switch main
git merge --no-ff tdobbertin-espo-fix/shards-actions-headers
git switch main
git merge --squash tdobbertin-espo-fix/shards-actions-headers
git switch main
git merge --ff-only tdobbertin-espo-fix/shards-actions-headers
git switch main
git merge tdobbertin-espo-fix/shards-actions-headers
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
trevato-apps/forge!68
No description provided.