Repository navigation
Adopt Authorization Core 0.3.0: history-based bootstrap, marker collection deleted - #50
Conversation
…ction deleted Upgrade the four @pegma/authorization-* pins 0.2.0 -> 0.3.0 (the synchronized release resolving upstream issues #23/#24/#25). The bootstrap's "already seeded" signal is now ANY Support assignment record — active or revoked, whatever its provenance — read first-class via listRoleAssignments. The support-bootstrap.markers.v1 host collection existed only because enumeration was active-only (a revoked or held-elsewhere principal left no readable trace); with full lifecycle history upstream, the marker plumbing is deleted whole from the runtime, API options, and tests. Revocation durability is unchanged and re-pinned: revoked history blocks a reseed while the env var lingers. Leftover marker rows in the production D1 are inert; removing them is an optional one-row DELETE noted in the PR. 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf63195a80
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
This PR upgrades pegma.dev’s Authorization Core dependencies to the synchronized 0.3.0 line and simplifies the Phase 3 Support-role bootstrap by removing the host-side support-bootstrap.markers.v1 marker collection in favor of upstream lifecycle enumeration via listRoleAssignments.
Changes:
- Bump
@pegma/authorization-{core,identity,policy,storage}from0.2.0→0.3.0. - Replace marker-based “already seeded” detection with history-based detection using
roleStore.listRoleAssignments(...). - Remove marker plumbing from the Worker runtime/options/tests and update docs to reflect the new bootstrap semantics.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| worker/src/support-desk.ts | Removes bootstrap marker collection from the Support runtime surface. |
| worker/src/support-api.ts | Drops bootstrapMarkers option and updates bootstrap execution to be role-store-only. |
| worker/src/support-api.test.ts | Updates bootstrap tests to validate history-based seed-once / revocation durability behavior. |
| worker/src/role-bootstrap.ts | Reworks ensureBootstrapSupport to use listRoleAssignments lifecycle history instead of host markers. |
| worker/src/index.ts | Removes wiring of bootstrapMarkers into Support API creation. |
| package.json | Updates Authorization package pins to 0.3.0. |
| package-lock.json | Updates lockfile for the new Authorization versions (but still includes a nested authorization-core@0.2.0 under @pegma/support-desk-application). |
| docs/SUPPORT_COMPOSITION.md | Updates composition pins and removes marker-collection row; rewrites bootstrap description history-based. |
| docs/ROLE_ADOPTION_PLAN.md | Notes upstream gate largely cleared and records the adopted lifecycle enumeration milestone. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The health endpoint's authorizationAdapter detail and the cf-passkey-accounts catalog recipe both still advertised authorization-identity 0.2.0 after the dependency bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Upgrades the four
@pegma/authorization-*pins from 0.2.0 to the synchronized 0.3.0 line (the release that resolved our upstream issues #23/#25 and shipped #24's per-principal lifecycle enumeration). Companion to retiregolden.org's RetireGolden/retiregolden.org#73.The design change
ensureBootstrapSupport's "already seeded" signal is now anySupportassignment record — active or revoked, whatever its provenance — read first-class vialistRoleAssignments(principalId, scope).The
support-bootstrap.markers.v1host collection existed for exactly one reason: 0.2.0 enumeration was active-only, so a revoked seed or a held-elsewhere principal left no readable trace and revocation could be silently undone by a reseed. With full lifecycle history upstream, the marker is redundant bookkeeping — deleted whole (collection definition, runtime binding, API option, test fixtures). History-based is also stricter: it enforces the plan's seed-once-ever rule for any provenance of grant, and when the Phase 5 surface arrives, the panel — not the bootstrap var — is the correct re-grant path.Revocation durability is unchanged and re-pinned by the same two tests: a revoked bootstrap seed and a revoked non-bootstrap grant both refuse to reseed while the env var lingers.
Ops note
The two
support-bootstrap.markers.v1rows written in production D1 by the (already completed and closed) live seed are inert after this merge. Optional cleanup:Docs
SUPPORT_COMPOSITION.md: pins 0.3.0, marker row removed from the storage table, bootstrap paragraph rewritten history-based.ROLE_ADOPTION_PLAN.md: Phase 5's upstream gate annotated as largely cleared ([docs] Phase E partial activation status #23 shipped, [docs] Phase E activated — GitHub org webhook ping 204 #24's enumeration shipped; by-role selection deliberately remains the documented host recipe).Verification
195 node + 2 D1 tests green,
tscclean,astro checkclean.🤖 Generated with Claude Code