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).

Fifteen probes measuring the tree against design/bynk-greenfield-compiler.md: the twelve in track doc §8, 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), and ts_writes/ts_any (phase 7’s own probes, P7.0/#1296 — design/tracks/the-typescript-tree.md §5).

Eleven are gated, 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, ts_writes, ts_any. Nine of these are zero/closure-shaped — a boolean, or a count pinned at a small, argued floor (ast_importers = 5, emit_abi_shapes = 1). ts_writes/ts_any are not: they read 1641/55, converging toward a floor named at the-typescript-tree.md’s own retirement over dozens of slices, the same shape ast_importers had throughout phase 6’s 59 — gated despite the churn that implies, a deliberate call argued in design/pending/p7-0-ts-writes-ts-any-probes.md’s own ADR (review of #1297), not an oversight of #999 Decision D’s churn-avoidance principle. 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 with no slice actively driving them toward a floor (§8 calls two of them “trends, not gates”); hard-gating them would make the committed table churn, and conflict, on routine work for no corresponding benefit.

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 thirteen 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 thirteen 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 thirteen 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.