d7f9d802 ยท zzmq.dev@gmail.com/zz
Commit
d7f9d802cf73a6e5cf3fb2e1bdddb4b1c8215ea6
Backend step 4 (partial): real changeset commits on Artifacts, no clone needed Proves the write side of the git-content half of Backend against a real Artifacts repo, reusing the exact "minimal object" pattern verified live in step 2: never clone the repo's history, just reconstruct what a push actually needs. For a changeset touching some files: read the parent tree natively (readTree, no isomorphic-git), re-fetch each *unchanged* file's real bytes via readBlob and rewrite the identical blob locally (content-addressed hashing reproduces the same oid), write the new/changed blobs directly from the proposed content, build the new tree and commit, push. Verified live, twice: once as a standalone function (cloudflareGitBackend.ts's commitChangesetOnArtifacts), and once through MaintainerDO.commitChangeset's RPC surface -- both confirm a file untouched by the changeset (clamp.js / a.txt) survives exactly unchanged in the new commit, without the Worker ever fetching its history. Not yet done: the Ladder (git notes) on Artifacts. Git notes have their own tree structure isomorphic-git's addNote manages internally; reusing the "native read + minimal local write" pattern there means faithfully reconstructing an *existing* notes tree first, not just a flat file tree -- a genuinely different, harder problem than this commit, worth its own careful pass rather than rushing it in behind this one. Also not yet done: folding this into a single Backend- conforming CloudflareBackend class (today it's called directly on MaintainerDO, not through engine/backend.ts's interface), and the tool-surface HTTP routes so `zz work` itself can point at a deployed Worker.
Troy Howard <thoward37@gmail.com> -- 2026-10-11T10:56:03.000Z