You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(rules,allowlist): support go.mod/go.work review and Cargo test path conventions #1970
go.mod and go.work are skipped as unsupported_ext and have no built-in rule.
File selection checks only the file extension (.mod, .work), so go.mod and go.work changes are dropped before review (for example, ocr delegate preview --commit b842659 in this repository selects 0 of 2 files), and ocr rules check go.mod falls back to default.md even though go.md asks the reviewer to check the module's go directive. Adding .mod to supported_file_types.json is not an option because .mod is also used by binary Fortran module files and Linux kernel build artifacts.
Standard Cargo test and benchmark paths are not excluded by default. default_exclude_patterns.json only lists "**/*_test.rs" for Rust, so standard Cargo integration tests (tests/**/*.rs), module test files (tests.rs, *_tests.rs), and benchmarks (benches/**/*.rs) are reviewed as production code against rust.md. Across three multi-file Rust commits we tested, test files accounted for 56% (421/750), 30% (77/257), and 24% (135/557) of reviewed insertions.
Proposed Solution
Allow exact filenames (go.mod, go.work) in the file allowlist while keeping go.sum, go.work.sum, and arbitrary *.mod / *.work files excluded.
Add a built-in go_mod.md rule for **/go.mod and **/go.work in system_rules.json (and the localized review-rules.md tables).
Add "**/tests/**/*.rs", "**/*_tests.rs", "**/tests.rs", and "**/benches/**/*.rs" to default_exclude_patterns.json, and align rust.md with the precision-first guidance used in go.md and swift.md.
A PR implementing both changes is opened right after this issue and can be split into two separate PRs if you prefer.
Alternatives Considered
Per-repo .opencodereview/rule.jsoninclude/exclude rules work as a local workaround, but go.mod and Cargo's tests/ and benches/ layouts are standard toolchain conventions.
Affected Area
Review Rules
Review Agent / LLM interaction
Additional Context
AI disclosure: used Google Antigravity (Gemini) and Claude Code while inspecting the codebase and writing this change.
Activity
wu21-web commentedon Nov 18, 2026
Quote: #1971 (comment)