#580 Make low-risk deep-review-pro agents conditional#591
Conversation
📝 WalkthroughWalkthroughThe PR implements conditional dispatch for three low-risk /deep-review-pro agents by replacing unconditional ChangesConditional Dispatch Implementation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.claude/skills/deep-review-pro/SKILL.md (1)
228-228: ⚡ Quick winClarify untracked file content-scan policy for security trigger.
Line 228 states "any untracked file that is not clearly docs/generated/test-only, or whose content cannot be safely scanned before skipping" as a risk trigger. This suggests content inspection may be required for untracked files, but line 188 states "When a path is needed only for dispatch classification, inspect the path string; do not read denied paths."
If an untracked file matches a deny pattern (e.g.,
.env,*secret*), should the trigger:
- Fire immediately based on path alone (conservative, safe)
- Skip content scan and classify by path extension only
- Be treated as an error case
The current wording doesn't make the precedence clear. Consider explicitly stating: "any untracked file whose path matches a deny pattern or whose path is not clearly docs/generated/test-only (by extension or directory)" to avoid ambiguity about content scanning.
📝 Proposed clarification
-- any untracked file that is not clearly docs/generated/test-only, or whose content cannot be safely scanned before skipping +- any untracked file whose path matches a deny pattern, or whose path is not clearly docs/generated/test-only by extension or directory (e.g., not under `docs/`, not ending in `.md`, `.snap`, `.diff`, etc.)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.claude/skills/deep-review-pro/SKILL.md at line 228, The wording around untracked-file handling is ambiguous between the rule "any untracked file that is not clearly docs/generated/test-only, or whose content cannot be safely scanned before skipping" and the rule "When a path is needed only for dispatch classification, inspect the path string; do not read denied paths"; update the SKILL.md wording to explicitly state precedence and behavior by replacing/augmenting the sentence that begins "any untracked file that is not clearly docs/generated/test-only..." with a clear rule such as: if an untracked file's path matches a deny pattern (e.g., .env, *secret*) it should trigger the security rule based on path alone (no content read), otherwise only files clearly in docs/generated/test-only by extension or directory are excluded from scanning; reference the original phrases "any untracked file that is not clearly docs/generated/test-only" and "When a path is needed only for dispatch classification, inspect the path string; do not read denied paths" so reviewers can locate and replace the ambiguous text.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/test_benchmark_deep_review_pro.py`:
- Around line 66-76: The parser read_deep_review_pro_dispatch_cells currently
silently overwrites entries when parsing SKILL.md; update it to validate each
parsed row is well-formed (ensure cells has expected length and the first cell
matches pattern `deep-review-*`) and to fail fast by raising an exception if a
malformed row is encountered or if a duplicate key would be inserted into
dispatch_cells; reference the function name read_deep_review_pro_dispatch_cells,
the dispatch_cells dict, and the parsing of cells so the fix checks cells length
and format and uses an explicit error (instead of last-write-wins) when a
duplicate key or malformed row is detected.
---
Nitpick comments:
In @.claude/skills/deep-review-pro/SKILL.md:
- Line 228: The wording around untracked-file handling is ambiguous between the
rule "any untracked file that is not clearly docs/generated/test-only, or whose
content cannot be safely scanned before skipping" and the rule "When a path is
needed only for dispatch classification, inspect the path string; do not read
denied paths"; update the SKILL.md wording to explicitly state precedence and
behavior by replacing/augmenting the sentence that begins "any untracked file
that is not clearly docs/generated/test-only..." with a clear rule such as: if
an untracked file's path matches a deny pattern (e.g., .env, *secret*) it should
trigger the security rule based on path alone (no content read), otherwise only
files clearly in docs/generated/test-only by extension or directory are excluded
from scanning; reference the original phrases "any untracked file that is not
clearly docs/generated/test-only" and "When a path is needed only for dispatch
classification, inspect the path string; do not read denied paths" so reviewers
can locate and replace the ambiguous text.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8a500350-1915-4258-8610-9ebf892b5051
📒 Files selected for processing (10)
.claude/agents/deep-review-docs.md.claude/agents/deep-review-project-checklist.md.claude/agents/deep-review-security.md.claude/skills/deep-review-pro/SKILL.mddocs/AI_ASSISTANTS.mddocs/deep-review-pro-benchmark/README.mddocs/deep-review-pro-benchmark/fixtures.jsondocs/deep-review-pro-benchmark/fixtures/script-code-only.diffdocs/deep-review-pro-benchmark/reports/580-conditional-dispatch.mdscripts/test_benchmark_deep_review_pro.py
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/deep-review-pro-benchmark/reports/580-conditional-dispatch.md (1)
51-51: 💤 Low valueConsider varying sentence structure for readability.
The static analysis tool correctly identified three consecutive sentences beginning with "It". While this is a minor style issue, varying the sentence structure slightly would improve readability.
✍️ Optional rewording suggestion
-This follows the benchmark README's Cost Proxy Policy. It is not billing data. It excludes harness overhead, cache effects, conversation history, model-specific tokenization, and agent output tokens. It is useful only as a deterministic before/after proxy for the prompt text this change stops sending. +This follows the benchmark README's Cost Proxy Policy. The estimate is not billing data and excludes harness overhead, cache effects, conversation history, model-specific tokenization, and agent output tokens. It serves only as a deterministic before/after proxy for the prompt text this change stops sending.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/deep-review-pro-benchmark/reports/580-conditional-dispatch.md` at line 51, The three consecutive sentences in the doc fragment ("It is not billing data. It excludes harness overhead, cache effects, conversation history, model-specific tokenization, and agent output tokens. It is useful only as a deterministic before/after proxy for the prompt text this change stops sending.") should be rewritten to vary sentence openings for readability; locate that sentence block and combine or rephrase so the first "It" becomes a clause (e.g., "This is not billing data and excludes..."), the second lists exclusions concisely, and the final sentence clarifies purpose (e.g., "serves only as a deterministic before/after proxy...") to avoid three sentences starting with "It".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docs/deep-review-pro-benchmark/reports/580-conditional-dispatch.md`:
- Line 51: The three consecutive sentences in the doc fragment ("It is not
billing data. It excludes harness overhead, cache effects, conversation history,
model-specific tokenization, and agent output tokens. It is useful only as a
deterministic before/after proxy for the prompt text this change stops
sending.") should be rewritten to vary sentence openings for readability; locate
that sentence block and combine or rephrase so the first "It" becomes a clause
(e.g., "This is not billing data and excludes..."), the second lists exclusions
concisely, and the final sentence clarifies purpose (e.g., "serves only as a
deterministic before/after proxy...") to avoid three sentences starting with
"It".
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7304658f-5e34-4bcc-8271-58067fb49a0f
📒 Files selected for processing (4)
.claude/skills/deep-review-pro/SKILL.mddocs/deep-review-pro-benchmark/README.mddocs/deep-review-pro-benchmark/reports/580-conditional-dispatch.mdscripts/test_benchmark_deep_review_pro.py
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/deep-review-pro-benchmark/README.md
- .claude/skills/deep-review-pro/SKILL.md
Summary
deep-review-security,deep-review-project-checklist, anddeep-review-docsdispatch through deterministic trigger rules instead ofalwaysCloses #580
Contributes to #587
Test plan
python3 -m coverage run -m unittest scripts.test_benchmark_deep_review_pro && python3 -m coverage report -m scripts/benchmark-deep-review-pro.py scripts/test_benchmark_deep_review_pro.pygit diff --cached --checkpython3 -m json.tool docs/deep-review-pro-benchmark/fixtures.json >/tmp/orwellstat-fixtures-json-check.txtpython3 scripts/benchmark-deep-review-pro.py --before "$tmp/before" --after "$tmp/after" --out-dir "$tmp/report"with empty captured-run directories, verifying fixture dispatch counts and unavailable token fields are reported explicitlydocs/deep-review-pro-benchmark/reports/580-conditional-dispatch.mdfrom actual agent prompts, roster domains, and fixture diffs using a documentedceil(characters / 4)heuristicdocs/deep-review-pro-benchmark/README.md/deep-review-probenchmark captures if exact Claude<usage>token postscripts are required beyond the Codex-recorded unavailable-fields reportSummary by CodeRabbit
Release Notes
Documentation
Tests