Path-local thoroughness: N+1 hops, indexes, tests-to-fields, React - #4
Merged
Merged
Conversation
Same-file queryset helpers and Prefetch() objects feed N+1. filter/order_by vs db_index stays a path-scoped warning. Tests record asserted names, throttles are sinks, canvas signatures enqueue, and React captures invalidation, form fields, and missing page boundaries. Reviewers stay CODEOWNERS; hotspot authors are knowledge_owners only. Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Missing-index warnings prefer fields in the same Django app as the owner. useMutation on a hook sets extra.mutation so invalidation residuals do not depend on the hook being named *Mutation. Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
Modsofthenation
marked this pull request as ready for review
August 14, 2026 23:30
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.
Why
The walk already reached views, serializers, jobs, and InvoicePage, but it missed same-file queryset helpers, Prefetch() cover, filter-vs-index, “test file exists vs asserts this field”, and React invalidation/form/boundary evidence. Those belong on the impact path, not as a repo-wide linter.
What changed
recent()/get_queryset());Prefetch("lines")counts as cover;.allis not a related field name.queryset_missing_index:.filter()/.order_by()vs fielddb_index/unique, preferring the owner’s Django app. Engine still scopes findings to the impact subgraph (Invoice.total does not inheritservices.pystatus filters).mentions; residual only if a changed field name is in the patch and no test on the path asserts it..s/.si.invalidateQueries, formname/defaultValue, page ErrorBoundary/Suspense flags;useMutationsetsextra.mutation.knowledge_owners, notsuggested_reviewers(stillbilling-teamon the vertical slice).Adversarial review
Valid findings in
4cef9ef: missing-index could match a same-named field in another app; invalidation residuals required the hook to be named*Mutation.Tests
Unit extractors, missing-index rule, evolution functions, vertical slice unchanged.