Score tests on the impact path and prefer generated OpenAPI clients - #5
Merged
Conversation
…, prefer generated clients. Confidence only counts TESTED_BY edges on the impact subgraph. N+1 drops CharField accesses and keeps unknown names at medium. django.setup() runs in a subprocess. String URL stitches stay inferred when a generated OpenAPI client already covers the same template. Weak evolution notes no longer flip HIGH to MEDIUM. Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThe PR isolates Django boot execution, improves graph identity and index invalidation, makes N+1 analysis relationship-aware, scopes confidence testing to impacted graphs, and distinguishes generated OpenAPI clients during stitching. ChangesGraph extraction and review updates
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant DjangoBoot
participant BootSubprocess
participant PayloadParser
participant ExtractedGraph
DjangoBoot->>BootSubprocess: execute isolated Django boot
BootSubprocess->>PayloadParser: emit marked JSON payload
PayloadParser->>ExtractedGraph: reconstruct nodes and edges
PayloadParser-->>DjangoBoot: return graph or residual error
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Client nodes were keyed only on the URL template, so generated/invoices.ts and billing/api.ts collapsed into one node and the high-confidence stitch never appeared. Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
…ayload. CharField N+1 hits were still copied into review residuals after the rule dropped them. Client node-id changes now bump INDEX_REVISION so incremental graphs rebuild. Malformed django.setup() JSON becomes a skip residual. Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
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
Merge confidence, N+1, OpenAPI stitching, and Django boot were a little too eager: off-path tests could cover a sink, CharField accesses looked like relations, string
fetchcompeted with generated clients, weak churn notes could knock HIGH down to MEDIUM, anddjango.setup()mutated the reviewer process.What changed
TESTED_BYonly when both ends sit on the impact subgraph (including two-hop producers on that path).CharField, etc.), keep unknown names at medium, raise to high when the schema says relation. Findings stay onextra— no new walkable edges. Residuals use the same filter.django.setup()runs in a subprocess so it is not process-global. Failures and malformed payloads still surface asdjango.setup() skipped: ….generated/invoices.tsis not overwritten byapi.ts. String URL matches stay dashed; if a generated client already covers the same template they are markedsuperseded_by_generated(~0.4).INDEX_REVISIONis part of the sidecar digest so identity changes force an incremental rebuild.Tests
Unit coverage for impact-only tests, schema-aware N+1 (findings + residuals), boot JSON framing/malformed payload, generated vs inferred client stitch, and file-scoped generated clients. Vertical slice still expects InvoicePage (not MePage),
suggested_reviewers == ['billing-team'], celery + dramatiq, confidence medium/low.Adversarial review
3f5467e: generated and handwritten clients shared one node id (client:{url}).ab99fa0: CharField N+1 still leaked into residuals; extractor identity did not invalidate the index; boot JSON KeyError could crash the parent.Summary by CodeRabbit
Improvements
Tests