mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
cf785c0ac5
CI and dev-prepush walk a branch's commits with HEAD at the branch tip and run the completion guard per commit with --diff-base <commit>^. The guard then compared the parent's contract text against HEAD rather than against the commit it was evaluating, so every commit was judged by the whole branch. The pre-commit hook compares HEAD with the staged index, which is the commit's own parent-to-commit change, so the two disagreed. PR 2494 hit this: its second commit reverted a Current State paragraph in performance-and-scalability.md that its first commit wrote. Parent-vs-HEAD saw no change, and CI blocked a commit the hook had correctly passed. The same comparison lets a bare runtime commit through when a later commit in the branch carries the contract update. When --commit is given, the guard now resolves the diff base and reads the new contract text from that commit. CI already passes --commit, and dev-prepush now does too. Without --commit the guard still compares with HEAD, which is right when the evaluated commit is checked out.