document step commits unrelated working-tree churn under a message that describes none of it
Summary
The document step commits every dirty file in the working tree, not just the files it wrote, and does it under a message that describes something else entirely. In my case that swept a package-manager lockfile and three dependency version bumps into a commit whose message was about documentation and lint tooling.
Version: no-mistakes version 1.51.1. Linux, Unity project, agent: [claude, codex].
What I observed
A run on a branch produced a document step commit whose message was:
docs already in sync; no lint tooling configured in repoIts diff contained no documentation change and no lint configuration. It contained:
- the project's dependency lockfile, regenerated
- three dependency version bumps inside that lockfile (two packages, three entries)
Nothing in the run's intent concerned dependencies, and no step reported having changed one. The commit message is accurate about what the step decided to do - nothing - and describes none of what it actually committed.
Why I think it happens
Inference, not observation: the preceding test step launches the project's own toolchain, and that toolchain rewrites the lockfile as a side effect of opening the project. So the tree is dirty through no fault of the author when document runs. If document stages by directory or with an all-tracked-changes stage rather than by an explicit list of files it wrote, it picks the churn up.
I did not read the implementation, so treat the mechanism as a guess and the two facts above as the report.
Why it matters
Both halves are bad independently.
The commit is a supply-chain-shaped surprise: a pipeline step, running under the maintainer's credentials, silently commits dependency version changes that no human proposed and no step announced. Anyone reviewing that branch by commit message would not look inside a commit that says documentation is already in sync. In my case the bumps were harmless and I reverted them in a follow-up commit, but I only found them because I diff every commit a gate produces before merging.
The message is worse than absent. A commit whose message contradicts its diff defeats git log as a review surface for everyone downstream, permanently, including in the squashed history after merge.
Suggested fix
Two things, either of which alone would have caught this:
documentshould stage only paths it wrote, by explicit path list, and never a bare all-changes stage. If the step decides there is nothing to document, the correct outcome is no commit at all rather than an empty-intent commit that happens to carry whatever else was dirty.- If a step commits at all, its message should be derived from the staged diff. A step that concluded "nothing to do" producing a non-empty commit is a contradiction the pipeline could detect and refuse.
A cheaper mitigation that would help even without either: have each step record the tree state it inherited and warn when it is about to commit paths that were already dirty on entry. That surfaces the interaction between test and document instead of silently resolving it.
Source: kunchenguid/no-mistakes