From dda0a0b4c0b5acd40803423d00a6fe17f8c03e98 Mon Sep 17 00:00:00 2001 From: "anthony.wen" Date: Thu, 26 Mar 2026 11:03:20 -0400 Subject: [PATCH] Require verification after git commit execution - update the git guide to require post-commit verification before reporting success - document that commit verification must confirm git commit exited successfully, HEAD advanced, and the new commit appears in git log - document that failed or non-created commits must be reported clearly instead of being claimed as successful --- git-guide.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/git-guide.md b/git-guide.md index bc90a2e..77eb020 100644 --- a/git-guide.md +++ b/git-guide.md @@ -25,6 +25,13 @@ This file records repo-specific git workflow preferences for `/home/aw/code/cds` - Do not treat a request such as "give me the git commit" or "make the commit" as approval by itself. - Only execute `git commit` after the user explicitly approves the displayed commit command. - If the user changes the requested commit message or scope after commands are shown, rebuild the proposal and wait for fresh approval. +- After executing `git commit`, always verify that the commit actually succeeded before reporting success. +- Verification must include checking that: + - `git commit` exited successfully + - `HEAD` advanced to a new commit + - the new commit appears in `git log --oneline -n 1` +- Do not claim a commit was created unless that verification has been completed. +- If `git commit` did not actually create a commit, report that clearly and leave the changes as uncommitted. ## Push Requests - When the user asks to push, use `git push -u origin main` by default unless the user explicitly asks for a different remote or branch.