Skip to main content

Module blast

Module blast 

Source
Expand description

Blast radius: how far a change can reach (D23, the unbuilt half).

D23 registers “blast-radius-gated landing” but the term had no operational definition anywhere in the code. This is signal #1 of the five the D23 research ranked by cost-to-compute against predictive value: reverse-dependency reach in the cargo unit graph. It was ranked first because it needs zero historical data — no labelled corpus, no revert history, no coverage run. Pure graph traversal.

Deliberately measured and recorded, not gated on. A gate needs a threshold, a threshold needs calibration, and calibration needs the base rate we have not measured yet (the revised D23 tripwire). So this instruments first: compute the score, attach it to the change, and let it accumulate into the data a threshold could later be fitted against. Instrumenting before gating is the whole point.

Granularity is crate-level, and that is a real limitation, not a detail. A one-character change to choir-hash scores exactly the same as rewriting it, because both touch the same package and the same set of packages depend on it. The score answers “how much of the workspace could this change break”, never “how likely is it to”. Module- or item-level reach would need parsing Rust, which is a different and much larger job.

Input is cargo metadata --no-deps JSON rather than a path, so the analysis is a pure function over data. workspace_metadata is the separate impure half that shells out. That split keeps the tests hermetic and, more practically, stops a test from invoking cargo inside cargo.

Structs§

BlastRadius
How far a change reaches through the workspace dependency graph.

Functions§

blast_radius
Computes the blast radius of changed against metadata, the output of cargo metadata --no-deps --format-version 1.
workspace_metadata
Runs cargo metadata --no-deps --format-version 1 in root and returns its JSON, for feeding to blast_radius.