Skip to content

Hold back generated output, and name files in commit subjects - #4

Merged
dcadolph merged 3 commits into
mainfrom
feat/generated-and-subjects
Sep 28, 2026
Merged

dcadolph merged 3 commits into
mainfrom
feat/generated-and-subjects

Conversation

@dcadolph

Copy link
Copy Markdown
Owner

Two changes that were sitting uncommitted. Split into one commit each, both
building and passing on their own.

Name the files a commit touches in its subject

Subjects were built from the directory, so a commit adding a parser and its test
read Add api. That is a label, not a claim, and a reviewer cannot check it
against anything. They now come from the file list:

2. Add api/server.go and its test
     api/server.go
     api/server_test.go

3. Add store/db.go
     store/db.go

4. Update docs/guide.md
     docs/guide.md

Every subject is derived from the files and nothing else, which is what makes it
checkable against the commit it names.

Hold back generated output instead of committing it

A dirty tree carries build output and caches as often as it carries work, and
preen committed them because they were changes like any other. A __pycache__
directory landing in a commit is noise a reviewer reads past and a file the
project never wanted tracked.

Generated paths are now held back and named at the approval prompt, with the
pattern that caught each one:

Held back as generated output (1), left uncommitted:
     api/__pycache__/server.cpython-313.pyc  [__pycache__/: Python bytecode cache]
   Add them to .gitignore, or rerun with --allow-generated to commit them.

The plan says what it declined to commit rather than quietly staging it. A project
that keeps such a path deliberately says so in config under [generated], and
--allow-generated turns the check off for a single run.

Notes

go-cmp is a new test dependency, so go.mod and go.sum ride with the subject
commit, which is what needs them.

One imperfection worth naming: the README paragraph describing the new subjects
belongs with the subject commit and is in the generated-output commit instead. The
README hunks landed together when the two were separated, and splitting them
further was not worth rewriting the history for. Both land in the same merge.

Full suite passes, including the run package hook tests that were failing before
the test isolation fix on main.

Subjects were built from the directory, so a commit adding a parser and
its test read "Add api" and told a reviewer nothing they could check. They
now come from the file list: "Add cmd/parser.go and its test". Every
subject is derived from the files and nothing else, which makes it a claim
the commit can be held to rather than a label.
A dirty tree carries build output and caches as often as it carries work,
and preen committed them because they were changes like any other. A
__pycache__ directory landing in a commit is noise a reviewer has to read
past and a file the project never wanted tracked.

Generated paths are now held back and named at the approval prompt, with
the pattern that caught each one, so the plan says what it declined to
commit rather than quietly staging it. A project that keeps such a path on
purpose says so in config, and --allow-generated turns the check off for
one run.
The fixture wrote a shell script and ran it, which races the forks of
every other parallel subtest: a child can still hold the write descriptor
when the exec lands, and Linux answers ETXTBSY. One subtest in twenty
failed with "text file busy" on CI and never on a developer's machine.

The script is now handed to sh as an argument. sh is not a file these
tests write, so there is no window to lose.
@dcadolph
dcadolph merged commit 522826b into main Sep 28, 2026
1 check passed
@dcadolph
dcadolph deleted the feat/generated-and-subjects branch September 28, 2026 01:57
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.

1 participant