mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-12 03:48:38 +00:00
Introduces end-to-end data-flow shape tracking to detect mismatches where multiple consumers share a cache key, context, or state slot but expect different data shapes — a class of bug invisible to static call-graph analysis. New graph model: - StateSlot node type with PRODUCES/CONSUMES edges - Pipeline phase 3.7 for state slot detection Detectors (9 frameworks): - React Query (useQuery, useMutation, useInfiniteQuery, useSuspenseQuery) - SWR (useSWR, useSWRMutation) - queryClient.setQueryData programmatic cache mutations - React Context (createContext, useContext, Provider) - Redux (createSlice, useSelector) - Zustand (create store, useStore selector) - Custom hook chains (use* wrappers with reshaped returns) - GraphQL (gql tagged templates, .graphql files) - tRPC (router procedures, client useQuery/useMutation) Detection boosters: - Route-to-cache chaining (Route responseKeys -> StateSlot) - Wrapper hook resolution (2 levels, use* convention) - Cache key prefix matching for collision detection MCP tools: - New data_flow tool with mismatch verdict (ok/suspicious/conflict) - shape_check extended with state-layer detection - api_impact extended with stateLayer section + risk bumping - impact extended to follow PRODUCES -> CONSUMES paths - context extended with state slot 360-degree view Validated on real Next.js project: 86 state slots detected, 16 shared cache key collisions flagged including genuine cross-file conflicts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| code-indexing/cobol | ||
| plans | ||
| superpowers | ||