Expand description
cargo xtask greenfield-status — the probe harness (track doc §8, proposal #999).
Twenty-seven 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), and the
crate-hygiene track’s M-3 ratchet, model_readers_beyond_emit (B1, #2939), and its H-3 gate,
unused_deps (A4, #2976).
Thirty-four 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, model_readers_beyond_emit, unused_deps, explained_codes, ts_raw_sites_emit, ts_raw_sites_testgen, ts_text_idents, emit_thread_locals, emit_silent_fallbacks, emit_print_calls, testgen_print_calls, import_prediction_fns, node_builder_defs, deploy_kind_accessors, env_protocol_literals, tool_spawn_sites, deploy_ledger_writes, binding_kind_homes, wrangler_key_literals, cloudflare_client_sites. 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).
Two kinds of gate (#3679, amending ADR 0389/0390). Every gated probe is
exact-match: a live reading that differs from its committed row fails unless a
pending file names it in probes:. The GROWTH_PROBES (ts_writes, ts_any,
emit_abi_shapes, verbatim_sites, ts_raw_sites_emit, ts_raw_sites_testgen, ts_text_idents, span_keyed_maps, emit_thread_locals, emit_silent_fallbacks, emit_print_calls, testgen_print_calls, import_prediction_fns, node_builder_defs, deploy_kind_accessors, env_protocol_literals, tool_spawn_sites, deploy_ledger_writes, binding_kind_homes, wrangler_key_literals, cloudflare_client_sites) are also directional:
growth_probes_never_rise (xtask/tests/greenfield_status.rs) fails when the
live leading count exceeds the committed one unless a pending file raises the
probe with a reason (raises:), which the stamp then records in
design/greenfield-status-raises.md. A fall needs only probes:. In CI the
direction is also checked against the table at the PR’s base revision
(greenfield-status --check-growth, check_growth), so hand-editing a
committed growth row upward does not launder a rise.
A disagreement a pending file acknowledges (its probes key) does not fail the
gate: the increment leaves the shared table alone and cargo xtask stamp --apply
rewrites the gated rows on main in merge order (refresh_gated_rows). The
acknowledgement still has to be written, and reviewed, in the PR — a gated probe
still cannot move silently — but parallel PRs no longer conflict on these rows.
Who refreshes which rows. The stamp rewrites the gated rows only (it never pays
for the trend probes’ workspace-wide clippy pass). The trend rows are rewritten by
the weekly .github/workflows/greenfield-trends.yml, which runs
cargo xtask greenfield-status --trend-only --apply (refresh_trend_rows) and
opens one rolling PR from the bot branch bot/greenfield-trends; a person can run
the same command locally. A full --apply still rewrites everything.
Six are count/ratio trend probes, recomputed and printed but never diffed:
wildcard_arms, keep_in_sync, test_density, fixture_kinds,
keystroke_latency, module_lines (production lines per source file, #3683). The first four, and module_lines too, 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§
- Growth
Rise - A growth probe whose live count exceeds the committed one.
- Probe
- One probe’s result.
gatedprobes are diffed against the committed table bycrate::greenfield_status::gated_disagreements; the rest are reported only. - Report
Constants§
- GATED_
PROBES - The gated probes’ names, in
run_gated’s order — what a pending file’sprobeskey may cite.greenfield_status_table_is_currentasserts this matches the probesrun_gatedactually returns, so the two cannot drift. - GROWTH_
PROBES - The gated probes that only a reasoned, recorded
raises:may increase (#3679, ADR 0389/0390 amended):ts_writes,ts_any,emit_abi_shapes,verbatim_sites,ts_raw_sites_emitandts_raw_sites_testgen(the split ofts_raw_sites, #3681),ts_text_idents(#3681),span_keyed_maps,emit_thread_locals(1A.19),emit_silent_fallbacks(1A.34),emit_print_calls(1A.35b),testgen_print_calls(1B.2a),import_prediction_fns(1A.36a),node_builder_defs(1B.4a),deploy_kind_accessors(1D.1a),env_protocol_literals(1D.5a),tool_spawn_sites(1D.5b),deploy_ledger_writes(1D.2a),binding_kind_homes(1C.1b),wrangler_key_literals(1C.2),cloudflare_client_sites(1D.3a). Probes already at a zero or closure floor are excluded (their exact-match row pins them), as areverbatim_origins(an argued floor of 2) andmodel_readers_beyond_emit(which has the opposite direction). A subset ofGATED_PROBES, pinned by a unit test.
Functions§
- check_
growth - The one growth-direction check, shared by
growth_probes_never_rise(base = the working-tree table) andcargo xtask greenfield-status --check-growth(base = the table at the PR’s base revision, so a hand-edited row cannot launder a rise). Compareslive’s growth probes withbase_table’s rows and requires a pending file underroottoraises:each rise. - committed_
reading - The committed reading of gated probe
namein the table textcommitted. - explained_
codes_ count - The leading count of an
explained_codesreading (explained=N (of M)). - 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 twenty-one gated probes, so checking currency never pays forwildcard_arms’s workspace-wide clippy pass. For a caller that has already run the full report (e.g. to print it), usegated_disagreements_ininstead so the twenty-one gated probes aren’t computed a second time. - gated_
disagreements_ in - Like
gated_disagreements, but diffsprobes(typically aReport’s.probes, already computed) instead of re-running the gated probes. - growth_
rises - Every
GROWTH_PROBESmember whose live leading count inprobesis higher than its committed row’s incommitted(the table text).Errlists every growth probe whose live or committed reading is missing or has no leading integer: that is a hard failure, never a skip (a probe that stopped reporting a count must not quietly leave the ratchet). A growth probe with no row at all incommittedis newly introduced and is skipped (#3681): it is checked from the first time its row exists. - leading_
count - The leading integer of a reading such as
104 (bynk-browser.ts:Claim, …): the first whitespace-separated token, parsed.Noneif it is not an integer. The shared parser behindmodel_readers_countandgrowth_rises. - model_
readers_ count - The leading count of a
model_readers_beyond_emitreading, which is what the floor test compares.Noneif the reading doesn’t start with a count. - refresh_
for_ stamp - The stamp’s refreshed table:
refresh_gated_rows, but only if every gated probe whose live reading differs fromcommittedis named by one of the increments being stamped (acknowledged— the union of theirprobes). - refresh_
gated_ rows committed(the table’s current text) with every gated row’s reading replaced byprobes’ live one; trend rows, prose and the rule-ledger pointer are left exactly as committed, so the stamp never pays for the trend probes’ workspace-wide clippy pass. Errors naming any gated probe with no row to rewrite — a table that has lost a row needs a fullcargo xtask greenfield-status --apply, not a silent append.- refresh_
trend_ rows committed(the table’s current text) with every trend row’s reading replaced byprobes’ live one: the mirror ofrefresh_gated_rows. Gated rows, prose and the rule-ledger pointer are left exactly as committed, so the weekly trend-refresh workflow (.github/workflows/greenfield-trends.yml) and the stamp never write the same lines.- render_
table - The committed table: a plain Markdown table, probe name → gated?/reads, plus a
pointer to the rule ledger
stamp::applywrites (#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 twenty-one 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. - run_
gated - The thirty-four gated (zero/closure/ratchet) probes only — what
gated_disagreementsdiffs. - run_
trend - The six reported-only trend probes — never diffed, and notably including the one
(
wildcard_arms) that shells out to a fullcargo clippy --workspacepass, which the gating test must not pay for on every run. - table_
path design/greenfield-status.md— the committed table this probe set regenerates.- unacknowledged
- The disagreements no pending file acknowledges — what actually fails the gate.
- unasserted_
codes - #1662 (track #1648, G2). Registry codes that some test asserts, out of all
bynk_syntax::diagnostics::REGISTRYcodes, and the count no test asserts. - unraised
- The
risesno pending fileraised— the ones that must fail the gate.