Pushed commits carried the author t <an email address> instead of the repo identity. The likely source was a test fixture’s GIT_AUTHOR_* or GIT_COMMITTER_* environment leaking into the child process that made the commit.
A commit helper that refuses test identities
The commit helper now refuses to commit as a test identity. It reads the identity from two places:
git config
the GIT_AUTHOR_* and GIT_COMMITTER_* environment variables
It treats either of these as a test identity:
the address t@t
the name t
The test suite opts out of the check through conftest. Tests cover the refusal.
When git var fails or times out
The identity check also refuses the commit when git var fails or times out, instead of proceeding. Tests cover this path too.
What we don’t know
We know the symptom, the suspected source and the guard. The cause stays “likely a fixture’s environment.”
The guard refuses the commit in two cases: a test identity found, and an identity check that can’t complete. A git var that fails or times out is refused instead of proceeding.
AI Skills
Use this lesson with the AI assistant you already use
Pushed commits carried the author `t` with a test email address instead of the repo identity, most likely because a test fixture's git environment variables leaked into the child process that made the commit. The fix was a guard in the commit helper that checks the identity before committing.
Paste the prompt, share only the context needed to answer it, and treat the result as a draft for your review. Do not include confidential information or let an AI assistant make changes without your approval.
Optional: for a visual report and saved memory, run /dxdev first.
Don’t have it? Get it at dxdev.com/skills/dxdev. The prompt works without it.
dxdev LESSON · paste into your AI coding agent
LESSON: Refuse To Act When A Safety Check Cannot Complete, Not Only When It Finds A Problem
SOURCE: dxdev.com/blog/test-identity-reached-real-commits
WHAT HAPPENED: Commits reached the remote under a test identity rather than the repo's real one. The suspected cause was a fixture's `GIT_AUTHOR_*` or `GIT_COMMITTER_*` variables carrying into a child process. The commit helper now reads the identity from both git config and those environment variables, and refuses to commit when it sees the address `t@t` or the name `t`. The test suite opts out through `conftest`, and tests cover the refusal. The guard also refuses when `git var` fails or times out, so an identity check that cannot finish blocks the commit instead of letting it through. The post is explicit that the leaking fixture, the number of affected commits and the path the variables took are all still unknown.
THE RULE: A guard in front of an irreversible action must fail closed, so a check that errors or times out blocks the action just as a detected problem does. Check the identity from every source that can feed it, including the environment, not only the config you expect.
CHECK MY CODE, then report PASS or FAIL with file:line for each:
1. Every code path that creates a commit goes through the guard, and the guard reads both git config and the `GIT_AUTHOR_*` and `GIT_COMMITTER_*` environment variables.
2. A test forces the identity lookup (such as `git var`) to fail or time out and asserts that the commit is refused rather than made.
3. The test suite's opt-out from the guard is limited to test configuration, and a test confirms that production code paths cannot bypass it.
THEN PRINT: a table (check, PASS/FAIL, evidence, fix) + a verdict (applies / partially / OUT_OF_SCOPE / no) + the single most important next action.