Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .trinity/seals/numeric_FormatsCatalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"gen_hash_zig": "sha256:4ff0cb150da5ddd382f9250eeb27ffa87b68f9547f5341591f896869f42bee1f",
"module": "FormatsCatalog",
"ring": 12,
"sealed_at": "2026-08-19T13:19:46Z",
"sealed_by": "t27c-bootstrap@0.1.0",
"spec_hash": "sha256:cb76d3584f1242c88973b6995d861b8bdb739401373ad73b6b8e7be05e470162",
"sealed_at": "2026-08-29T07:18:37Z",
"sealed_by": "t27c-bootstrap@0.2.0",
"spec_hash": "sha256:002100f24185da32f8e3ec26202b3f8bd5bcb5ffb6e58b0f29f96a4c572b9ff2",
"spec_path": "specs/numeric/formats_catalog.t27"
}
49 changes: 48 additions & 1 deletion bootstrap/src/catalog_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ pub fn run(catalog: &Path, specs_root: &Path) -> std::io::Result<Report> {
});
}

// W701: ids in cluster=GoldenFloat that state no generating rule. Collected
// here and reported as ONE finding, not one per record: seventeen records
// sharing a single unstated fact is one fact.
let mut rule_unstated: Vec<String> = Vec::new();
for rec in &records {
let name = match rec.shape {
Shape::FixedLayout => "FixedLayout",
Expand Down Expand Up @@ -383,7 +387,34 @@ pub fn run(catalog: &Path, specs_root: &Path) -> std::io::Result<Report> {
}

// -- the GoldenFloat generating rule ---------------------------
if rec.fields.get("cluster").map(|c| c == "GoldenFloat") == Some(true) {
//
// W701: the rule is scoped by a DECLARED `rule=` field, not by the
// cluster label.
//
// `cluster=GoldenFloat` holds 47 shape-eligible records and three
// different generating rules. Measured: every gf* and gft* record
// satisfies e = round((bits-1)/phi^2) -- 8 of 8 at the published
// widths -- while bnf* and tnf* grow the exponent LOGARITHMICALLY
// with width (tnf: e ~ log2(bits) + 1; gf1024 is e=391, tnf1024 is
// e=11). Applying the phi rule to them produced 41 of this gate's 42
// findings, and not one of them was a defect a record could fix.
//
// `tnf8` satisfies the rule and is still NOT marked: at 8 bits the
// logarithmic and phi ladders coincide, and encoding a coincidence
// at one width as a design decision is how a catalog acquires a
// second wrong rule.
//
// A record in this cluster with no `rule=` is COUNTED, not passed
// over. A skip nobody counts is the shape this whole gate exists to
// refuse.
let declares_phi = rec.fields.get("rule").map(|r| r == "phi-ratio") == Some(true);
if rec.fields.get("cluster").map(|c| c == "GoldenFloat") == Some(true)
&& !declares_phi
{
*r.checked.entry("gf-rule-unstated").or_insert(0) += 1;
rule_unstated.push(rec.id.clone());
}
if declares_phi {
*r.checked.entry("gf-closed-form").or_insert(0) += 1;
let e_rule = (((b - 1) as f64) / PHI2).round() as i64;
if e != e_rule || m != b - 1 - e_rule {
Expand Down Expand Up @@ -506,6 +537,22 @@ pub fn run(catalog: &Path, specs_root: &Path) -> std::io::Result<Report> {
}
}
}
// W701: one finding for the whole set. The phi checks did not run on these,
// and a check that did not run must say so out loud -- reporting nothing
// would be the same silence this gate was written to end, one level up.
if !rule_unstated.is_empty() {
rule_unstated.sort();
r.findings.push(Finding {
id: "(cluster)".into(),
check: "gf-rule-unstated",
detail: format!(
"{} record(s) in cluster=GoldenFloat state no `rule=`, so the phi \
checks did not run on them: {}",
rule_unstated.len(),
rule_unstated.join(", ")
),
});
}
let emitted_dir = catalog
.parent()
.and_then(|p| p.parent())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NOW -- Forty of forty-two gate failures were one rule applied to two families that say they do not follow it (2026-08-29)

## Forty of forty-two gate failures were one rule applied to two families that say they do not follow it (Refs #2762)

- catalog gate applied e = round((bits-1)/phi^2) to every cluster=GoldenFloat record; 41 of its 42 findings were bnf* and tnf*
- the records say it themselves: bnf8 standard= reads 'exponent sized for range not phi', tnf8 reads 'e is 3 balanced-ternary TRITS not bits; width rule 1+Et+M=N'
- gft* states the opposite in the same field -- 'GOLDEN RATIO axis: E_t = round((N-1)/phi^2)' -- so the split comes from the data, not from my judgement
- scope is now a declared rule=phi-ratio on 30 records; the 17 without one are reported as ONE loud finding, not passed over. GATE FAILURES 42 -> 2
2 changes: 1 addition & 1 deletion docs/reports/suite_expectations.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema_version": 1,
"generated_by": "t27c suite --bless-expectations",
"max_gate_failures": 42,
"max_gate_failures": 2,
"max_entries": 166,
"entries": [
{
Expand Down
Loading
Loading