feat(intelligence): add snapshot impact query - #229
Merged
parthrohit22 merged 2 commits intoJul 27, 2026
Conversation
hardikuppal04
marked this pull request as ready for review
July 27, 2026 21:04
parthrohit22
approved these changes
Jul 27, 2026
parthrohit22
left a comment
Collaborator
There was a problem hiding this comment.
Approved. Solid implementation of #173: bounded, cycle-safe, provenance-backed impact query over persisted ri.v1 edges, owner-scoped, with migration + tests. Matches the agreed contract.
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.
Summary
Adds a bounded, evidence-backed impact query over a single sealed
ri.v1snapshot. It lets an authenticated repository owner ask both “what depends on this node?” and “what does this node depend on?” without reading a working tree or a parallel parser.Linked issue
Closes #173
Roadmap alignment
What changed
GET /intelligence/v1/snapshots/{snapshot_id}/impactwith owner-scoped authentication, validatednodeKeyand depth1..10, and separate dependent/dependency results.importsanddepends_onedges only. Every returned hop includes the existing edge evidence and derivation.limitReachedso an incomplete response is never presented as exhaustive. The SQL query selects one canonical edge per reached node before applying that cap.Acceptance criteria completed
Testing performed
Screenshots
Not applicable — this PR adds a backend read API and documentation only.
Security and data considerations
The route remains behind the existing authenticated intelligence router and resolves snapshots through the owner-scoped accessor; cross-owner and missing snapshots are both 404. Inputs have length/depth bounds, traversal has a per-direction result limit, and it returns persisted snapshot facts and existing provenance only. No source-file reads, credentials, secrets, logs of repository contents, or runtime dependency changes are introduced. The migration adds only read-performance indexes and is covered in both directions.
Dependencies and blocked work
None. This is independent of snapshot-to-snapshot comparison (#172) and the two-revision evolution spike (#219).
Scope changes or remaining work
The API intentionally reports only one sealed snapshot's resolved import/dependency facts. It does not infer unresolved relationships, compare revisions, detect churn, or provide historical trends.
limitReachedexplicitly signals when the bounded response is not exhaustive.Contributor checklist
devupstream/devupstream/devCloses) is used only because the issue is fully resolved