src/orchestrator/run-context.ts — git/CI/host capture
Purpose
Section titled “Purpose”The per-run context for the invocations header row and the telemetry
RunContextRecord: commit, branch, dirty, CI provider, host/os/arch.
Public surface
Section titled “Public surface”captureGitContext(root, dirty)— ONEgit rev-parsespawn for commit+branch;dirtyis passed in (reused from thegit status --porcelainthe GitFilesCache populate already ran — no second status spawn). Behind try/catch; fields null on failure.detectCi(env)— provider matrix (GitHub, GitLab, Buildkite, …).captureHostContext()— hostname/os/arch.
Invariants
Section titled “Invariants”- ≤1 extra git spawn per run; never fails a run.