docs(#1801): add cross-file consistency review guidance - #1804
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
docs(#1801): add cross-file consistency review guidance#1804fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Add a "Cross-file Consistency" section to AGENTS.md between the "Review Checklist for New Policy Rules" and "PR Conventions" sections. The new section instructs reviewers to verify that repeated patterns (guard clauses, helper calls, error-handling conventions) are applied consistently across all policy packages in a PR. It also recommends extracting shared helpers into policy/lib/ when logic is duplicated in 3+ packages. This addresses a gap identified in PR #1781, where a missing is_string() guard in sbom.rego was caught by a human reviewer 25 days after the review agent approved. The agent analyzed files independently rather than cross-referencing patterns, missing the inconsistency. Note: make fmt could not run in the sandbox (dependency download timeout). This is a documentation-only change to AGENTS.md — no Rego files were modified, so rego formatting is not applicable. Closes #1801
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Add a "Cross-file Consistency" section to AGENTS.md that instructs reviewers to verify repeated patterns are applied consistently across all policy packages in a PR.
Why:
In PR #1781, the review agent approved a change where
is_string()guard clauses were added to 4 packages but one (sbom.rego) was missing the guard. A human reviewer caught the inconsistency 25 days later. The review agent analyzed each file independently rather than cross-referencing patterns across files. Adding explicit guidance about cross-file consistency checking helps both the review agent and code agent catch this class of issue.The new section covers:
policy/lib/when logic is duplicated in 3+ packagesTickets:
#1801
Closes #1801
Post-script verification
agent/1801-cross-file-consistency-guidance)c09eff2a05a0b5ce23515a96b907b8a6f361cdfb..HEAD)