use std::collections::{HashMap, HashSet};
use std::fs;
use std::path::{Path, PathBuf};
use fuel_dispatch::fkc::{CpuLinkRegistry, import_bundle_str};
use fuel_dispatch::fused::{FusedKernelRegistry, PrecisionGuarantee};
use fuel_dispatch::kernel::KernelBindingTable;
use fuel_ir::DType;
use fuel_ir::dispatch::OpKind;
use fuel_ir::probe::BackendId;
type Key = (OpKind, Vec<DType>, BackendId);
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
struct Coverage {
total: usize,
bit_stable: usize,
}
fn repo_root() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.expect("fuel-dispatch has a parent")
.to_path_buf()
}
fn live_contract_paths() -> HashSet<String> {
const PRODUCTION_REGISTRARS: &[&str] =
&["dispatch.rs", "baracuda_dispatch.rs", "vulkan_dispatch.rs"];
let src = repo_root().join("fuel-dispatch").join("src");
let mut out = HashSet::new();
for file in PRODUCTION_REGISTRARS {
let text = fs::read_to_string(src.join(file)).expect("readable registrar source");
for (i, _) in text.match_indices("include_str!(\"") {
let rest = &text[i + "include_str!(\"".len()..];
let Some(end) = rest.find('"') else { continue };
let literal = &rest[..end];
let Some(pos) = literal.find("kernel-contracts/") else {
continue;
};
let rel = &literal[pos + "kernel-contracts/".len()..];
if rel.ends_with(".fkc.md") {
out.insert(rel.to_string());
}
}
}
out
}
fn assert_derived_set_matches_production(baseline: &HashMap<Key, Coverage>) {
let mut prod = KernelBindingTable::new();
fuel_dispatch::dispatch::register_cpu_kernels(&mut prod);
let prod_keys: HashSet<Key> = prod
.iter_precision()
.map(|(op, dt, be, _)| (op, dt.to_vec(), be))
.collect();
let phantom: Vec<String> = baseline
.keys()
.filter(|k| !prod_keys.contains(*k))
.map(|(op, dt, be)| format!("{op:?} dtypes={dt:?} {be:?}"))
.collect();
assert!(
phantom.is_empty(),
"derived-live-set control FAILED: {} binding key(s) exist in the \
contract-only baseline but NOT in the production table. The \
include_str! derivation is admitting contracts production never \
imports, so the differ is measuring a table that does not ship:\n{}",
phantom.len(),
phantom.join("\n"),
);
}
fn live_cpu_contracts() -> Vec<(String, String)> {
let root = repo_root().join("docs").join("kernel-contracts");
let mut v: Vec<(String, String)> = live_contract_paths()
.into_iter()
.filter(|p| p.starts_with("cpu/"))
.map(|p| {
let text = fs::read_to_string(root.join(&p))
.unwrap_or_else(|e| panic!("live contract {p} must be readable: {e}"));
(p, text)
})
.collect();
v.sort();
v
}
fn is_numeric_bound(value: &str) -> bool {
let v = value.split('#').next().unwrap_or("").trim();
!v.is_empty() && v != "~" && v != "null" && v.parse::<f64>().is_ok()
}
fn field<'a>(lines: &[&'a str], key: &str) -> Option<&'a str> {
lines.iter().find_map(|l| {
let t = l.trim();
t.strip_prefix(key)
.and_then(|r| r.strip_prefix(':'))
.map(|v| v.trim())
})
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum Mode {
Gap058Flip,
StripAllBitStable,
}
fn transform(src: &str, mode: Mode) -> (String, usize) {
let mut out: Vec<String> = Vec::new();
let mut changed = 0usize;
let lines: Vec<&str> = src.lines().collect();
let mut i = 0usize;
while i < lines.len() {
let line = lines[i];
if line.trim_start().starts_with("precision:") {
let base_indent = line.len() - line.trim_start().len();
let mut block_end = i + 1;
while block_end < lines.len() {
let l = lines[block_end];
if l.trim().is_empty() {
break;
}
let ind = l.len() - l.trim_start().len();
if ind <= base_indent {
break;
}
block_end += 1;
}
let block: Vec<&str> = lines[i + 1..block_end].to_vec();
let audited_true = field(&block, "audited")
.map(|v| v.split('#').next().unwrap_or("").trim() == "true")
== Some(true);
let bit_stable_true = field(&block, "bit_stable_on_same_hardware")
.map(|v| v.split('#').next().unwrap_or("").trim() == "true")
== Some(true);
let has_bound = ["max_ulp", "max_relative", "max_absolute"]
.iter()
.any(|k| field(&block, k).is_some_and(is_numeric_bound));
let qualifies = match mode {
Mode::Gap058Flip => audited_true && bit_stable_true && !has_bound,
Mode::StripAllBitStable => bit_stable_true,
};
out.push(line.to_string());
if qualifies {
changed += 1;
for l in &block {
let t = l.trim_start();
let rewritten = match mode {
Mode::Gap058Flip if t.starts_with("audited:") => {
Some(l.replace("audited: true", "audited: false"))
}
Mode::StripAllBitStable
if t.starts_with("bit_stable_on_same_hardware:") =>
{
Some(l.replace(
"bit_stable_on_same_hardware: true",
"bit_stable_on_same_hardware: false",
))
}
_ => None,
};
out.push(rewritten.unwrap_or_else(|| l.to_string()));
}
} else {
for l in &block {
out.push(l.to_string());
}
}
i = block_end;
continue;
}
out.push(line.to_string());
i += 1;
}
let mut text = out.join("\n");
if src.ends_with('\n') {
text.push('\n');
}
(text, changed)
}
fn build_table(contracts: &[(String, String)]) -> KernelBindingTable {
let mut table = KernelBindingTable::new();
let mut fused = FusedKernelRegistry::new();
for (path, text) in contracts {
let provider = import_bundle_str(text, &CpuLinkRegistry)
.unwrap_or_else(|e| panic!("contract {path} must import: {e:?}"));
provider
.register_into(&mut table, &mut fused)
.unwrap_or_else(|e| panic!("contract {path} must register: {e:?}"));
}
table
}
fn coverage(table: &KernelBindingTable) -> HashMap<Key, Coverage> {
let mut map: HashMap<Key, Coverage> = HashMap::new();
for (op, dtypes, backend, precision) in table.iter_precision() {
let e = map.entry((op, dtypes.to_vec(), backend)).or_default();
e.total += 1;
if precision.bit_stable_on_same_hardware {
e.bit_stable += 1;
}
}
map
}
fn keys_losing_last_bit_stable(
before: &HashMap<Key, Coverage>,
after: &HashMap<Key, Coverage>,
) -> Vec<String> {
let mut lost: Vec<String> = before
.iter()
.filter(|(_, c)| c.bit_stable > 0)
.filter(|(k, _)| after.get(*k).map(|c| c.bit_stable).unwrap_or(0) == 0)
.map(|((op, dt, be), c)| {
format!(
"{op:?} dtypes={dt:?} {be:?} (was {}/{})",
c.bit_stable, c.total
)
})
.collect();
lost.sort();
lost
}
#[test]
fn gap_077_bit_stable_coverage_under_simulated_gap_058_flip() {
let contracts = live_cpu_contracts();
assert!(
contracts.len() >= 15,
"C1 FAILED: only {} live CPU contracts discovered — the include_str! \
scan is broken, and every downstream 'no loss' verdict would be vacuous",
contracts.len(),
);
let (flipped, gap058_changed): (Vec<(String, String)>, usize) = {
let mut v = Vec::new();
let mut n = 0;
for (p, t) in &contracts {
let (text, c) = transform(t, Mode::Gap058Flip);
n += c;
v.push((p.clone(), text));
}
(v, n)
};
let (sabotaged, sabotage_changed): (Vec<(String, String)>, usize) = {
let mut v = Vec::new();
let mut n = 0;
for (p, t) in &contracts {
let (text, c) = transform(t, Mode::StripAllBitStable);
n += c;
v.push((p.clone(), text));
}
(v, n)
};
assert!(
gap058_changed > 0,
"C3 FAILED: the GAP-058 selector matched 0 sections. An unflipped \
'flip' produces two identical tables and a guaranteed 'no loss' \
verdict that means nothing.",
);
assert!(
sabotage_changed >= gap058_changed,
"C3 FAILED: the sabotage arm ({sabotage_changed}) must strip at least \
as many sections as the GAP-058 arm ({gap058_changed}) — it is a \
strict superset by construction (every qualifying section is \
bit-stable). A smaller count means the selectors disagree.",
);
let base = build_table(&contracts);
let after_flip = build_table(&flipped);
let after_sabotage = build_table(&sabotaged);
let cov_base = coverage(&base);
let cov_flip = coverage(&after_flip);
let cov_sabotage = coverage(&after_sabotage);
let entries: usize = cov_base.values().map(|c| c.total).sum();
let bit_stable_entries: usize = cov_base.values().map(|c| c.bit_stable).sum();
assert!(
cov_base.len() >= 50 && entries >= 100,
"C1 FAILED: loaded table is trivial ({} keys / {entries} entries). \
A differ over an empty table reports 'no loss' unconditionally.",
cov_base.len(),
);
assert_derived_set_matches_production(&cov_base);
assert_differ_discriminates();
let lost_by_flip = keys_losing_last_bit_stable(&cov_base, &cov_flip);
let lost_by_sabotage = keys_losing_last_bit_stable(&cov_base, &cov_sabotage);
assert!(
bit_stable_entries > 0,
"the corpus is degenerate again: 0 of {entries} contract-derived CPU entries are bit-stable. Every verdict below would then hold for the WRONG reason — no key can lose a candidate it never had — and would be indistinguishable from a clean result. Either the ledger lost its CPU records or the query key drifted; do not relax this.",
);
let unaudited_notes = PrecisionGuarantee::UNAUDITED.notes;
let unaudited_entries = base
.iter_precision()
.filter(|(_, _, _, p)| p.notes == unaudited_notes)
.count();
let downgrade_warnings = count_downgrade_warnings(&contracts);
assert!(
downgrade_warnings == 0 || unaudited_entries > 0,
"{downgrade_warnings} downgrade warning(s) but {unaudited_entries} UNAUDITED entries — a downgrade collapses a guarantee to the UNAUDITED sentinel, so warnings without unaudited entries means the downgrade is not landing",
);
eprintln!(
"GAP-226 (entry level): {} backed, {unaudited_entries} UNAUDITED with {downgrade_warnings} downgrade warnings — the UNAUDITED entries that were never downgraded declare no machine-checkable claim at all, so nothing rejects them and no census of downgrades can see them.",
entries - unaudited_entries,
);
assert_eq!(
unaudited_entries + bit_stable_entries,
entries,
"expected the ledger gate to partition every contract-derived CPU entry \
into exactly two classes — backed (bit-stable survives) or downgraded \
(UNAUDITED sentinel). {unaudited_entries} + {bit_stable_entries} != \
{entries} means a third class exists and every count here is over an \
incomplete population",
);
eprintln!("\n=== GAP-077 bit-stable coverage differ ===");
eprintln!("scope : CPU contracts only ({} files)", contracts.len());
eprintln!(" (CUDA/Vulkan link registries are feature-gated;");
eprintln!(" FKC-4.8-0001 is a fuel-cpu-backend commitment)");
eprintln!("binding keys : {}", cov_base.len());
eprintln!("entries : {entries}");
eprintln!("bit-stable : {bit_stable_entries} / {entries}");
eprintln!("UNAUDITED : {unaudited_entries} / {entries}");
eprintln!("ledger downgrades: {downgrade_warnings} warnings at import");
eprintln!("GAP-058 flipped : {gap058_changed} sections");
eprintln!("sabotage stripped: {sabotage_changed} sections");
eprintln!("--- verdict ---");
eprintln!(
"keys losing last bit-stable candidate under the flip : {}",
lost_by_flip.len()
);
eprintln!(
"keys losing last bit-stable candidate under sabotage : {}",
lost_by_sabotage.len()
);
eprintln!(
"coverage map identical (baseline vs flipped) : {}",
cov_base == cov_flip
);
if bit_stable_entries == 0 {
eprintln!("READ THIS AS: no key loses its last bit-stable candidate because");
eprintln!("NO KEY HAS ONE TO LOSE — the flip would be inert by absence.");
} else {
eprintln!("READ THIS AS: {bit_stable_entries} of {entries} entries are ledger-backed,");
eprintln!("so the flip is NOT inert. Applying it would strip the last bit-stable");
eprintln!("candidate from {} key(s).", lost_by_flip.len());
}
eprintln!("===========================================\n");
assert_eq!(
lost_by_sabotage.len(),
bit_stable_entries,
"stripping bit-stability wholesale cost {} key(s) while {bit_stable_entries} \
entries are ledger-backed. These must be equal by construction: every backed \
key has exactly one candidate to lose. A difference means the coverage map \
and the differ disagree about what 'backed' means.",
lost_by_sabotage.len(),
);
assert!(
lost_by_flip.len() <= lost_by_sabotage.len(),
"the GAP-058 flip ({}) strips MORE keys than wholesale sabotage ({}) — \
sabotage is an upper bound by construction, so the flip is reaching entries \
it has no business touching",
lost_by_flip.len(),
lost_by_sabotage.len(),
);
assert!(
!lost_by_flip.is_empty(),
"the flip is inert again: it strips the last bit-stable candidate from no key, \
while {bit_stable_entries} entries are backed. Either the selector stopped \
matching or the backing moved out from under it — both make every verdict \
here vacuous for the reason this harness exists to catch."
);
assert_ne!(
cov_base, cov_flip,
"the flip no longer changes per-key coverage at all. With {bit_stable_entries} \
backed entries that cannot be right — it would mean the flip stopped selecting \
anything, and the verdicts above would go green for exactly the reason this \
harness exists to catch.",
);
}
fn assert_differ_discriminates() {
let key: Key = (OpKind::AddElementwise, vec![DType::F32], BackendId::Cpu);
let other: Key = (OpKind::MatMul, vec![DType::F32], BackendId::Cpu);
let before: HashMap<Key, Coverage> = HashMap::from([
(
key.clone(),
Coverage {
total: 2,
bit_stable: 1,
},
),
(
other.clone(),
Coverage {
total: 1,
bit_stable: 1,
},
),
]);
let after_loss: HashMap<Key, Coverage> = HashMap::from([
(
key.clone(),
Coverage {
total: 2,
bit_stable: 0,
},
),
(
other.clone(),
Coverage {
total: 1,
bit_stable: 1,
},
),
]);
let lost = keys_losing_last_bit_stable(&before, &after_loss);
assert_eq!(
lost.len(),
1,
"C4 FAILED (positive): a constructed loss of the last bit-stable \
candidate was not reported. The differ cannot see the event it \
exists to detect, so every 'no loss' verdict it produces is empty.",
);
let lost_none = keys_losing_last_bit_stable(&before, &before);
assert!(
lost_none.is_empty(),
"C4 FAILED (negative): the differ reported losses between a map and \
ITSELF, so it is stuck at yes and its verdicts carry no information.",
);
let before_two: HashMap<Key, Coverage> = HashMap::from([(
key.clone(),
Coverage {
total: 3,
bit_stable: 2,
},
)]);
let after_one: HashMap<Key, Coverage> = HashMap::from([(
key,
Coverage {
total: 3,
bit_stable: 1,
},
)]);
assert!(
keys_losing_last_bit_stable(&before_two, &after_one).is_empty(),
"C4 FAILED (boundary): a 2→1 reduction was reported as losing the \
LAST bit-stable candidate. The differ is answering a broader \
question than FKC-4.8-0001 asks, and would over-report.",
);
}
#[test]
fn gap_225_what_actually_blocks_the_downgraded_cpu_entries() {
let contracts = live_cpu_contracts();
let mut by_claim_set: Vec<(String, usize)> = Vec::new();
let mut total = 0usize;
let mut unparsed = 0usize;
for (path, text) in &contracts {
let provider = import_bundle_str(text, &CpuLinkRegistry)
.unwrap_or_else(|e| panic!("contract {path} must import: {e:?}"));
for w in provider
.warnings
.iter()
.filter(|w| w.message.contains("downgraded to UNAUDITED"))
{
total += 1;
let set = match (w.message.find('['), w.message.find(']')) {
(Some(a), Some(b)) if b > a => w.message[a..=b].to_string(),
_ => {
unparsed += 1;
continue;
}
};
match by_claim_set.iter_mut().find(|(k, _)| *k == set) {
Some((_, n)) => *n += 1,
None => by_claim_set.push((set, 1)),
}
}
}
by_claim_set.sort_by(|a, b| b.1.cmp(&a.1).then(a.0.cmp(&b.0)));
let mut revs: Vec<String> = Vec::new();
for (path, text) in &contracts {
let provider = import_bundle_str(text, &CpuLinkRegistry)
.unwrap_or_else(|e| panic!("contract {path} must import: {e:?}"));
for w in provider
.warnings
.iter()
.filter(|w| w.message.contains("downgraded to UNAUDITED"))
{
if let Some(i) = w.message.find("rev ") {
let rest = &w.message[i + 4..];
let end = rest.find(')').unwrap_or(rest.len());
revs.push(rest[..end].to_string());
}
}
}
let distinct: std::collections::HashSet<&String> = revs.iter().collect();
eprintln!(
"[gap-225] warnings carry {} rev values, {} distinct -> {} per registration",
revs.len(),
distinct.len(),
if revs.len() == distinct.len() {
"ONE"
} else {
"MORE THAN ONE"
}
);
eprintln!(
"[gap-225] downgrade warnings over {} CPU contracts: {total}",
contracts.len()
);
for (set, n) in &by_claim_set {
eprintln!("[gap-225] {n:>4} unbacked {set}");
}
eprintln!("[gap-225] the bit-stable-blocked class, by kernel:");
let mut named: Vec<String> = Vec::new();
for (path, text) in &contracts {
let provider = import_bundle_str(text, &CpuLinkRegistry)
.unwrap_or_else(|e| panic!("contract {path} must import: {e:?}"));
for w in provider.warnings.iter().filter(|w| {
w.message.contains("downgraded to UNAUDITED")
&& w.message.contains("[\"bit_stable_on_same_hardware\"]")
}) {
let dt = w
.message
.find("dtypes ")
.map(|i| {
let rest = &w.message[i + 7..];
let end = rest.find(']').map(|e| e + 1).unwrap_or(rest.len());
rest[..end].to_string()
})
.unwrap_or_default();
named.push(format!("{path} {dt}"));
}
}
named.sort();
for n in &named {
eprintln!("[gap-225] {n}");
}
eprintln!(
"[gap-225] UNMEASURED: the ENTRY-level size of each class. A warning is neither per-section nor per-registration ({} warnings / {} distinct revs), so these counts cannot be converted to entries. The subtraction-derived \"424 max_ulp-blocked entries\" is NOT this population. Left visible rather than estimated.",
revs.len(),
distinct.len(),
);
assert_eq!(
total, 0,
"{total} declared CPU claim(s) are unbacked again. Either a contract added a \
claim without a ledger record earning it, or a kernel revision changed and \
invalidated one — the ledger keys on the revision hash, so an edit silently \
un-earns every claim for that kernel. The per-claim tally above says which."
);
assert_eq!(
unparsed, 0,
"{unparsed} of {total} downgrade warnings did not contain a bracketed claim list — the message format changed and every tally above is over a subset of the population"
);
}
#[test]
fn gap_225_family_split_of_the_remaining_max_ulp_downgrades() {
let contracts = live_cpu_contracts();
let mut by_op: Vec<(String, usize)> = Vec::new();
let mut total = 0usize;
let mut unattributed = 0usize;
for (path, text) in &contracts {
let provider = import_bundle_str(text, &CpuLinkRegistry)
.unwrap_or_else(|e| panic!("contract {path} must import: {e:?}"));
let mut rev_to_op: HashMap<u64, String> = HashMap::new();
for prim in &provider.primitives {
rev_to_op.insert(
prim.revision.0,
format!("{:?} {:?}", prim.op, prim.dtypes.as_slice()),
);
}
for w in provider.warnings.iter().filter(|w| {
w.message.contains("downgraded to UNAUDITED") && w.message.contains("max_ulp")
}) {
total += 1;
let rev = w.message.find("rev ").and_then(|i| {
let rest = &w.message[i + 4..];
let end = rest.find(')').unwrap_or(rest.len());
rest[..end].parse::<u64>().ok()
});
let key = match rev.and_then(|r| rev_to_op.get(&r)) {
Some(k) => k.clone(),
None => {
unattributed += 1;
continue;
}
};
let op = key.split_whitespace().next().unwrap_or("?").to_string();
match by_op.iter_mut().find(|(k, _)| *k == op) {
Some((_, n)) => *n += 1,
None => by_op.push((op, 1)),
}
}
}
by_op.sort_by(|a, b| b.1.cmp(&a.1).then(a.0.cmp(&b.0)));
eprintln!("[gap-225-split] {total} max_ulp downgrades, by op:");
for (op, n) in &by_op {
eprintln!("[gap-225-split] {n:>3} {op}");
}
eprintln!("[gap-225-split] unattributed (rev not found among primitives): {unattributed}");
eprintln!(
"[gap-225-split] NOTE: every `max_ulp` line in the contracts owning these {total} declares `max_ulp: 0`, several with an inline reason (\"exact: f32 is a strict subset of f64\"). That is a measurement of CONTRACT TEXT LINES, not of declarations per downgraded entry — the lowered value is unavailable after `import_bundle_str`, which gates before returning. Stated as the weaker construct it is."
);
assert_eq!(
total, 0,
"{total} max_ulp downgrade(s) are back. The per-op split above names them; a \
kernel revision change is the usual cause, because the ledger keys on the \
revision hash and an edit un-earns every claim for that kernel."
);
assert_eq!(
unattributed, 0,
"{unattributed} of {total} warnings could not be attributed to an op by revision hash. The split above is then over a subset, and the missing ones are invisible in it"
);
}
fn count_downgrade_warnings(contracts: &[(String, String)]) -> usize {
contracts
.iter()
.map(|(path, text)| {
let provider = import_bundle_str(text, &CpuLinkRegistry)
.unwrap_or_else(|e| panic!("contract {path} must import: {e:?}"));
provider
.warnings
.iter()
.filter(|w| w.message.contains("downgraded to UNAUDITED"))
.count()
})
.sum()
}
#[test]
fn gap_077_where_cpu_bit_stability_actually_comes_from() {
let mut table = KernelBindingTable::new();
fuel_dispatch::dispatch::register_cpu_kernels(&mut table);
let fill_notes = PrecisionGuarantee::PRIMITIVE_DETERMINISTIC_CPU.notes;
let unaudited_notes = PrecisionGuarantee::UNAUDITED.notes;
let (mut cpu, mut bit_stable, mut from_fill, mut still_unaudited) = (0, 0, 0, 0);
for (_, _, backend, p) in table.iter_precision() {
if backend != BackendId::Cpu {
continue;
}
cpu += 1;
if p.bit_stable_on_same_hardware {
bit_stable += 1;
if p.notes == fill_notes {
from_fill += 1;
}
}
if p.notes == unaudited_notes {
still_unaudited += 1;
}
}
assert!(cpu > 0, "C1: no CPU entries loaded — nothing was measured");
assert!(
bit_stable > 0,
"C2: no CPU entry is bit-stable; FKC-4.8-0001 could not hold",
);
{
use fuel_dispatch::kernel::OpParams;
use fuel_ir::{Layout, Result};
use fuel_memory::Storage;
use std::sync::{Arc, RwLock};
fn noop(
_i: &[Arc<RwLock<Storage>>],
_o: &mut [Arc<RwLock<Storage>>],
_l: &[Layout],
_p: &OpParams,
) -> Result<()> {
Ok(())
}
let explicit = PrecisionGuarantee {
bit_stable_on_same_hardware: true,
max_ulp: Some(0),
max_relative: None,
max_absolute: None,
notes: "control: an explicit contract-style claim, not the fill default",
};
let mut t = KernelBindingTable::new();
t.register_with_precision(
OpKind::AddElementwise,
&[DType::F32],
BackendId::Cpu,
noop,
explicit,
);
t.fill_unset_cpu_precision(PrecisionGuarantee::PRIMITIVE_DETERMINISTIC_CPU);
let classified_from_fill = t
.iter_precision()
.filter(|(_, _, be, p)| *be == BackendId::Cpu && p.notes == fill_notes)
.count();
assert_eq!(
classified_from_fill, 0,
"C2b FAILED: an entry registered with an EXPLICIT precision claim \
was classified as 'owed to the bulk fill'. The discriminator is \
stuck at yes, so the {from_fill}-of-{bit_stable} headline below \
would be an artefact of the predicate rather than a measurement.",
);
}
eprintln!("\n=== GAP-077 provenance of CPU bit-stability ===");
eprintln!("CPU entries : {cpu}");
eprintln!("bit-stable : {bit_stable}");
eprintln!(" ...owed to bulk fill : {from_fill}");
eprintln!(" ...from a contract : {}", bit_stable - from_fill);
eprintln!("still UNAUDITED : {still_unaudited}");
eprintln!("===============================================\n");
}