GitNexus/gitnexus-shared
Test febce27eaa feat: add data-shape tracking with StateSlot nodes and data_flow tool
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>
2026-04-18 13:13:21 +02:00
..
src feat: add data-shape tracking with StateSlot nodes and data_flow tool 2026-04-18 13:13:21 +02:00
package-lock.json feat: unify web and cli ingestion pipeline (#536) 2026-03-28 14:07:11 +00:00
package.json feat: unify web and cli ingestion pipeline (#536) 2026-03-28 14:07:11 +00:00
tsconfig.json feat: unify web and cli ingestion pipeline (#536) 2026-03-28 14:07:11 +00:00