Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bb884a52-d8d5-43f1-be33-215167fe2e86
🌱 graft blast radius2 areas changed → 6 areas can be affected. 15 dependent symbols, depth 2. flowchart TB
A0(("Pull Request Review<br/>8 symbols"))
A1(("Workspace Graph Freshness<br/>3 symbols"))
A2(("Viewer Build<br/>1 symbol"))
A3(("MCP Tool Invocation<br/>1 symbol"))
A4(("Graph Engine<br/>1 symbol"))
AX(("1 smaller area<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2,A3,A4 reached;
classDef tail fill:#EEF2F3,stroke:#9AA4A9,stroke-width:1px,color:#3A4247;
class AX tail;
Who knows this code — 3 people across 8 areas
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no All 15 dependent symbols, grouped by areaPull Request Review — 8 symbols in 6 files
Workspace Graph Freshness — 3 symbols in 2 files
Viewer Build — 1 symbol in 1 file
MCP Tool Invocation — 1 symbol in 1 file
Graph Engine — 1 symbol in 1 file
Synchronous Claude Execution — 1 symbol in 1 file
Test signal per changed area — 1 ⚠ · 1 –Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
33 test suites also reference this code41 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
Summary
Structural graph extraction failures currently leave a partial graph on disk, but the CLI still prints the normal successful wiring banner, emits
build_completed, and exits 0. This makes parser/runtime failures look indistinguishable from a complete build.This change:
structuralErrorscount separately from optional meaning-tier errors;wiring incompleteand exits 1 when structural errors occurred;build_failedinstead ofbuild_completedfor an incomplete structural build;--allow-partialexclusively for degraded LLM meaning passes.Why
A recoverable parser failure is collected in
GraphBuildResult.errors, soengine.graph()resolves successfully and writes the healthy portion of the graph. The CLI previously treated any resolved result as success. Automation therefore received exit code 0 even when files were missing from the graph.The partial artifacts are useful for diagnosis and recovery, so this PR does not turn recoverable extraction errors into thrown exceptions or roll back graph output. It changes only the command-level completion status and reporting.
Reproduction
The regression tests inject a deterministic
web-tree-sitterparser failure in a child process, using only synthetic C# and TypeScript fixtures. Before this change, the command prints the successful wiring banner and exits 0. After this change, it:wiring.json;Coverage also includes cached/replayed failures,
--deepfallback, a real degraded deep pass with--allow-partial, successful builds, and workspace federation.Relationship to #340
This is a companion to #340, not a replacement for it.
#340 addresses WASM parser/tree lifetime, poisoned parser recovery, container ownership, and retrying failed extraction-cache entries. This PR deliberately does not duplicate those parser-lifetime or cache-retry changes. It addresses the separate CLI/API contract issue: if structural errors remain in a build result for any reason, the command must not report success.
Behavior guarantees
build_failedstage/code fields; no error text is added to the telemetry contract.--allow-partialcan still accept meaning-tier failures, but cannot reset a structural failure exit status.workspace.json.Tests
npm run buildnode --import tsx --test test\\cli-structural-failure.test.ts test\\cli-deep-failure.test.ts test\\graph-incremental.test.ts test\\generic-extract.test.ts test\\graph-workspace-include-dir.test.ts test\\telemetry-contract.test.ts