---
name: hand-built-walk-is-not-an-enum-pin
description: "A hand-built array over an enum's variants plus a len assert pins NOTHING — a new variant leaves both trivially true; only a wildcard-free match compiles-red."
metadata: 
  node_type: memory
  type: feedback
  originSessionId: ead2c866-5b70-49db-a7e7-57b01688fa91
  modified: 2026-08-04T02:49:38.228Z
---

A test that walks a HAND-BUILT array of enum variants and asserts `arr.len() == N`
does not pin the enum. Add a variant and the array is unchanged, the `len` assert is
still true, and every renderer carrying a `_ =>` arm answers the new variant silently —
which is usually the exact defect shape the test claims to prevent. Measured on #145
(doyle's gate of `01062cd`): my partition test over `KnockSendOutcome` said "its length
is pinned so a variant added later without a home fails here rather than in the field",
and that sentence was false as written.

**Why:** the array and the enum are two independent lists. Only the COMPILER can relate
them. Exhaustive `match` with no underscore arm makes a new variant fail to BUILD until
someone places it — a property no runtime assertion can supply.

**How to apply:** put the exhaustiveness at the real decision sites (the prod renderers),
not in a test-only helper — then the pin holds for `cargo build`, not just the test
profile. Keep the runtime walk: it proves the placement is a PARTITION (exactly one
owner, no double, no orphan), which the compiler cannot check. And correct the comment —
a comment claiming a fixture property is a claim to audit, per [[audit-the-boring-claims]]
and [[test-name-asserts-what-fixture-never-creates]].

Second finding from the same gate, same family: a predicate that parses only HALF an
address (`id@node` read for its id) re-opens whatever ruling the other half carries.
Resolution NotFounds a node qualifier matching no visible instance BEFORE it asks whether
the winner is local, so `id@FOREIGNNODE` on a box hosting its own `id` reported "is an
endpoint on this machine". Fix by delegating to resolution's OWN matcher in a parts form
rather than writing a second rule that agrees today — see [[declare-site-is-not-enforce-site]].
