Skip to content

Adopt Authorization Core 0.3.0: history-based bootstrap, marker collection deleted - #50

Merged
FlyOverCoderKY merged 2 commits into
mainfrom
claude/authz-0-3-0
Jul 30, 2026
Merged

FlyOverCoderKY merged 2 commits into
mainfrom
claude/authz-0-3-0

Conversation

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor

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 any Support assignment record — active or revoked, whatever its provenance — read first-class via listRoleAssignments(principalId, scope).

The support-bootstrap.markers.v1 host 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.v1 rows written in production D1 by the (already completed and closed) live seed are inert after this merge. Optional cleanup:

DELETE FROM RECORDS WHERE partition_key LIKE 'support-bootstrap.markers.v1:%';

Docs

Verification

195 node + 2 D1 tests green, tsc clean, astro check clean.

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings July 30, 2026 19:42
@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread package.json Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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} from 0.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>
@FlyOverCoderKY
FlyOverCoderKY merged commit 1fc3818 into main Jul 30, 2026
1 check passed
@FlyOverCoderKY
FlyOverCoderKY deleted the claude/authz-0-3-0 branch July 30, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants