Skip to content

ci: run the t9 integration suite on every pull request - #201

Merged
mizchi merged 1 commit into
mainfrom
claude/modest-dirac-kceqee
Sep 21, 2026
Merged

mizchi merged 1 commit into
mainfrom
claude/modest-dirac-kceqee

Conversation

@mizchi

@mizchi mizchi commented Sep 21, 2026

Copy link
Copy Markdown
Member

Nothing under t/ had a CI job. ci.yml's select skips its jobs for a diff that only touches t/, and no job invoked the test-subdir task, so the suite was invisible.

That is not theoretical. t9014 and t90010 were red for months (#191); a t9007 assertion had never passed since it was added in #139 (#196); and #192, #199 and #200 each merged with CI validating nothing, because every heavy job skipped.

The new workflow is deliberately ungated — it runs on every pull request, the way js-build.yml does — so the suite cannot go dark again. Gating it on select would reintroduce the exact blind spot this closes.

What the job has to supply

A git identity. t/test-lib.sh sets none, and several tests commit without configuring one per repository, so they lean on a global the suite never establishes. On a stock runner they die at the first commit:

fatal: unable to auto-detect email address (got 'root@vm.(none)')

Setting it in the job keeps this change contained. Making the suite self-sufficient means touching test-lib.sh — worth doing, but separately; see below.

The release binary, which t/test-lib.sh looks for first. The test-subdir task now declares deps { build } rather than assuming something already built it.

The filter also widens

bash t/run-tests.sh t900 + t902 → bash t/run-tests.sh t9.

The filter is a substring match, so the old pair still skipped t9011–t9018. That is part of why these failures went unseen, and it would have left a third of the suite out of CI.

t9 matches exactly the 21 t9* files and nothing else — verified.

Verification

Run under env -i with an empty HOME and only the two config lines this workflow sets, to approximate a stock runner:

$ env -i PATH="$PATH" HOME="$FRESH" bash -c '
    git config --global user.name "Bit Test"
    git config --global user.email "test@example.com"
    bash t/run-tests.sh t9'

Total:  21   Passed: 21   Failed: 0

I checked protocol.file.allow always separately — the suite does not need it (t9021 and t9001 pass without), so the job does not set it, unlike cmd-native-test.

The first run of this workflow on this PR is itself the real test of the setup steps; I will report what it does.

Follow-ups this surfaces, deliberately left out

  • t/test-lib.sh supplies no git identity. Better fixed in the harness than in the workflow — a GIT_CONFIG_GLOBAL pointing at a per-run temp file would keep repo-level git config user.email taking precedence, unlike GIT_AUTHOR_* env vars.
  • t0025 and t9018 are not executable in the repo, unlike every other t/*.sh. run-tests.sh chmods them before running, so it is cosmetic — but it dirties the working tree on every run.
  • t0xxx is not covered here. I have not audited it, and the ask was t9 only. Whether it joins this job is a separate call.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VDVUJHu38YtVAr6sKZtRDB


Generated by Claude Code

Nothing under t/ had a CI job. ci.yml's `select` skips its jobs for a diff
that only touches t/, and no job invoked the test-subdir task, so the suite
was invisible: t9014 and t90010 were red for months, and a t9007 assertion
had never passed since it was added in #139. The last three PRs to touch
these files each merged with CI validating nothing.

The new workflow is deliberately ungated and runs on every pull request, the
way js-build.yml does, so the suite cannot go dark again.

Two things the job has to supply:

- A git identity. t/test-lib.sh sets none, and several tests commit without
  configuring one per repository, so they lean on a global the suite never
  establishes. On a stock runner they die with "unable to auto-detect email
  address". Setting it in the job keeps the change contained; making the
  suite self-sufficient would mean touching test-lib.sh, which is worth
  doing separately.
- The release binary, which t/test-lib.sh looks for first. The test-subdir
  task now declares its build dependency rather than assuming one was built.

The task's filter also widens from `t900` plus `t902` to plain `t9`. It is a
substring match, so the old pair still skipped t9011-t9018 — part of why
these failures went unseen.

Verified by running `bash t/run-tests.sh t9` under `env -i` with an empty
HOME and only the two config lines this workflow sets: 21 of 21 pass.
protocol.file.allow is not needed, so the job does not set it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDVUJHu38YtVAr6sKZtRDB
@mizchi
mizchi merged commit 7b008f4 into main Sep 21, 2026
23 checks passed
mizchi pushed a commit that referenced this pull request Sep 21, 2026
Both were committed as 100644 while the rest of t/*.sh are 100755.
t/run-tests.sh chmods a test before running it, so nothing was broken — but
the chmod lands on a tracked file, so every run of the suite left a mode
change in the working tree.

That is easy to sweep into an unrelated commit with `git add -A`; it
happened to #201 and had to be stripped back out.

The runner keeps its chmod as a safety net. Dropping it would leave a
newly added test silently unrun, and invoking tests through `sh` instead
would break the ones with a bash shebang.

Fixes #203

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDVUJHu38YtVAr6sKZtRDB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants