Repository navigation
Conversation
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
…commit (#674) Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
Collaborator
Author
|
Superseded: split into smaller PRs because the Cora Review job exceeds its 10 minute limit on this size (three cancelled runs). The same review passes locally with no findings. |
ajianaz
added a commit
that referenced
this pull request
Oct 16, 2026
) ## What Part 1 of 3 for #674 (split from #675 so each PR fits the review time limit). - `engine/commit_gate.rs`: change-set fingerprint, marker store under the git dir, `check`, and a fail-closed parser for agent `git commit` command lines. - `cora hook verify` (exit 0 validated, 10 blocking, 11 not validated) and `cora hook claude-guard` (Claude Code PreToolUse). - `cora review --staged` and `cora.review_finalize` record a verdict marker for the exact staged diff. ## Why Agents should always run the judge review before committing; the verdict must be bound to the exact change set. Part of #674. Follow-ups: part 2 (pre-commit hook v2 and e2e tests), part 3 (skill, docs, changelog). ## Testing - Unit tests for fingerprinting, marker store, bypass parsing (`--no-verify` prefixes, `-c core.hooksPath`, chained commands, pathspecs). - fmt, clippy `-D warnings` and the full test suite pass locally. --------- Signed-off-by: ajianaz <ajianaz@users.noreply.github.com> Co-authored-by: ajianaz <ajianaz@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
cora.review_finalize, orcora review --staged) records a marker bound to that exact change set.cora hook verify(exit 0 validated, 10 blocking, 11 not validated) andcora hook claude-guard(Claude Code PreToolUse: denies unreviewed/blocking commits and--no-verify).cora review --staged --ci --severity major; tooling errors are reported as not a pass. Legacy v1 hooks are upgraded in place.Why
Agents should always run the judge review before committing, with the hook as fallback, without a second LLM pass. Closes #674.
Testing
tests/commit_gate.rswith real temp git repos (agent verdict via MCP, hook, guard, upgrade).