zz_

74a143d1 ยท zzmq.dev@gmail.com/zz

Commit

74a143d1c2b30afc249369dc77052e2c36e339b3

Cloudflare backend: async Backend interface + real MaintainerDO tool dispatch The Backend interface was declared synchronous for every git/Lane read, a design mistake invisible until a genuinely async Cloudflare implementation had to satisfy it. Changed every method to return a Promise and swept the ~13 affected files to add await. MaintainerDO now dispatches through a single generic callTool(name, args), reusing agent/tools.ts's real ToolDef.execute() functions verbatim via withBackend() instead of reimplementing per-operation RPC methods -- every RBAC check and the changeset_review gate run unchanged. cloudflareBackend.ts unifies Lane/Ask/Answer (DO SQLite), git content (native reads, isomorphic-git minimal-object push), and the Ladder (scoped notes checkout) behind that interface, replacing the now-deleted doLaneBackend.ts. Fixed along the way: - cloudflareGitBackend.ts's hand-rolled Artifacts types had drifted from the real @cloudflare/workers-types ambient globals (missing info()/authoredAt) -- now aliased to the real types directly. - readFileAtCommit didn't resolve the Backend contract's "HEAD" sentinel, which the native binding only accepts as a literal sha. Verified live end to end against a real deployed Worker: propose lane -> work ask -> changeset_review grant -> submit_changeset -> real commit against Artifacts -> Ladder rung writes (repo/file/changeset) -> ask_answer complete -> read-back, all through MaintainerDO.callTool. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Troy Howard <thoward37@gmail.com> -- 2026-10-11T20:21:19.000Z

Tree at this commit