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

Twenty-one 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), phase 7’s own four — ts_writes, ts_any, verbatim_origins, verbatim_sites (P7.0/#1296, P7.5/#1307 — see phase 7’s own closing summary in design/archive/retired-tracks.md) — and phase 8’s own two, incremental_query_types and keystroke_latency (P8.0/#1510, settled by #1509’s Q5/ADR 0414 — see design/tracks/incrementality.md §5), plus the IR cutover track’s own adoption probe, unconsumed_ir_items (Slice D3 of #1542 — the gate the 30 August 2026 post-restructuring review’s Part 5 §8 asked for), and the runtime-semantics track’s diagnostic_coverage (#1662, G2 of #1648).

Sixteen 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, verbatim_origins, verbatim_sites, incremental_query_types, unconsumed_ir_items, diagnostic_coverage. Ten of these are zero/closure-shaped — a boolean, or a count pinned at a small, argued floor (ast_importers = 5, emit_abi_shapes = 1). Phase 7’s own four are the same shape: each converged toward an argued floor over dozens of slices, the same trajectory ast_importers had throughout phase 6’s 59 — retired at ts_writes = 809, ts_any = 26, verbatim_origins = 1, verbatim_sites = 2 (phase 7’s own closing summary, design/archive/retired-tracks.md), none the literal 0 first proposed — gated throughout despite the churn that implies, a deliberate call argued in ADR 0389/ADR 0390 (review of #1297), not an oversight of #999 Decision D’s churn-avoidance principle. incremental_query_types is a different shape again — phase 8’s own probe reads a one-time existence proof, not a count trending toward a floor (settled §5/Q5, ADR 0414), re-settled by #1537 to certify that the two levels that never found a consumer stay deleted; see its own doc comment. 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).

Five are count/ratio trend probes, recomputed and printed but never diffed: wildcard_arms, keep_in_sync, test_density, fixture_kinds, keystroke_latency. The first four 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. keystroke_latency moves on nothing yet — settled (Q3/ADR 0414) as staying “not measured” for phase 8’s own whole lifetime, since no scheduler ships this phase to produce a real number; reported anyway so the trajectory’s own §3.0 baseline has a live, CI-computed row.

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 sixteen 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 sixteen 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 sixteen 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.
unasserted_codes
#1662 (track #1648, G2). Registry codes that some test asserts, out of all bynk_syntax::diagnostics::REGISTRY codes, and the count no test asserts.