Repository navigation
Conversation
…e no row registers compiles from source One renderer writes the #define header from a Geometry, for build.rs and for the open. A registered row's rendered text is the text build.rs writes, byte for byte. The kernels' holds become Geometry::check, a named refusal at open. A geometry every kernel takes but no row registers opens on the source path, and the binaries say no gate checked that shape. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: CLEAN: I built three failure paths and the code blocks each one. Two non-blocking items remain.
Non-blocking
⚠ The fault table in the header has no content assertion: crates/metal/src/kernels/header.rs:17. the_header_is_the_geometry skips every FAULT_* and LAYER_NONE define. the_rendered_sources_are_the_built_ones compares two outputs of the same header::program. Mutant: write 0 in place of *site as u32. No test turns red, and the kernels then raise a fault under the wrong site code. The sha256 check in the PR body ran once. Direction: in header.rs tests, assert that fault_sites() holds one #define BLOOMERY_FAULT_SITE_<NAME> <code> per FaultSite::ALL, and LAYER_SHIFT and FAULT_WORDS.
⚠ The router hidden 3136 refusal text is pinned in three tests: geom.rs:394, instance.rs:851 and library.rs:694. Each test guards a different wrapper, so none is a duplicate today. The full-string assertion in geom.rs repeats the instance.rs one, though. Drop the last assert_eq! of a_geometry_a_kernel_cannot_take_is_refused_by_name; the table already pins kernel, axis and value.
Checked
- Duplicates: 14 new items checked (
KernelRefused,yes_no,registered,open_key,OPENED,header::*,rendered,differs_at,Display for Instance, and others), none duplicated.define_ofmoved, it was not copied. The dryer found 0 pairs. The refusal message ingenerate_metal.rsandbloomery_serve_metal.rsis the same 4 lines; two short copies cost less than an owner, so no finding. - Complexity:
attention_geom::holds1→18 androuter_geom::holds1→6 are new functions, each a flat list of one-refusal guards, one clause each. No split needed. The two binopenandgeneratefunctions grew by one branch each, harmless. - Silent failure: 7 sites followed.
scale_ofNaN is refused bycheckbefore any header is written.ring_rowssaturating_subis refused by thering_rows != 11clause.gqadivides byn_kv, andselect_gqaalready refusesn_kv == 0(shape.rs:869). TheOPENEDlock poison recovery is safe, because the guardedVecis only appended to after the check. No_ => {},ok()orunwrap_or(0)on a value that reaches a consumer. - Adversarial: (1) two keys opened in one process both named
unregistered: no cache in the library or kernels is keyed by name, the pipeline sizes readGeometry;OPENEDis keyed byKey. (2)HOST_GEOMETRYshims sizing a buffer for another geometry: the arch readsgeom(arena.rs,check.rs,rows.rs), not the shims. (3) An unregistered file reaching a gate: the kernels gate refuses it by name (gate_metal_qwen35moe_kernels/mac.rs:549), and the e2e gate needs its own row. - Tests (mutation): the 14-row table turns red on each clause, a flipped
checkorder included. Removing.check()inopen_keyorrenderedturns a test red. Removing theOPENEDcache turnsptr::eqred. Dropping a define from the header turns thedefinedlist comparison red. The fault table is the gap (see ⚠). - Gates: no pin moved, none removed. Several per-axis clauses moved from
constasserts to runtimecheck, each still covered by the table. - Performance: load-time only (open and build). No hot path touched.
- Escape catalog: no pattern matched (no shell scripts changed).
Notes
- The evidence is from an M1 Pro (
lab-metal,lab-metal-e2e,metal-compare). Nonvidia-smigate run is in the PR text, sogpu.jsonsays no evidence. The PR touches no CUDA crate.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
What
The Metal instance's
#defineheader is now rendered at open, from the file'sGeometry. A shape the kernels take opens without a registry row.crates/metal/src/kernels/header.rs) writes the header forbuild.rsand for the open. For each registered row, the rendered text is the textbuild.rswrites, byte for byte.holds→Geometry::check. Each kernel'sconst fn holdsbecomesGeometry::check, a named refusal at open: which kernel, which axis, which value.instance::open_key). A metallib build falls back to the source path for it.generate_metalandbloomery-serve-metalthen print that no gate checked that shape.docs/research/metal-all-models.mdstruck through its "no load-time path for an unregistered shape" and corrected it in place.Evidence (second M1 Pro, [dev])
.metalsourcesbuild.rswrites for the registered instances (main and tensor × two) have the same sha256 as on the base.metal-compareagainst the parent: rc 0, 194 pipelines the same, traces equal at depth ~0 and 600, ids equal.just lab-metalrc 0, with 161 + 59 mutants, each red on its clause.just lab-metal-e2erc 0. Clippy-D warningspasses on the three builds.checkturn red.just affected: no box gate.AI use: written and checked with Claude Code.
🤖 Generated with Claude Code