Repository navigation
Plan the Authorization Core role-store adoption (staff allowlist retirement) - #45
Conversation
…rement). pegma.dev is the ecosystem's second host to need stored, audited roles; the reference host (retiregolden.org) completed its adoption 2026-07-29. docs/ROLE_ADOPTION_PLAN.md pins the five phases: policy + role store over the existing D1 Store; staff gate reads roles with the allowlist as the legacy fallback (the lockout-safe order proven on the reference host); one-time bootstrap seed with a deterministic assignment id so revocation stays durable; allowlist deleted whole (fail-closed 503 after); and the shared admin-surface extraction recorded as GATED on authorization-core#23/#24 so a host-side workaround is not baked into a public package right as the library may absorb it. Nothing is copied between hosts — shared capability arrives as a published package or not at all. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
This PR adds a docs-only, phase-based migration plan for replacing pegma.dev’s Support Desk staff environment allowlist with the Authorization Core role store, and records the plan pointer in the project plan backlog.
Changes:
- Add
docs/ROLE_ADOPTION_PLAN.mddescribing a five-phase adoption/migration plan (policy + role store binding, dual-gate transition, bootstrap seeding, allowlist removal, and a gated shared admin surface). - Update
docs/PROJECT_PLAN.mdnear-term backlog to reference the new role-store adoption plan.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/ROLE_ADOPTION_PLAN.md | New migration plan document for adopting the Authorization Core role store and retiring the staff allowlist safely. |
| docs/PROJECT_PLAN.md | Adds a backlog entry pointing to the new role adoption plan and its gating dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0dde794fdf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The plan gated the management surface on an Admin role that Phase 1 left unmapped and no phase granted — unreachable by construction. Phase 5 now activates in order: map Admin, run the one-time lockout-safe Admin bootstrap (deterministic assignment id, human-managed after the write, var deleted once the first admin exists), then ship the surface — so the last-admin guard is meaningful from its first request. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
Docs-only:
docs/ROLE_ADOPTION_PLAN.mdplus a PROJECT_PLAN pointer. pegma.dev is the ecosystem's second host to need stored, audited roles — the reference host (retiregolden.org) completed its adoption on 2026-07-29 — and this plan pins how the Support Desk staff env allowlist (SUPPORT_STAFF_EMAILS/SUPPORT_STAFF_PRINCIPALS, which SUPPORT_COMPOSITION.md itself calls "not a full role store") gets replaced.Deliberately smaller than the reference host's migration: no billing ledger, no derived entitlements, no frozen offline wire contract here. The worker already composes
@pegma/identity,@pegma/sessions,@pegma/authorization-identity, andresolveAccessover one D1-backed Store — the only missing piece is@pegma/authorization-storageand a policy with aSupportrole.The phases
createRoleStore(store, 'pegma.dev')at the composition root — application id is one value, forever.Adminnamed in prose but not mapped until a surface exists to check it.PEGMA_SUPPORT_BOOTSTRAP_PRINCIPALS) with the two properties the reference host learned the hard way: deterministic assignment id so a revoked operator stays revoked while the var is still set, and human-managed despite the system actor.Hard rule restated in the plan: nothing is copied between hosts — shared capability arrives as a published package or not at all; one admin tool per site, nothing crossing between them.
🤖 Generated with Claude Code