zz_

4730eab3 ยท zzmq.dev@gmail.com/zz

Commit

4730eab369574c9bb3c5ab02af871d83b0377952

Accounts/RBAC phase 1: D1 schema + the zz-meta orphan branch Repo metadata (description, policy, repo-level Role grants) now lives on a dedicated zz-meta orphan branch per repo instead of the main branch, keeping bot-written protocol state out of a repo's real history/diffs -- an evolution of site/content/data-format/index.md's .zz/ directory design, which will get updated to match once the web app lands. repoMeta.ts reuses the scoped single-branch checkout pattern proven for the Ladder's notes refs (cloudflareLadderBackend.ts), simpler here since a real branch's small object graph can just be fetched whole rather than avoided. ensureMeta lazily bootstraps meta.json/roles.json on first access; writes to one file leave the other untouched. Repo-level RBAC uses the 4-role cut from competition-plan.md (Owner, Maintainer, Contributor, Reader -- Committer out of scope), mirroring engine/roles.ts's already-ranked model but unscoped (a repo-level grant has no path to check, unlike that one's directory-prefix scope). New D1 database (zz-accounts) for accounts/agents/tokens/sessions/repos -- platform data with no git home, same role architecture.md already gives D1 for cross-repo state. The repos table is an index/cache of each repo's own zz-meta branch, not the source of truth. Verified live: ensureMeta bootstrap, idempotency (second call doesn't clobber), a roles.json write leaving meta.json untouched, against a real deployed Worker and Artifacts repo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Troy Howard <thoward37@gmail.com> -- 2026-10-12T00:54:34.000Z

Tree at this commit