Skip to content

Path-local thoroughness: N+1 hops, indexes, tests-to-fields, React - #4

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/path-thoroughness-ccb4
Aug 14, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/path-thoroughness-ccb4

Conversation

@Modsofthenation

@Modsofthenation Modsofthenation commented Aug 14, 2026 •

Copy link
Copy Markdown
Owner

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

  • N+1: one-hop helper returns (recent() / get_queryset()); Prefetch("lines") counts as cover; .all is not a related field name.
  • queryset_missing_index: .filter() / .order_by() vs field db_index/unique, preferring the owner’s Django app. Engine still scopes findings to the impact subgraph (Invoice.total does not inherit services.py status filters).
  • Pytest/RTL nodes store mentions; residual only if a changed field name is in the patch and no test on the path asserts it.
  • Throttle classes are sink nodes. Celery canvas args enqueue inner .s / .si.
  • React: invalidateQueries, form name/defaultValue, page ErrorBoundary/Suspense flags; useMutation sets extra.mutation.
  • Evolution lists changed functions. Hotspot authors are knowledge_owners, not suggested_reviewers (still billing-team on 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.

Open in Web Open in Cursor 

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>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 58548bf6-fbf0-4448-b3c4-b386e039896d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

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
Modsofthenation marked this pull request as ready for review August 14, 2026 23:30
@cursor
cursor Bot merged commit a5f4a75 into main Aug 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants