docs: design exploration for a Spring-aware code graph - #9
Merged
Conversation
Records an exploration of what it would take to make the graph understand Spring Framework / Boot / Cloud, and recommends building much less than the question implied. The main finding is that most of what looks like Spring-specific breakage is not Spring-specific at all: a plain two-class Java fixture with no annotations and no interfaces already fails to resolve an instance call through a variable receiver. That is issue #8, it affects Java, TypeScript and Python equally, and a large share of the apparent Spring value falls out of fixing it. The doc therefore proposes Phase 0 (the general fix, tracked separately) before any Spring work, and explicitly allows for stopping there. What remains genuinely Spring-specific is small: two additive node kinds (HTTP routes, outbound Feign clients) that need no new relation and no consumer change, plus a Spring Data carve-out. The one new relation the doc proposes is deferred behind an explicit cross-repo gate, because the consumer's graph_get_callers hardcodes relation='calls' — new relations write for free but are unqueryable until that repo ships a change. Doc only. No src/ or tests/ changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
1. Summary
This PR changes:
docs/design/spring-aware-graph.md(453 lines) — a design exploration of making the code graph understand Spring Framework, Spring Boot and Spring CloudDocumentation only. No
src/,tests/, or manifest changes.It solves:
2. Intent
The intent of this PR is:
3. Scope
In Scope
Out of Scope
src/changes; this is a decision document.@ComponentScan/classpath resolution, and@Profile/conditional-bean evaluation — the doc rejects these outright rather than deferring them.4. Verification
I verified this change by:
The doc's load-bearing claims were verified by running code, not by reading it.
Commands run:
cargo run -q # spike crate, path-dependency on lci-codegraph, over Spring + plain fixturesResults:
Reproduced three times independently — by an adversarial review of the #5 fix, by this Spring spike, and once more by hand before filing #8.
The spike also confirmed all four extractions the design depends on are genuinely available from
tree-sitter-java: class-level annotations with arguments, method-level@GetMapping("/path")including the argument string, constructor parameter types for injection, and the generic type argument fromextends JpaRepository<Account, Long>.The write/read asymmetry in §5.1 was verified against the consumer repository:
5. Screenshots / Evidence
Add evidence here:
6. Risk Assessment
Risk level:
Potential risks:
Mitigation:
7. AI Usage Declaration
AI was used for:
Human verification:
The doc's central empirical claim was independently reproduced before being written down, and the write/read asymmetry was checked directly against the consumer's Cypher rather than assumed.
8. Reviewer Focus
Please focus your review on:
Specifically:
route/external_servicenode-kind approach right, versus modelling routes as a new relation? The node-kind framing was chosen specifically to avoid the cross-repo dependency in §5.1.