Skip to content

feat(codec): update fixed binding indexes with immutable CoW - #10

Merged
Ivanbeethoven merged 5 commits into
mainfrom
feat/canonical-binding-index-cow
Oct 7, 2026
Merged

Ivanbeethoven merged 5 commits into
mainfrom
feat/canonical-binding-index-cow

Conversation

@Ivanbeethoven

@Ivanbeethoven Ivanbeethoven commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

The canonical binding-index codec can describe a root but has no immutable mutation or lookup engine. Add iterative update, exact get and component-aware longest_prefix operations using the fixed v1 node/key encoding. Updates copy the changed path's ancestors; deletion compresses valueless paths, identical updates write no nodes, insertion order and delete/reinsert produce identical canonical roots, and old roots retain their previous mapping.

Stacked on #9. The synchronous caller-owned NodeStore port reads immutable bytes and inserts immutable nodes; there is no concrete persistence store, SQL/publication transaction, async runtime adapter, pagination, namespace serving or capability enablement. Each visited node checks its requested SHA-256 identity, local shape, incoming child label and assembled value-key budget. Unvisited subgraphs, source membership, complete closure, authorization and retention remain separate integration gates. NodeStore::read returns caller-allocated bytes: the codec's post-read size check is not a bounded storage allocation guarantee. A failed update returns no new root; partial insertions may leave unreachable nodes for the caller's transaction/retention policy.

Validation on Windows, Rust 1.98.1:

  • Formatting and git diff --check: pass.
  • Identity profile: all-target clippy with warnings denied, build and complete tests pass (81 unit + 6 integration).
  • Zstd profile: all-target clippy with warnings denied, build and complete tests pass (101 unit + 6 integration).
  • Eleven new tests use an independent ordered-map/component-vector oracle for 100 fixed mutations and historical roots; insertion-order/delete-reinsert identity, untouched sibling reuse, no-op writes, missing/corrupt/oversized nodes, invalid incoming edges/value paths, UTF-8 split labels, exact/deep key limits, failed insert/retry and missing sibling during collapse are covered. Store call counts are logical test-store observations, not SQL, runtime latency or crash evidence.
  • At exact head 9bb7c1ac5fbfb7dec94d4e79cd9a9e365168cf47, all six Linux/macOS/Windows × identity/zstd jobs passed: https://github.com/gitmono-dev/mst2-codec/actions/runs/37258540385 . Two independent static reviews found no blocking CoW/index correctness issue.

Only Rust source/tests are pushed. The private plan and evidence stay local. This does not complete T02/T04/T05 or claim an end-to-end performance gain.

@Ivanbeethoven
Ivanbeethoven marked this pull request as ready for review October 5, 2026 03:16
@Ivanbeethoven
Ivanbeethoven changed the base branch from feat/canonical-binding-radix-codec to main October 7, 2026 07:58
@Ivanbeethoven
Ivanbeethoven merged commit 7d679c3 into main Oct 7, 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.

1 participant