protocol and runtime-adapter had no tests of their own. Both are load
bearing in the same way: a digest computed here is what a Build, a
package lock and a Runtime Profile are addressed by, so a change in
either is a change to the meaning of records already written down.
The protocol tests are about one property — values that mean the same
thing digest the same, values that mean different things do not — and
then about what has no canonical form at all: non-finite numbers,
undefined members, accessors, non-plain objects, cycles in either shape.
Both files end with pinned constants. They are not testing that sha256
works. They exist so that changing how a value is canonicalized, or how
an adapter is identified, cannot be a quiet change: editing a constant is
an act a reviewer sees, and a silently different digest is not. The
adapter pin has a precedent — renaming `kind` invalidated every recorded
lock, and nothing failed until a lock did.
Writing them found one defect. createRuntimeEndpointAdapterFacet built a
facet without validating it; only isRuntimeAdapterHostFacet checked, and
the loader skips a facet that fails that check. So a package with a
broken adapter registered nothing and surfaced as "adapter X is not
registered", three layers from the mistake. Both constructors now
validate what they are given.