Skip to content

feat(merkledag): batch directory updates per commit - #76

Merged
BernardLowe merged 1 commit into
mainfrom
codex/merkle-commit-batch
Oct 15, 2026
Merged

BernardLowe merged 1 commit into
mainfrom
codex/merkle-commit-batch

Conversation

@BernardLowe

@BernardLowe BernardLowe commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Multiple file changes under the same directory currently persist an intermediate directory and every ancestor after each file. Add Editor.BeginBatch for basic UnixFS directories so callers can stage all bindings and write each surviving affected directory once, bottom-up, when committing the batch.

File DAG objects retain their existing encoding and write path. Unchanged subtrees are reused, deleted directories are pruned without empty intermediate writes, and the Editor root advances only after every directory write succeeds. This is not a crash-atomic storage transaction; failed batches may leave immutable objects in CAS. Existing single-operation and HAMT APIs are unchanged.

Validation: the two-sibling regression observes exactly two directory writes (the final child directory and root); tests also cover initial snapshots, historical-root reads, CID equivalence with the existing editor, no-op batches, deletion, file/directory transitions, stale batches, cancellation and storage failure. Full runtime tests, vet, build and a fresh independent review passed.

DeWebProtocol/malt-evaluation#67 integrates one batch per initial snapshot and Git commit, with a new accounting contract for fresh Merkle replay results. Runtime GitHub CI passed the test/vet/build job and Linux, macOS and Windows builds.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 05:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@BernardLowe
BernardLowe merged commit 8fb839f into main Oct 15, 2026
5 checks passed
@BernardLowe
BernardLowe deleted the codex/merkle-commit-batch branch October 15, 2026 06:21
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