git_commit amends clean trees when the message matches, defeating skip_unchanged_targets on re-runs
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1
- Forks
- 5
- Avg merge
- 8d 1h
- Merged PRs (30d)
- 4
Description
Problem
git_commit.rb amends whenever HEAD's message matches the session commit message — even when the working tree is clean:
amend = head_status.success? && head_message.rstrip == commit_message.rstrip
...
args << '--amend' if amend
{ 'changed' => true, 'amended' => amend }
A clean-tree amend produces a new commit SHA with an identical tree, and reports changed: true. Consequences on any fleet re-run:
- every repo comes out
okinstead ofunchanged, soskip_unchanged_targetsnever skips the GitHub stages git_push_to_remoteforce-pushes ~70 branches whose trees didn't change- every open PR's head moves → full CI re-runs fleet-wide (~1,000 jobs) for no-op updates
This is why the 2026-08-12 reference-md re-run rewrote all 71 heads (validated identical trees), and it reproduces trivially: run any session twice back-to-back — the second run amends and force-pushes everything.
Fix
Check git status --porcelain FIRST; when the tree is clean, return { 'changed' => false } regardless of whether HEAD's message matches. The amend path should only apply when there IS something to commit on a branch whose HEAD already carries the session commit.
The existing spec "reports changed: false and leaves HEAD alone when there is nothing to commit" misses this because its no-op scenario uses a message that doesn't match HEAD — add a case where it does.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in git_commit.rb and inspect the existing no-op spec, whose current case uses a nonmatching message. Add coverage for a clean tree whose HEAD message matches, then run the relevant spec. Done means it reports changed: false, leaves HEAD unchanged, and does not amend.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, ruby
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100