Summary
t/test-lib.sh establishes no git identity, and several tests commit without configuring one per repository. They therefore rely on a global user.name / user.email that the harness never sets. On a machine without one — a fresh CI runner, a container, a new checkout — the suite dies at the first commit.
Surfaced while wiring the t9 suite into CI (#201). The job there sets the identity itself, which unblocked that work but leaves the harness dependent on its environment.
Repro
FRESH=$(mktemp -d)
env -i PATH="$PATH" HOME="$FRESH" bash t/run-tests.sh t9001
fatal: unable to auto-detect email address (got 'root@vm.(none)')
not ok 2 - setup: create working clone
not ok 3 - subdir-push: extract src/lib
not ok 4 - subdir-push: modify subdir content
...
grep -c "user.email\|GIT_AUTHOR\|GIT_COMMITTER" t/test-lib.sh → 0.
Suggested fix
Point GIT_CONFIG_GLOBAL at a per-run temp file in the harness rather than exporting GIT_AUTHOR_* / GIT_COMMITTER_*:
GIT_CONFIG_GLOBAL="$TRASH_DIRECTORY/.gitconfig"
export GIT_CONFIG_GLOBAL
git config --file "$GIT_CONFIG_GLOBAL" user.name "Bit Test"
git config --file "$GIT_CONFIG_GLOBAL" user.email "test@example.com"
The distinction matters: GIT_AUTHOR_EMAIL and friends take precedence over repository config, so they would silently override the many tests that set git config user.email in their own repositories and could change what those tests observe. A global config file keeps the normal precedence (repo > global), so per-repository settings still win.
GIT_CONFIG_GLOBAL needs git 2.32+. If that floor is too high, HOME can be pointed at the trash directory instead, which works everywhere.
Once the harness is self-sufficient, the Configure git identity step in .github/workflows/t9-suite.yml can go.
Summary
t/test-lib.shestablishes no git identity, and several tests commit without configuring one per repository. They therefore rely on a globaluser.name/user.emailthat the harness never sets. On a machine without one — a fresh CI runner, a container, a new checkout — the suite dies at the first commit.Surfaced while wiring the t9 suite into CI (#201). The job there sets the identity itself, which unblocked that work but leaves the harness dependent on its environment.
Repro
grep -c "user.email\|GIT_AUTHOR\|GIT_COMMITTER" t/test-lib.sh→0.Suggested fix
Point
GIT_CONFIG_GLOBALat a per-run temp file in the harness rather than exportingGIT_AUTHOR_*/GIT_COMMITTER_*:The distinction matters:
GIT_AUTHOR_EMAILand friends take precedence over repository config, so they would silently override the many tests that setgit config user.emailin their own repositories and could change what those tests observe. A global config file keeps the normal precedence (repo > global), so per-repository settings still win.GIT_CONFIG_GLOBALneeds git 2.32+. If that floor is too high,HOMEcan be pointed at the trash directory instead, which works everywhere.Once the harness is self-sufficient, the
Configure git identitystep in.github/workflows/t9-suite.ymlcan go.