# chetanagrawal721/faultline-crossrepo_dependency_drift_detector architecture

> Architecture diagram of the GitHub repository chetanagrawal721/faultline-crossrepo_dependency_drift_detector, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector
- Repository: https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector

## Overview

Faultline is a cross-repository dependency-drift verifier. A user submits public GitHub repositories; pinned snapshots are ingested, manifests and lockfiles are analyzed into dependency worlds, and shared artifacts are checked across producer and consumer worlds. Evidence-backed relationships feed deterministic verdicts and two-sided attribution; reproducible failures become exportable, replayable witnesses. The React workspace presents analyses and persisted results. README documents the full product funnel; source-index references and excerpts support only some internal links, so unsampled wiring is omitted.

Main entry points: [`backend/faultline/analysis/live.py`](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/analysis/live.py) (Live analysis), [`backend/faultline/workers/handlers.py`](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/workers/handlers.py) (Worker handlers), [`backend/faultline/worlds/canonical.py`](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/worlds/canonical.py) (Canonical worlds), [`frontend/src/app/Workspace.tsx`](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/frontend/src/app/Workspace.tsx) (Analysis workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Product shell<br/>[App.tsx]"]
  node_workspace["Analysis workspace<br/>[Workspace.tsx]"]
  node_views["Result views"]
  node_api_client["API client<br/>[client.ts]"]
end

subgraph group_control["API and orchestration"]
  node_api["FastAPI app<br/>[main.py]"]
  node_routers["API routes"]
  node_jobs["Worker handlers<br/>[handlers.py]"]
  node_storage[("Persisted records")]
end

subgraph group_worlds["Repository worlds"]
  node_ingest["Snapshot ingestion<br/>[service.py]"]
  node_repository_analysis["Project discovery<br/>[repository.py]"]
  node_parsers["Manifest parsers"]
  node_python_resolver["Python resolver<br/>[python.py]"]
  node_canonical["Canonical worlds<br/>[canonical.py]"]
  node_world_builder["World builder<br/>[builder.py]"]
end

subgraph group_verification["Verification and evidence"]
  node_relationships["Relationship discovery<br/>[engine.py]"]
  node_live_analysis["Live analysis<br/>[live.py]"]
  node_oracle["Oracle checks"]
  node_verdicts["Verdict engine<br/>[engine.py]"]
  node_attribution["Change attribution<br/>[runner.py]"]
  node_witnesses["Witness verification<br/>[verify.py]"]
  node_bundles["Evidence bundles<br/>[bundle.py]"]
end

subgraph group_runtime["Runtime infrastructure"]
  node_sandbox_client["Sandbox client<br/>[client.py]"]
end

node_user(("Engineer"))
node_github["GitHub"]
node_sandboxd["Sandbox service<br/>[sandboxd.py]"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_workspace
node_workspace -->|"shows"| node_views
node_workspace -->|"requests data"| node_api_client
node_api_client -->|"calls"| node_api
node_api -->|"registers"| node_routers
node_routers -.->|"submits work"| node_jobs
node_jobs -->|"ingests repository"| node_ingest
node_ingest -->|"resolves and fetches"| node_github
node_jobs -->|"analyzes snapshot"| node_repository_analysis
node_repository_analysis -->|"discovers projects"| node_parsers
node_repository_analysis -->|"ensures worlds"| node_canonical
node_canonical -->|"parses manifests"| node_parsers
node_canonical -->|"resolves Python"| node_python_resolver
node_python_resolver -->|"requests resolution"| node_sandbox_client
node_canonical -->|"builds worlds"| node_world_builder
node_live_analysis -.->|"finds relationships"| node_relationships
node_live_analysis -.->|"checks artifacts"| node_oracle
node_live_analysis -.->|"determines verdict"| node_verdicts
node_verdicts -->|"verifies failures"| node_witnesses
node_live_analysis -.->|"narrows change"| node_attribution
node_witnesses -->|"exports evidence"| node_bundles
node_jobs -->|"reads and writes"| node_storage
node_ingest -->|"records snapshots"| node_storage
node_sandbox_client -->|"sends commands"| node_sandboxd

click node_app "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/frontend/src/App.tsx"
click node_workspace "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/frontend/src/app/Workspace.tsx"
click node_views "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/frontend/src/app/views"
click node_api_client "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/frontend/src/api/client.ts"
click node_api "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/api/main.py"
click node_routers "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/api/routers"
click node_jobs "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/workers/handlers.py"
click node_ingest "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/ingestion/service.py"
click node_repository_analysis "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/analysis/repository.py"
click node_parsers "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/parsers"
click node_python_resolver "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/resolvers/python.py"
click node_canonical "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/worlds/canonical.py"
click node_world_builder "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/worlds/builder.py"
click node_relationships "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/relationships/engine.py"
click node_live_analysis "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/analysis/live.py"
click node_oracle "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/oracles"
click node_verdicts "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/verdicts/engine.py"
click node_attribution "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/attribution/runner.py"
click node_witnesses "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/witnesses/verify.py"
click node_bundles "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/witnesses/bundle.py"
click node_storage "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/storage"
click node_sandbox_client "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/sandbox/client.py"
click node_sandboxd "https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/sandbox/sandboxd.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_workspace,node_views,node_api_client toneBlue
class node_api,node_routers,node_jobs,node_storage toneAmber
class node_ingest,node_repository_analysis,node_parsers,node_python_resolver,node_canonical,node_world_builder toneMint
class node_relationships,node_live_analysis,node_oracle,node_verdicts,node_attribution,node_witnesses,node_bundles toneRose
class node_sandbox_client,node_user,node_github toneIndigo
class node_sandboxd toneTeal
```

## Components

### User interface

- [Product shell](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Analysis workspace](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/frontend/src/app/Workspace.tsx): `frontend/src/app/Workspace.tsx`
- [Result views](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/frontend/src/app/views): `frontend/src/app/views`
- [API client](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### API and orchestration

- [FastAPI app](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/api/main.py): `backend/faultline/api/main.py`
- [API routes](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/api/routers): `backend/faultline/api/routers`
- [Worker handlers](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/workers/handlers.py): `backend/faultline/workers/handlers.py`
- [Persisted records](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/storage): `backend/faultline/storage`

### Repository worlds

- [Snapshot ingestion](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/ingestion/service.py): `backend/faultline/ingestion/service.py`
- [Project discovery](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/analysis/repository.py): `backend/faultline/analysis/repository.py`
- [Manifest parsers](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/parsers): `backend/faultline/parsers`
- [Python resolver](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/resolvers/python.py): `backend/faultline/resolvers/python.py`
- [Canonical worlds](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/worlds/canonical.py): `backend/faultline/worlds/canonical.py`
- [World builder](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/worlds/builder.py): `backend/faultline/worlds/builder.py`

### Verification and evidence

- [Relationship discovery](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/relationships/engine.py): `backend/faultline/relationships/engine.py`
- [Live analysis](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/analysis/live.py): `backend/faultline/analysis/live.py`
- [Oracle checks](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/tree/main/backend/faultline/oracles): `backend/faultline/oracles`
- [Verdict engine](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/verdicts/engine.py): `backend/faultline/verdicts/engine.py`
- [Change attribution](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/attribution/runner.py): `backend/faultline/attribution/runner.py`
- [Witness verification](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/witnesses/verify.py): `backend/faultline/witnesses/verify.py`
- [Evidence bundles](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/witnesses/bundle.py): `backend/faultline/witnesses/bundle.py`

### Runtime infrastructure

- [Sandbox client](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/sandbox/client.py): `backend/faultline/sandbox/client.py`

### Other components

- **Engineer**
- **GitHub**
- [Sandbox service](https://github.com/chetanagrawal721/faultline-crossrepo_dependency_drift_detector/blob/main/backend/faultline/sandbox/sandboxd.py): `backend/faultline/sandbox/sandboxd.py`

## Connections

- Engineer → Product shell: uses (evidence: `README.md`)
- Product shell → Analysis workspace: routes to (evidence: `frontend/src/App.tsx`)
- Analysis workspace → Result views: shows (evidence: `README.md`)
- Analysis workspace → API client: requests data
- API client → FastAPI app: calls (evidence: `README.md`)
- FastAPI app → API routes: registers (evidence: `backend/faultline/api/main.py`)
- API routes → Worker handlers: submits work
- Worker handlers → Snapshot ingestion: ingests repository (evidence: `backend/faultline/workers/handlers.py`)
- Snapshot ingestion → GitHub: resolves and fetches (evidence: `backend/faultline/ingestion/service.py`)
- Worker handlers → Project discovery: analyzes snapshot (evidence: `backend/faultline/workers/handlers.py`)
- Project discovery → Manifest parsers: discovers projects (evidence: `backend/faultline/analysis/repository.py`)
- Project discovery → Canonical worlds: ensures worlds (evidence: `backend/faultline/analysis/repository.py`)
- Canonical worlds → Manifest parsers: parses manifests (evidence: `backend/faultline/worlds/canonical.py`)
- Canonical worlds → Python resolver: resolves Python (evidence: `backend/faultline/worlds/canonical.py`)
- Python resolver → Sandbox client: requests resolution (evidence: `backend/faultline/resolvers/python.py`)
- Canonical worlds → World builder: builds worlds (evidence: `backend/faultline/worlds/canonical.py`)
- Live analysis → Relationship discovery: finds relationships (evidence: `README.md`)
- Live analysis → Oracle checks: checks artifacts (evidence: `README.md`)
- Live analysis → Verdict engine: determines verdict (evidence: `README.md`)
- Verdict engine → Witness verification: verifies failures (evidence: `backend/faultline/verdicts/engine.py`)
- Live analysis → Change attribution: narrows change (evidence: `README.md`)
- Witness verification → Evidence bundles: exports evidence (evidence: `README.md`)
- Worker handlers → Persisted records: reads and writes (evidence: `backend/faultline/workers/handlers.py`)
- Snapshot ingestion → Persisted records: records snapshots (evidence: `backend/faultline/ingestion/service.py`)
- Sandbox client → Sandbox service: sends commands (evidence: `backend/faultline/sandbox/client.py`)
