Skip to content

Let one file hold both features, since one file already does - #33

Merged
HackingGate merged 2 commits into
mainfrom
fix/one-file-two-readers
Aug 14, 2026
Merged

Let one file hold both features, since one file already does#33
HackingGate merged 2 commits into
mainfrom
fix/one-file-two-readers

Conversation

@HackingGate

@HackingGate HackingGate commented Aug 14, 2026

Copy link
Copy Markdown
Owner

policy/hooks.toml carries two things: the waivers hooks --identity reads, and the [[probe]] fixtures uphold probe drives. Both readers use deny_unknown_fields -- which is what catches waivee and a misplaced reason, and which cannot tell a typo from a sibling feature's table unless the sibling is named.

probe's reader named waive. The waiver reader named nothing, so the first [[probe]] written into this repository's own file made hooks --identity exit 2 on it. The file was well formed and the command could not look at it.

How it was found, which is the part worth reading

Re-running the fleet comparison after four consuming repositories adopted the guard sets. The report was grepped for findings, the grep counted zero, and zero findings over an error output is exactly the reading this tool exists to refuse. The command was doing its job -- exit 2, with the parse error on stderr -- and only the count was being read.

The real answer, once the command could read its own file

Three divergences across six repositories, all forked third-party hooks scoped differently on purpose (ruff-check, ruff-format, shellcheck). The five pinned apart findings and every absent one are gone, which is what the four adoption pull requests were for.

Tests

Both directions -- a waiver file carrying probes, a probe file carrying waivers -- and the case that makes deny_unknown_fields worth having: a waiver whose reason was typed as resaon is still refused, because a waiver with no reason is a check switched off with nobody's name on it.

425 tests pass, 3 of them new.

And the three that remain are recorded

ruff-check, ruff-format and shellcheck are declared differently across this fleet on purpose, and the reasons are in neither tree -- so policy/hooks.toml now holds them. This repository runs ruff with --fix at commit time where a workspace whose Python is a handful of scripts runs it check-only over a files scope; autofixing somebody else's tree on their commit is not a default to share. Same shape for shellcheck's severity and stages.

The fleet report is clean, and clean here means every difference has a sentence somebody wrote rather than every difference having disappeared.

`policy/hooks.toml` carries the waivers `hooks --identity` reads and the
`[[probe]]` fixtures `uphold probe` drives. Both readers use
`deny_unknown_fields`, which is what catches `waivee` and a misplaced `reason`
-- and which cannot tell a typo from a sibling feature's table unless the
sibling is named.

`probe`'s reader named `waive`. The waiver reader named nothing, so the first
`[[probe]]` written into this repository's own file made `hooks --identity` exit
2 on it. The file was well formed and the command could not look at it.

Found while re-running the fleet comparison after four consuming repositories
adopted the guard sets, and the way it was found is the point: the report was
grepped for findings, the grep counted zero, and zero findings over an error is
exactly the reading this tool exists to refuse. The command said so -- exit 2,
with the parse error -- and only the count was being read.

Both directions have a test now, and so does the case that made
`deny_unknown_fields` worth having: a waiver whose `reason` was typed as
`resaon` is still refused, because a waiver with no reason is a check switched
off with nobody's name on it.

The real answer, once the command could read its own file: three divergences
across six repositories, all of them `forked` third-party hooks scoped
differently on purpose. The five `pinned apart` findings and every `absent` one
are gone, which is what the four adoption pull requests were for.
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@HackingGate, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 73 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3ef4b701-6ed0-4a7e-95cd-a87a722e89f7

📥 Commits

Reviewing files that changed from the base of the PR and between 04de03f and 0abab1b.

📒 Files selected for processing (5)
  • docs/REFERENCE.md
  • policy/hooks.toml
  • src/hooks.rs
  • tests/hooks_identity_cli.rs
  • tests/probe_cli.rs

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.

@codecov-commenter

codecov-commenter commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.15%. Comparing base (04de03f) to head (0abab1b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #33   +/-   ##
=======================================
  Coverage   89.15%   89.15%           
=======================================
  Files          29       29           
  Lines        9217     9217           
=======================================
  Hits         8217     8217           
  Misses       1000     1000           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…em noisy

`hooks --identity` reports a fork whatever the reason, which is right: the
reason is in neither tree, so only a waiver file can hold it. Three remain
across this fleet once the guard sets are adopted, and all three are decisions.

`ruff-check` and `ruff-format`: this repository runs ruff with `--fix` at commit
time, where a workspace whose Python is a handful of scripts runs it check-only
over a files scope. Autofixing somebody else's tree on their commit is not a
default to share, and where a repository keeps its Python is a fact about that
repository.

`shellcheck`: a workspace whose shell scripts stand up lab images runs it at
four stages and at `--severity=style`; this repository has a handful of scripts
and runs the default at commit time. Worth revisiting if these scripts grow,
which is why the difference is written down rather than hidden.

The fleet report is clean now, and clean means every difference has a sentence
somebody wrote rather than every difference having disappeared.
@HackingGate
HackingGate merged commit a344a61 into main Aug 14, 2026
12 checks passed
@HackingGate
HackingGate deleted the fix/one-file-two-readers branch August 14, 2026 17:49
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.

2 participants