You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The ledger snapshot digests every Active resource, twice per run: a discovered directory boundary such as ~ is Merkle-walked (1.7M files) at the end of every deploy, silently, and the walk is discarded #904
writ deploy common on this machine: 169 seconds, no output until the final line. The units -- 166 links -- take
seconds. A sample of the process at 15 s shows one thread in crypto/sha256.block with openat/read/fdopendir
beneath it: a directory walk, hashing every file, inside writ, in Go. No git child. Nothing narrates.
Mechanism
Three correct rulings compose into hashing the home directory:
ResourceCatalog.Snapshot() (pkg/op/resource_catalog.go:572) calls Etag()andDigest() on every Active
entry, unconditionally, to record the ledger.
file.Directory.Digest() (pkg/op/provider/file/directory.go:187) is a Merkle root of the whole tree -- "no
gitignore filtering and no .git skip", ruling 5d -- written for a directory that is a product.
findClosestExistingDir discovers each write's creation boundary as a Directory resource: ~/Library/Fonts for
the 42 planned fonts, ~/.config, and ~ itself for the twelve root dotfiles. Discovered, never produced,
and Active once verified.
So the capture Merkle-walks ~ -- 1,687,960 files under ~/Library alone -- until an entry it cannot hash stops it,
and the error is dropped (if err == nil): ~170 s to record nothing. And it runs twice: Run captures the
ledger in its defer (graph_executor.go:320) so a trace can be projected, then deploy.go:237 calls executor.Trace(), which snapshots again (graph_executor.go:487).
directory.Etag's own comment states the rule the snapshot never applies: "the catalog treats a changed Etag as
the trigger for the full Digest comparison". Every kind's Etag() is one lstat.
The fix, ruled 2026-09-21: compare, then recompute only if needed
Snapshot() takes the prior snapshot. Per Active entry it computes the Etag; when the prior holds the same ID
with the same Etag, the prior's Digest is carried forward; only a changed or absent Etag calls Digest().
Trace() passes e.ledgerSnapshot, the defer's capture, as the prior: between the two nothing moved, so the
second capture is 166 lstats and no hashing.
A discovered directory -- a boundary nobody produced, ProducerID empty -- records its Etag and no Digest: its identity is its path, not its content. That removes the first walk too.
Acceptance
a second Snapshot() over an unchanged catalog computes no digest: TestSnapshot_UnchangedCatalogCarriesDigestsForward counts them (2026-09-22)
a discovered directory entry carries an Etag and no Digest; a produced one carries both: TestSnapshot_DiscoveredTreeRecordsEtagOnly; the deploy receipt shows 26 parents Active, etag only (2026-09-22)
Activity