Skip to content

fix(opencode): clarify git amend condition to require verifying commit landed#19937

Open
altendky wants to merge 10 commits intoanomalyco:devfrom
altendky:clarify-amend-guidance
Open

fix(opencode): clarify git amend condition to require verifying commit landed#19937
altendky wants to merge 10 commits intoanomalyco:devfrom
altendky:clarify-amend-guidance

Conversation

@altendky
Copy link
Copy Markdown
Contributor

@altendky altendky commented Mar 29, 2026

Issue for this PR

Closes #19936

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adjusts condition (1) in the git amend guidance to make explicit that the agent must verify the commit actually landed (via git log) before amending. This prevents incorrect amends when pre-commit hooks modify files but the commit itself failed.

The original wording "commit SUCCEEDED" was ambiguous — when hooks modify files, the agent sees modified files regardless of whether the commit landed. Different hook frameworks behave differently (pre-commit blocks on modification, lint-staged/Lefthook can succeed), so explicit verification is necessary.

How did you verify your code works?

Read the updated guidance and confirmed it now explicitly requires checking git log to verify HEAD is the new commit before amending.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

Hey! Your PR title clarify git amend condition to require verifying commit landed doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions github-actions bot added needs:title contributor needs:compliance This means the issue will auto-close after 2 hours. labels Mar 29, 2026
@altendky altendky changed the title clarify git amend condition to require verifying commit landed docs(opencode): clarify git amend condition to require verifying commit landed Mar 29, 2026
@github-actions github-actions bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Mar 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@altendky altendky changed the title docs(opencode): clarify git amend condition to require verifying commit landed fix(opencode): clarify git amend condition to require verifying commit landed Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git amend guidance can cause amends when original commit failed

1 participant