pub fn unasserted_codes(root: &Path) -> Vec<&'static str>Expand description
#1662 (track #1648, G2). Registry codes that some test asserts, out of all
bynk_syntax::diagnostics::REGISTRY codes, and the count no test asserts.
Static, so it runs inside this harness: the review that set the baseline
(2026-10-01, #1647 Part 4) instrumented CompileError::new across a full
cargo test --workspace, which this harness cannot afford. Asserted is a
subset of produced (a passing test that names a code saw it), so driving the
unasserted count to the argued floor meets “every reachable code is produced
by a test” a fortiori.
A code counts as asserted when it appears in:
- line 1 of a negative fixture’s
expected_error.txt(line 2 is a message substring and may quote other codes); - any other non-
.bynkfile under a crate’stests/directory (test sources, expected-diagnostics files, JSON goldens)..bynksources are skipped, because their comments often name the code they provoke, and Rust sources are read with their//comments removed, for the same reason; - a
#[cfg(test)] modblock in a crate’ssrc/, comments removed; - a blessed diagnostic transcript,
site/src/diagnostics/*.txt.
Gated at the argued floor of 4 (#1662 Decision B). Each of the four is emitted where no compiler test can reach it:
bynk.deploy.contract_skew:bynk deploy, against a live deployment’s lock;bynk.project.read_failed: only when a host’s file overlay omits a discovered file, which neither the CLI nor the LSP does;bynk.target.vendor_conflict: needs platform-native capabilities from two platforms, and only Cloudflare ships any today (the decision function is unit-tested);bynk.wasm.strip_failed: stripping the compiler’s own emitted TypeScript, which fails only on an emitter bug.
cargo xtask greenfield-status --list-unasserted prints the codes.