Repository navigation
feat(codec): preserve canonical namespace binding radix bytes - #9
Merged
genedna merged 1 commit intoOct 5, 2026
Merged
Conversation
Ivanbeethoven
marked this pull request as ready for review
October 5, 2026 03:02
genedna
pushed a commit
that referenced
this pull request
Oct 5, 2026
* feat(codec): encode canonical namespace v1 identities * test(codec): keep golden hex decoder lint clean * feat(codec): preserve canonical namespace binding radix bytes (#9)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Canonical namespace manifests need the existing binding-index byte contract to represent
bindings_root. Add the pure local node and component-key codecs from Mega draftc488b78a82361ecc6e5bb285977b8439993c062e/docs/spec/namespace-index-v1.md, stacked on #8. Encoding preserves the v1 domain, big-endian lengths, binding digest, sorted byte edges and empty-root identity. Decoding rejects truncation, noncanonical local compression, duplicate/unsorted edges and budget violations.Complete value keys preserve case/Unicode/literal backslashes, encode component separators as NUL and keep
/as an empty key. The decoder rejects slash-based and NUL-only-root aliases that are not canonical encoder output. Compressed labels may split UTF-8; only complete assembled keys are path-validated. The existing v1 structural limits remain unchanged; MST/2's 256-component serving profile must be enforced by its adapter.This change contains no CoW update algorithm, store, graph walker, SQL transaction, binding/source lookup, runtime serving or capability enablement. A future walker/store must verify requested digests, incoming child-label relationships, assembled-key limits, source membership and retention. A locally valid node is not proof of a valid complete namespace graph.
Validation on Windows, Rust 1.98.1:
cargo fmt --all --checkandgit diff --check: pass.cargo clippy --all-targets --no-default-features --locked -- -D warnings, identity build and tests: pass, 70 unit + 6 integration tests.cargo clippy --all-targets --all-features --locked -- -D warnings, zstd build and tests: pass, 90 unit + 6 integration tests.95f33b6916ff3d3e82bbb70abed89c5ca9c5450bada60fe7404542ab7745f4b6.2589413984444f6a1c0064ccd85e2858647ec1e5, all six GitHub Actions jobs passed (Linux/macOS/Windows × identity/zstd): https://github.com/gitmono-dev/mst2-codec/actions/runs/37257559388 . Two independent static reviews found no blocking node/key codec correctness issue.Only Rust code/tests and the canonical test fixture are pushed. Audit reports and plans remain private.