Skip to content

feat(codec): add canonical source and namespace identities - #8

Merged
genedna merged 3 commits into
fix/mst2-raw-frame-digestfrom
feat/canonical-namespace-codec
Oct 5, 2026
Merged

genedna merged 3 commits into
fix/mst2-raw-frame-digestfrom
feat/canonical-namespace-codec

Conversation

@Ivanbeethoven

@Ivanbeethoven Ivanbeethoven commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Source, binding and view identities currently lack a shared implementation in mst2-codec. Add pure canonical binary codecs following the fixed Mega draft c488b78a82361ecc6e5bb285977b8439993c062e source-snapshot-v1 and namespace-manifest-v1 contracts, so later server/client adapters can generate identical identities.

The source codec preserves the existing SHA-1-only v1 contract and commit provenance. Binding identity includes its complete source descriptor, subpath and explicit policy; view identity separates instance, native source, binding root and override presence. Constructors validate canonical non-nil UUID text, lowercase OIDs, component/UTF-8 byte path limits, source path composition and root native scope. Decoders cap complete manifests, bound every length and reject unknown domains/tags, malformed UTF-8, truncation and trailing bytes.

Frozen independent .NET fixtures verify exact bytes and SHA-256 identities. Regressions cover every truncated prefix, maximum paths, invalid UUID/OID/length/tag inputs, Unicode preservation, same-tree/different-commit provenance and absent versus present override roots. Add Linux/macOS/Windows CI for both identity and zstd profiles, and compile compression-only helpers/imports only in the zstd profile.

Validation on the final source: format, builds and warnings-denied all-target Clippy pass in both profiles; all-feature tests pass 78 unit + 6 integration, identity tests pass 58 unit + 6 integration. Independent source review matched the fixed contract and confirmed both fixture hashes. actionlint v1.7.12 passes. All six Linux/macOS/Windows × identity/zstd jobs pass on c813373 in run 37256878716, including warnings-denied Clippy, builds and complete tests. The initial new Clippy failure on 94b9a3a was fixed in the golden-vector helper; no lint was disabled.

Stacked on #7. This is binary encoding only: no JSON deserializer, binding-index codec, source attestation, authorization, publication, release enforcement, product adoption or deployment is included. Identifier strings remain structurally validated codec inputs; adapters must retain distinct business types and enforce the current endpoint profile, including its additional depth limit. No docs, logs or environment files are committed.

@genedna
genedna merged commit ec506cb into fix/mst2-raw-frame-digest Oct 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants