Skip to main content

Module greenfield_status

Module greenfield_status 

Source
Expand description

cargo xtask greenfield-status — the probe harness (track doc §8, proposal #999).

Thirteen probes measuring the tree against design/bynk-greenfield-compiler.md: the twelve in track doc §8, plus emit_abi_shapes (ADR 0310’s probe, #999 Decision E — this slice measures the emit-ABI enumeration guard but does not wire it; wiring is packaging-track work).

Nine are zero/closure probes, committed and diffed: workspace_lints, fs_below_driver, options_sources, hoist_sinks, span_keyed_maps, emit_diagnostics, ide_emit_edge, ast_importers, emit_abi_shapes. A disagreement between a fresh run and the committed table fails greenfield_status_table_is_current (xtask/tests/greenfield_status.rs), which rides both the test job (cargo test --workspace, any Rust-touching PR) and the drift job’s existing cargo test -p xtask (pending/decisions-only PRs) — no new CI wiring (#999 Decision D, which also explains why a drift-job step would have been silently skipped on the PRs that move these probes most).

Four are count/ratio trend probes, recomputed and printed but never diffed: wildcard_arms, keep_in_sync, test_density, fixture_kinds. These move on nearly any ordinary Rust PR (§8 calls two of them “trends, not gates”); hard-gating them would make the committed table churn, and conflict, on routine work.

Closes-Rule: rule-id provenance (#999 Decision B) is deferred to a follow-on slice — the committed table below carries no rule-citation column yet.

Structs§

Probe
One probe’s result. gated probes are diffed against the committed table by crate::greenfield_status::gated_disagreements; the rest are reported only.
Report

Functions§

gated_disagreements
Every gated probe whose live reading disagrees with the committed table’s, as (probe name, committed, live). Trend probes are never compared, and never computed here — this only runs the nine gated probes, so checking currency never pays for wildcard_arms’s workspace-wide clippy pass. For a caller that has already run the full report (e.g. to print it), use gated_disagreements_in instead so the nine gated probes aren’t computed a second time.
gated_disagreements_in
Like gated_disagreements, but diffs probes (typically a Report’s .probes, already computed) instead of re-running the gated probes.
render_table
The committed table: a plain Markdown table, probe name → gated?/reads, plus a pointer to the rule ledger stamp::apply writes (#1001).
run
Run every probe against the tree rooted at root (the repo root). Used by the CLI’s full report; the gating test uses the nine gated probes alone (gated_disagreements) so it never pays for a workspace-wide clippy pass (wildcard_arms) just to check the probes that are actually diffed.
table_path
design/greenfield-status.md — the committed table this probe set regenerates.