# microsoft/vscode-bisect architecture

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

- Interactive diagram: https://gitdiagram.com/microsoft/vscode-bisect
- Repository: https://github.com/microsoft/vscode-bisect

## Overview

vscode-bisect is a command-line tool for testing released VS Code builds and narrowing down which build introduced an issue. Users select a runtime, quality, and build range; the tool retrieves candidate builds, launches them for manual good/bad feedback, and reports the narrowed result. It also supports individual-build and sanity testing, plus performance-oriented options. The graph follows documented behavior and sampled imports/calls; some wiring is supported only by the source index, so uncertain relationships are omitted.

Main entry points: [`src/builds.ts`](https://github.com/microsoft/vscode-bisect/blob/main/src/builds.ts) (Build selection and metadata), [`src/index.ts`](https://github.com/microsoft/vscode-bisect/blob/main/src/index.ts) (CLI options), [`src/launcher.ts`](https://github.com/microsoft/vscode-bisect/blob/main/src/launcher.ts) (Build launcher), [`src/files.ts`](https://github.com/microsoft/vscode-bisect/blob/main/src/files.ts) (Build files and cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and orchestration"]
  node_cli["CLI options<br/>[index.ts]"]
  node_bisect["Bisect workflow<br/>[bisect.ts]"]
  node_sanity["Sanity workflow<br/>[sanity.ts]"]
  node_git["VS Code checkout<br/>[git.ts]"]
end

subgraph group_builds["Build retrieval"]
  node_builds["Build selection and metadata<br/>[builds.ts]"]
  node_transfer["HTTP download<br/>[fetch.ts]"]
end

subgraph group_execution["Testing and execution"]
  node_launcher["Build launcher<br/>[launcher.ts]"]
  node_runtime["VS Code build"]
  node_feedback(("Good/bad feedback"))
  node_performance["Performance testing"]
end

subgraph group_support["Shared runtime support"]
  node_files["Build files and cache<br/>[files.ts]"]
  node_config["Runtime configuration<br/>[constants.ts]"]
  node_storage[("Local build storage<br/>[files.ts]")]
end

node_user(("CLI user"))
node_updates["Build update service"]

node_user -->|"provides options"| node_cli
node_cli -->|"starts bisect"| node_bisect
node_cli -->|"starts sanity"| node_sanity
node_cli -->|"selects build"| node_builds
node_cli -.->|"uses checkout"| node_git
node_bisect -->|"resolves range"| node_builds
node_bisect -.->|"launches candidate"| node_launcher
node_bisect -->|"requests verdict"| node_feedback
node_sanity -.->|"tests build"| node_launcher
node_sanity -->|"requests status"| node_feedback
node_builds -.->|"fetches metadata"| node_updates
node_builds -->|"downloads archive"| node_transfer
node_builds -->|"checks and hashes"| node_files
node_transfer -.->|"requests archive"| node_updates
node_builds -.->|"caches archives"| node_storage
node_launcher -.->|"gets executable"| node_builds
node_launcher -->|"checks executable"| node_files
node_launcher -->|"starts process"| node_runtime
node_launcher -.->|"runs measurements"| node_performance
node_bisect -->|"cleans user data"| node_files
node_sanity -->|"cleans user data"| node_files
node_cli -.->|"sets options"| node_config
node_files -->|"uses paths"| node_config
node_git -->|"checks checkout"| node_files

click node_cli "https://github.com/microsoft/vscode-bisect/blob/main/src/index.ts"
click node_bisect "https://github.com/microsoft/vscode-bisect/blob/main/src/bisect.ts"
click node_sanity "https://github.com/microsoft/vscode-bisect/blob/main/src/sanity.ts"
click node_git "https://github.com/microsoft/vscode-bisect/blob/main/src/git.ts"
click node_builds "https://github.com/microsoft/vscode-bisect/blob/main/src/builds.ts"
click node_transfer "https://github.com/microsoft/vscode-bisect/blob/main/src/fetch.ts"
click node_files "https://github.com/microsoft/vscode-bisect/blob/main/src/files.ts"
click node_launcher "https://github.com/microsoft/vscode-bisect/blob/main/src/launcher.ts"
click node_config "https://github.com/microsoft/vscode-bisect/blob/main/src/constants.ts"
click node_storage "https://github.com/microsoft/vscode-bisect/blob/main/src/files.ts"

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_cli,node_bisect,node_sanity,node_git,node_user toneBlue
class node_builds,node_transfer toneAmber
class node_launcher,node_runtime,node_feedback,node_performance toneMint
class node_files,node_config,node_storage toneRose
class node_updates toneIndigo
```

## Components

### CLI and orchestration

- [CLI options](https://github.com/microsoft/vscode-bisect/blob/main/src/index.ts): `src/index.ts`
- [Bisect workflow](https://github.com/microsoft/vscode-bisect/blob/main/src/bisect.ts): `src/bisect.ts`
- [Sanity workflow](https://github.com/microsoft/vscode-bisect/blob/main/src/sanity.ts): `src/sanity.ts`
- [VS Code checkout](https://github.com/microsoft/vscode-bisect/blob/main/src/git.ts): `src/git.ts`

### Build retrieval

- [Build selection and metadata](https://github.com/microsoft/vscode-bisect/blob/main/src/builds.ts): `src/builds.ts`
- [HTTP download](https://github.com/microsoft/vscode-bisect/blob/main/src/fetch.ts): `src/fetch.ts`

### Testing and execution

- [Build launcher](https://github.com/microsoft/vscode-bisect/blob/main/src/launcher.ts): `src/launcher.ts`
- **VS Code build**
- **Good/bad feedback**
- **Performance testing**

### Shared runtime support

- [Build files and cache](https://github.com/microsoft/vscode-bisect/blob/main/src/files.ts): `src/files.ts`
- [Runtime configuration](https://github.com/microsoft/vscode-bisect/blob/main/src/constants.ts): `src/constants.ts`
- [Local build storage](https://github.com/microsoft/vscode-bisect/blob/main/src/files.ts): `src/files.ts`

### Other components

- **CLI user**
- **Build update service**

## Connections

- CLI user → CLI options: provides options (evidence: `README.md`)
- CLI options → Bisect workflow: starts bisect (evidence: `src/index.ts`)
- CLI options → Sanity workflow: starts sanity (evidence: `src/index.ts`)
- CLI options → Build selection and metadata: selects build (evidence: `src/index.ts`)
- CLI options → VS Code checkout: uses checkout (evidence: `src/index.ts`)
- Bisect workflow → Build selection and metadata: resolves range (evidence: `src/bisect.ts`)
- Bisect workflow → Build launcher: launches candidate (evidence: `src/bisect.ts`)
- Bisect workflow → Good/bad feedback: requests verdict (evidence: `src/bisect.ts`)
- Sanity workflow → Build launcher: tests build (evidence: `src/sanity.ts`)
- Sanity workflow → Good/bad feedback: requests status (evidence: `src/sanity.ts`)
- Build selection and metadata → Build update service: fetches metadata
- Build selection and metadata → HTTP download: downloads archive (evidence: `src/builds.ts`)
- Build selection and metadata → Build files and cache: checks and hashes (evidence: `src/builds.ts`)
- HTTP download → Build update service: requests archive
- Build selection and metadata → Local build storage: caches archives (evidence: `src/builds.ts`)
- Build launcher → Build selection and metadata: gets executable (evidence: `src/launcher.ts`)
- Build launcher → Build files and cache: checks executable (evidence: `src/launcher.ts`)
- Build launcher → VS Code build: starts process (evidence: `src/launcher.ts`)
- Build launcher → Performance testing: runs measurements
- Bisect workflow → Build files and cache: cleans user data (evidence: `src/bisect.ts`)
- Sanity workflow → Build files and cache: cleans user data (evidence: `src/sanity.ts`)
- CLI options → Runtime configuration: sets options (evidence: `src/index.ts`)
- Build files and cache → Runtime configuration: uses paths (evidence: `src/files.ts`)
- VS Code checkout → Build files and cache: checks checkout (evidence: `src/git.ts`)
