You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataSourceNode gains an optional ResponseType { name, fields, source }
(one level of fields); lineage-graph and context-bundle schemas
regenerated, drift gates green.
New response.ts parser module:
- responseFromCall: recovers the type from a call's generic argument
(axios.get<User[]>, useQuery<T>) or, failing that, the annotation on
the nearest enclosing typed variable whose initializer holds the call
(const data: Invoice[] = await fetch(...).then(r => r.json())). Stops at
function boundaries; reads property signatures only (methods skipped).
- loadOpenApi / linkOpenApiResponses: post-pass filling untyped sources
from an OpenAPI 3 JSON spec, matching `${METHOD} ${endpoint}` with
{id}->:id normalization and $ref resolution.
Exposed via the `openapi` scan option and CLI `scan --openapi`. Bundle
lineage dataSources carry responseType; `trace` prints it.
New f4-typed-responses fixture + GoldenResponse / `responses` check kind
covering all three sources. 5 parser unit tests incl. bundle-level.
eval 265/0/0, gate OK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@@ -291,10 +291,11 @@ The heart of the project. C1 and B1 live here.
291
291
**Accept:** fixture with co-located tests: bundle names the right test files; components without tests get `warnings: ["untested"]`.
292
292
**Done:**`TestNode` (kind `test`, framework vitest/jest/unknown) + `covered-by` edge in core (schema regenerated, drift gate green). New `detectTests` parser pass: test files are excluded from the component/instance scan (`isTestFile`) so they never emit spurious nodes, then swept — every component a test renders (JSX tag) or imports resolves to a `covered-by` edge (imports resolved to their source file for precise attribution, name fallback otherwise). Bundle populates `tests` from the matched component's render subtree (`componentSubtree`) and pushes an `untested` warning when the matched component has no coverage; `blastRadius` counts a test as a dependent of the component it covers. New `f3-test-coverage` fixture + `GoldenCoverage`/`coverage` check kind (covers UserList, Sidebar untested). 6 parser unit tests (incl. two bundle-level); eval 262/0/0, gate OK.
293
293
294
-
### [] 5.5 Response-schema linking
294
+
### [x] 5.5 Response-schema linking
295
295
**Failure modes:** F4
296
296
**Build:** data sources link to response types: generic argument (`useQuery<User[]>`), annotated variable types, or an OpenAPI spec (scan option `openapi: path`) matched by endpoint pattern. Bundle lineage entries carry `responseType: { name, fields }` (one level of fields, not deep).
297
297
**Accept:** fixture `f4-typed-responses` green for all three sources (generic, annotation, OpenAPI).
298
+
**Done:**`ResponseType { name, fields: {name,type}[], source }` on `DataSourceNode` in core (schema regenerated, drift gate green). New `response.ts` parser module: `responseFromCall` recovers the type from a call's generic argument (`axios.get<User[]>`, `useQuery<T>`) or, failing that, the annotation on the nearest enclosing typed variable whose initializer holds the call (`const data: Invoice[] = await fetch(…).then(r => r.json())`), stopping at function boundaries; only property signatures are read (one level, methods skipped). `loadOpenApi`/`linkOpenApiResponses` is a post-pass that fills untyped sources from an OpenAPI 3 JSON spec (`openapi` scan option / CLI `--openapi`), matching `${METHOD} ${endpoint}` with `{id}`→`:id` normalization and `$ref` resolution. Bundle lineage `dataSources` carry `responseType`; `trace` prints it. New `f4-typed-responses` fixture + `GoldenResponse`/`responses` check kind (all three sources). 5 parser unit tests incl. bundle-level; eval 265/0/0, gate OK.
"note": "Response-schema linking from all three sources: a generic type argument (axios.get<User[]>), a variable-type annotation (const data: Invoice[] = …fetch…), and an OpenAPI spec matched by endpoint (GET /api/orders → Order[]).",
0 commit comments