Implement canonical network readiness derivation

This commit is contained in:
ms2k 2026-07-15 16:58:30 +09:00
commit 304fb225d6

View file

@ -1188,6 +1188,15 @@ family has exactly one default action. Prefixes and addresses are canonical, and
equal-prefix action conflicts are invalid. Policy identity is the SHA-256 digest
of its canonical form with a schema-specific domain separator.
`DerivedNetworkPolicy.schema_id` is exactly
`lazaret-derived-network-policy-v1`. Its canonical form is the minimal Postcard
encoding of the complete document after address-family dispositions, default
actions, prefix rules, and resolvers are sorted respectively by family; family;
`(family, address bytes, prefix length, action)`; and `(family, address bytes)`.
Duplicate prefixes and resolvers are invalid rather than silently removed. The
policy-digest domain separator is the UTF-8 schema ID followed by exactly one
zero byte.
## Network readiness
```mermaid
@ -1303,5 +1312,6 @@ interpretation.
The readiness-fingerprint domain separator is the UTF-8 bytes of
`lazaret-network-readiness-identity-v1` followed by exactly one zero byte. This
fixes the domain-separation context only; it does not select the byte encoding of
the canonical readiness-identity fields.
prefixes the minimal Postcard encoding of the complete
`NetworkReadinessIdentity` document. The schema ID is therefore present in both
the domain-separation context and the encoded version-dispatched document.