# Data flow — cypress-io/cypress

> Canonical page: https://codevetter.com/unpack/cypress/data-flow

# Data flow — cypress-io/cypress

Scanned commit 7d987f04740f8f5388ac3116e8ef7957373ead14 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Inputs cross explicit boundaries through CLI argument translation, configuration IPC, GraphQL operations, and network-event frames. State is split between DataContext, browser route/command state, server interception state, and local persistence. Outputs include browser responses, UI subscriptions, JSON run results, process exit codes, and session discovery records.
- processRunOptions translates user options into binary flags, including --run-project, config/env, recording key, reporter, and specs; spawn.start adds cwd, userNodePath, and userNodeVersion. — [cli/lib/exec/run.ts#L38-71](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/cli/lib/exec/run.ts#L38-L71) [cli/lib/exec/run.ts#L98-155](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/cli/lib/exec/run.ts#L98-L155) [cli/lib/exec/spawn.ts#L368-381](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/cli/lib/exec/spawn.ts#L368-L381)
- Configuration crosses into a child as project/config arguments and inherited environment; RunPlugins sends modified setupConfig and event registrations back through setupTestingType:reply. — [packages/data-context/src/data/ProjectConfigIpc.ts#L308-324](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/data-context/src/data/ProjectConfigIpc.ts#L308-L324) [packages/server/lib/plugins/child/run_plugins.ts#L113-145](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/server/lib/plugins/child/run_plugins.ts#L113-L145)
- GraphQL socket requests parse JSON and query text, execute graphqlSchema with a request context, return results through a callback, and balance DataContext active-request accounting in finally. — [packages/data-context/graphql/makeGraphQLServer.ts#L162-186](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/data-context/graphql/makeGraphQLServer.ts#L162-L186)
- The driver annotates regex/glob matchers for transport, lowercases header matcher names, stores handlers locally by routeId, and emits route:added; the server restores matcher types and appends BackendRoute to state.routes. — [packages/driver/src/cy/net-stubbing/add-command.ts#L71-87](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/driver/src/cy/net-stubbing/add-command.ts#L71-L87) [packages/driver/src/cy/net-stubbing/add-command.ts#L204-239](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/driver/src/cy/net-stubbing/add-command.ts#L204-L239) [packages/net-stubbing/lib/server/driver-events.ts#L22-39](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/net-stubbing/lib/server/driver-events.ts#L22-L39) [packages/net-stubbing/lib/server/driver-events.ts#L70-97](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/net-stubbing/lib/server/driver-events.ts#L70-L97)
- Matching excludes component dev-server paths and can synthesize preflight responses; matchRoutes orders middleware first, ordinary handlers in reverse registration order, and excludes disabled routes. — [packages/net-stubbing/lib/server/middleware/request.ts#L15-44](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/net-stubbing/lib/server/middleware/request.ts#L15-L44) [packages/network-interception/lib/core/route-matching.ts#L140-153](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/network-interception/lib/core/route-matching.ts#L140-L153)
- Interception buffers request/response bodies, preserves binary content, exchanges subscription events with browser handlers, merges changes, and either ends a stubbed request or continues transport with a modified body stream. — [packages/net-stubbing/lib/server/handle-intercept-request.ts#L93-139](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/net-stubbing/lib/server/handle-intercept-request.ts#L93-L139) [packages/driver/src/cy/net-stubbing/events/index.ts#L77-136](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/driver/src/cy/net-stubbing/events/index.ts#L77-L136) [packages/net-stubbing/lib/server/handle-intercept-response.ts#L45-83](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/net-stubbing/lib/server/handle-intercept-response.ts#L45-L83)
- Interactive-session JSON holds schema, PID, resolved project root, port, session ID, and testing type; CDP/browser attachment remains in memory, while the probe reads machine/user identity at request time. — [packages/server/lib/cypress-sessions.ts#L45-61](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/server/lib/cypress-sessions.ts#L45-L61) [packages/server/lib/cypress-sessions.ts#L71-90](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/server/lib/cypress-sessions.ts#L71-L90) [packages/server/lib/routes.ts#L224-241](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/server/lib/routes.ts#L224-L241)
- runSpecs aggregates per-spec statistics, transforms results with createPublicRunResults, invokes after:run, and writes output; programmatic run() supplies a temporary output path and reads that JSON after the child finishes. — [packages/server/lib/modes/run.ts#L964-998](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/packages/server/lib/modes/run.ts#L964-L998) [cli/lib/cypress.ts#L28-46](https://github.com/cypress-io/cypress/blob/7d987f04740f8f5388ac3116e8ef7957373ead14/cli/lib/cypress.ts#L28-L46)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
