Skip to content

fix(hooks): detect mutations from observed state - #600

Merged
solomonneas merged 1 commit into
mainfrom
codex/issue-546-observed-state-mutation
Jul 28, 2026
Merged

fix(hooks): detect mutations from observed state#600
solomonneas merged 1 commit into
mainfrom
codex/issue-546-observed-state-mutation

Conversation

@solomonneas

Copy link
Copy Markdown
Collaborator

Summary

  • record a scoped repository or directory fingerprint before every Bash command
  • keep gh, jq, and rg read-only sessions clean when the fingerprint is unchanged
  • require verification when either the baseline or post-command state check is unavailable

Root cause

The managed Claude hook treated a missing baseline or failed post-command fingerprint as no write. That allowed state-check failures to bypass verification, while older command-name classification could charge unlisted read-only tools.

Verification

  • python3 -m pytest -q tests/test_claude_hooks_runtime.py
  • ./scripts/verify (4648 passed, 3 skipped, coverage 82.93%)
  • independent review completed with no remaining findings

Closes #546

Co-Authored-By: Codex <codex@openai.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e4aec2e-ecd9-42c0-9ca0-02a8db7c4cd6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-546-observed-state-mutation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@solomonneas solomonneas self-assigned this Jul 28, 2026
@solomonneas
solomonneas merged commit 2932b37 into main Jul 28, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

work-loop hook: unlisted read-only commands (gh, jq, rg) mark a repo as needing verification, with no filesystem check

1 participant