test(pr): stop describing the real-git test in terms of a deleted job #545

Merged
hexajon merged 1 commit from fix-stale-matrix-comments into main 2026-09-17 06:00:18 +00:00
Owner

Summary

TestParseMergeTreeConflicts_RealGit survived the removal of git-matrix in #539, because it is a good test on its own: it runs the real git merge-tree --write-tree and parses its true output, rather than pinning the parser against fixed strings.

Its comments did not survive as well. Both of them described the test's purpose in terms of the job that no longer exists:

  • The helper claimed "the drift matrix job (.forgejo/workflows/drift.yml) also echoes this per leg".
  • The test claimed "in the drift git-version matrix that binary is the floor, the distro git, and the latest release in turn ... and the matrix leg names the git version".

Rewritten to describe what the test actually does: it runs against whichever git is on PATH, and names that version when it skips or fails. The gate runs it against the git in the CI image, which is the declared floor.

Note on how this was found

My first sweep for dangling references after #539 reported clean, and it was wrong. The phrase wraps across a line break in the source (git-version ends one line, matrix begins the next), so a line-based grep could not match it. The second sweep flattened newlines before matching and found both occurrences immediately.

Worth remembering when checking that a removal is complete: a grep for a multi-word phrase will miss it wherever a formatter has wrapped it.

Comment-only change to one test file. go test ./internal/cmd/pr/ -run TestParseMergeTreeConflicts passes.

Refs #539.

## Summary `TestParseMergeTreeConflicts_RealGit` survived the removal of `git-matrix` in #539, because it is a good test on its own: it runs the real `git merge-tree --write-tree` and parses its true output, rather than pinning the parser against fixed strings. Its comments did not survive as well. Both of them described the test's purpose in terms of the job that no longer exists: - The helper claimed "the drift matrix job (.forgejo/workflows/drift.yml) also echoes this per leg". - The test claimed "in the drift git-version matrix that binary is the floor, the distro git, and the latest release in turn ... and the matrix leg names the git version". Rewritten to describe what the test actually does: it runs against whichever git is on PATH, and names that version when it skips or fails. The gate runs it against the git in the CI image, which is the declared floor. ## Note on how this was found My first sweep for dangling references after #539 reported clean, and it was wrong. The phrase wraps across a line break in the source (`git-version` ends one line, `matrix` begins the next), so a line-based grep could not match it. The second sweep flattened newlines before matching and found both occurrences immediately. Worth remembering when checking that a removal is complete: a grep for a multi-word phrase will miss it wherever a formatter has wrapped it. Comment-only change to one test file. `go test ./internal/cmd/pr/ -run TestParseMergeTreeConflicts` passes. Refs #539.
test(pr): stop describing the real-git test in terms of a deleted job
All checks were successful
drift / govulncheck (pull_request) Has been skipped
drift / surface-diff (pull_request) Successful in 1m9s
drift / forgejo-smoke (pull_request) Has been skipped
ci / mcp-conformance (pull_request) Successful in 2m1s
ci / mcp-conformance (push) Successful in 8s
drift / govulncheck (push) Has been skipped
drift / surface-diff (push) Successful in 6s
drift / forgejo-smoke (push) Has been skipped
ci / gate (push) Successful in 7m51s
ci / gate (pull_request) Successful in 16m49s
bec0d32e73
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea!545
No description provided.