Repository navigation
Add RISK.md: the review risk rules for PRs - #89
Conversation
R0 (always reviewed): the sandbox, the approval and guard path, all of hooks/ and hints/, the agent rules, and the CI, review and release gates. R2 (never read): user docs except docs/permissions.mdx, bench/ and the projection report script. Lists the topics that need a decision and three weak checks with a proposed fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DXBtFjhb67KkF9iJ7ABaJx
|
@claude FIX: the validation gaps in this PR |
[Medium impact] The policy affects how future pull requests in this repository are reviewed. The PR appears safe to merge, with a non-blocking documentation gap in how reviewers apply the new policy. Findings
Fix with agent prompt### Issue 1
RISK.md:2-4
`RISK.md` lists `R0` and `R2` paths but never defines the review required for either level, the `R1` fallback, or how to classify a PR that touches several levels. Those rules appear only in the PR description. Add them here so future reviewers can apply the policy without finding this PR.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
|
- .github/risk.yml: RISK.md is hard. Before, the CI classifier rated an edit to it as docs (T0). - .github/scripts/test_risk_md.py: fails on a RISK.md glob that matches no tracked file, a file in both R0 and R2, and an R0 file that risk.yml rates as docs. The risk classifier tests job runs it. - RISK.md: defines R0, R1 and R2, and the drift weak check now names the part that the new test covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DXBtFjhb67KkF9iJ7ABaJx
|
Fixed both gaps in 09764ca:
The new Risk block names one more gap: the test uses the repo's matcher, not the review tool's. Both build the same regex today. A shared test is not possible here, because the review tool's matcher is not in this repo. Generated by Claude Code |
Intent
The repo has no rules that tell which PRs need a human review. This PR adds
RISK.md: R0 = Gabe reviews all of it, R2 = no human read, anything else = R1. A CI test now checks its globs, and the CI risk tier rates an edit toRISK.mdas T2-hard.Not in scope: no change to the plugin (
hooks/,runtime/,hints/), and no other change to the CI tier rules.%%{init: {'theme': 'neutral'}}%% flowchart TD A[A PR changes files] --> B{"A file matches an R0 glob?"} B -->|yes| C[R0: Gabe reviews all of it] B -->|no| D{"Every file matches an R2 glob?"} D -->|yes| E[R2: merges without a human read] D -->|no| F[R1: normal review] G[A PR changes RISK.md] --> H{"Globs match real files, no R0 and R2 overlap, no R0 file rated docs?"} H -->|no| I[CI test fails]Risk
R0 (review all of it): this PR sets which future PRs merge with no human read.
ℹ️ 3 items need you: 2 critical, 1 validation gap. Open to see them.
Needs you
RISK.mdadded to thehardlist of the CI rulesValidation gaps
risk_tier.matches, not the matcher that sets the levelDrift
Asked: the
risk-initrules inRISK.md; then the PR comment "FIX: the validation gaps in this PR".Warning
Scope grew after the first commit: CI rule and test changes, on your PR comment. No user of the plugin sees it.
Decisions
hooks/**docs/permissions.mdx,SECURITY.mdnot R2.mdR0 fileReach
riskworkflow labels it T2-hard, not T0.github/scriptsrisk (classifier tests)job runs itRollout and rollback
riskworkflow readsrisk.ymlfrom the base, so the T2-hard rule acts after merge.Evidence
test_each_glob_matches_a_file, 15 R0 casestest_no_file_is_r0_and_r2test_hard_paths[RISK.md]; without the entry it was T0.github/scripts, docs, code and format checks'T0' == 'T2-hard'failsℹ️ Each broken copy of the rules fails with a clear message.
Reading map
ℹ️ 4 files, 2 to read first. Open to choose what to read.
%%{init: {'theme': 'neutral'}}%% flowchart TD f1["1 · RISK.md<br/>config"] -. tested by .-> f2["2 · test_risk_md.py<br/>tests changed"] f3["3 · risk.yml<br/>config, CI"] -. tested by .-> f2 f3 -. tested by .-> f4["4 · test_risk_tier.py<br/>tests changed"]🤖 Generated with Claude Code
https://claude.ai/code/session_01DXBtFjhb67KkF9iJ7ABaJx