Repository navigation
The ledger snapshot compares before it hashes, a tree the run only found records its etag, and mkdir claims what it made - #911
Merged
Conversation
…und records its etag, and mkdir claims what it made writ deploy common spent 182 s after its last unit: the ledger capture asked every Active entry for its digest, and a directory's digest is a Merkle root, so the home directory -- cataloged as a product of the mkdir that found it -- was walked to the first socket and the error dropped. ResourceCatalog.Snapshot takes the prior snapshot and carries a digest forward when the id and etag match; a Tree with no producer records its etag alone; a produced tree keeps both tiers. The executor passes its capture at both sites. file.Mkdir observes first: a directory that exists is returned as the discovery the boundary walk made, verified Active, with no producer and no receipt; a directory it creates is its product, stamped and undone by its receipt. Six ledger tests count Digest() calls; Mkdir's two tests assert the stamp, the receipt and the state; §9 items 20 and 21 record the rulings. Deploy here: 3.4 s. Linux 0.84 s, Windows 12.2 s with the capture at 2 ms and 18 ms after the last commit. Closes #904 Closes #907 Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
This was referenced Sep 22, 2026
David-Noble-at-work
added a commit
that referenced
this pull request
Sep 22, 2026
…d is written, the ladder, and what a receipt means (#912) 4-resource-management.md gains §5.8, four subsections against pkg/op/resource_catalog.go: the catalog as the live model and its doors, each door the claim it makes; the ledger as the record captured once at the end of Run, its fields split into identity and observation, its readers; the etag/digest ladder in both its applications, with a found tree recording its etag alone; and a field-by-field table of what a reader of a receipt may rely on, including what an empty digest means and the UUIDv7 commit stamp as the only clock the record carries. One word, one thing: "ledger" names the record only. The catalog's storage is the entries, in §2, §3, §4 and in twenty-two comments of resource_catalog.go. The status file carries the revision and the rows for PR #911 and this section. Closes #906 Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW Co-authored-by: David Noble <[email protected]>
This was referenced Sep 23, 2026
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.
Summary
Lanes 17 and 19 of #887: PR E.
ResourceCatalog.Snapshot(prior)records every Active entry's etag (one lstat) and carries the prior's digestforward when the id and etag match; only a new id, a moved etag or an errored prior digest is hashed.
Run's andResumeUnwind's defers pass the executor's capture;Trace()afterRunprojects it. §9 item 20.the
Treecontract inpkg/op, implemented byfile.Directory; aTreewith no producer records no digest, so aboundary such as
~is never Merkle-walked, while a directory writ made can still be asked whether it changed.§9 item 21.
Mkdirclaims what it made (#907, ruled 2026-09-22)— it observed the leaf after minting its product with the caller's stamp, so every parent
deployplans a mkdirfor, the home directory included, entered the catalog as made. Now it observes first: a directory that exists is
returned as the discovery the boundary walk made, verified Active, with no producer and no receipt; a directory it
creates is its product, stamped and undone by its receipt.
Runthe environment is gone andTrace()reuses the capture.Evidence
writ deploy common409d1e89-dirtydanoble-ud24-1.locallinux/arm64common noblefactor-ops166 files: 0.84 s understop, 0.56 s underreplace;upgradenothingdanoble-wd11-3.localwindows/arm64common noblefactor-ops --allow-dirty70 links, 1 skipped: 12.2 s understop, 15.4 s underreplace;upgradeno copied filesBoth VMs: self install 3/3; base and team unset, set by URL (git-named clones), set by path unchanged; personal by
path. Bare
writ deployrefuses on both,requires at least 1 arg(s): #843,open, not this lane. The method-receipt timings are decoded from the UUIDv7
transaction_ids; the reader is#910.
Test plan
make checkgreen;make test-scenariogreen (8 passes)Digest()calls (resource_ledger_snapshot_test.go,graph_executor_test.go);TestMkdir_Idempotent,TestMkdir_CreatesDirectory,TestDirectory_IsTreepkg/op75.3%,pkg/op/provider/file66.7%;Snapshot100%,ledgerDigest100%,Mkdir81.1%,IsTree100%. Complexity:Mkdir17 → 14,ledgerDigest9,foundDirectory4. Size:resource_catalog.go1137,provider.go2570,resource_ledger_snapshot_test.go405writ deploy common --conflict=replace2026-09-22 11:04, 111 linksbuild/e2e/904-*.logTime
Computed by the algorithm of noblefactor-ops#188 at merge.
https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW