Skip to content

Merge extensions v2 reads into scoped endpoints - #230

Merged
admdly merged 8 commits into
mainfrom
refactor/extensions-v2
Sep 17, 2026
Merged

admdly merged 8 commits into
mainfrom
refactor/extensions-v2

Conversation

@admdly

@admdly admdly commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Merges the extensions v2 read endpoints into role-aware scoped endpoints so each resource has one read path instead of separate public, owner, and moderator routes. Existing clients using the old read paths must update.

Migration

  • GET /extensions keeps scope=public as the default; ?scope=mine and ?scope=all replace GET /extensions/mine and GET /moderation/all-extensions.
  • GET /extensions/{id} replaces GET /extensions/mine/{id} and GET /moderation/extensions/{id}.
  • The revision queue moved from GET /moderation/extensions to GET /revisions; per-extension history stays at GET /extensions/{id}/revisions.
  • GET /developers now defaults to status=all; ?status=unapproved replaces GET /developers/unapproved.
  • GET /developers/claims?scope=mine|pending replaces /developers/claims/mine and /developers/claims.
  • Migration 0020 now only guards reserved developer ids, since GET /extensions/mine no longer exists.

Behavior

  • GET /extensions/{id} and GET /developers/{id} are role-aware: anonymous, unrelated, or inactive-account callers get the public projection, active owners and moderators get the full record, and unpublished or delisted extensions return 404 outside those roles.
  • GET /developers, ?scope=all, ?scope=pending, and GET /revisions remain moderator-only; ?scope=mine requires an active account.
  • A provided but invalid bearer token returns 401; anonymous reads stay cacheable and authenticated reads set Vary: Authorization.
  • On GET /extensions, developer_id is rejected outside scope=public; status and q are rejected outside scope=all (422 instead of being ignored).
  • GET /developers/claims?scope=mine now returns the same enriched claim shape as the pending queue.
  • GET /revisions (queue) defaults to oldest first; GET /extensions/{id}/revisions (history) defaults to newest first.
  • PATCH /users/me now returns the full account projection instead of only display_name.
  • A whitespace-only GitHub login no longer counts as a linked identity.
  • mine is no longer a reserved extension id; POST /extensions accepts it now that the static route is gone.

Written for commit c7f2d13. Summary will update on new commits.

@admdly admdly self-assigned this Sep 16, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 16, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
api 5ff5f42 Commit Preview URL

Branch Preview URL
Sep 17 2026, 08:04 AM

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 22 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/services/extensions/v2/db/developer-claims.ts Outdated
Comment thread src/services/extensions/v2/README.md
Comment thread src/services/extensions/v2/routes/ownership.ts Outdated
Comment thread src/services/extensions/v2/routes/developer-profiles.ts
Comment thread src/services/extensions/v2/routes/revisions.ts Outdated
Comment thread src/services/extensions/v2/middleware.ts
Comment thread src/services/extensions/v2/README.md
Comment thread src/services/extensions/v2/schemas/revisions.ts Outdated
Comment thread src/services/extensions/v2/routes/account.ts
Comment thread src/services/extensions/v2/README.md Outdated

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 17 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/services/extensions/v2/index.ts

@cubic-dev-ai cubic-dev-ai Bot 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.

0 issues found across 1 file (changes from recent commits).

Requires human review: Auto-approval blocked by 1 unresolved issue from previous reviews.

Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 10 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread src/services/extensions/v2/routes/revisions.ts Outdated
Comment thread src/services/extensions/v2/routes/revisions.ts Outdated
admdly and others added 2 commits September 17, 2026 09:03
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot 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.

0 issues found across 10 files (changes from recent commits).

Requires human review: Breaks the public API by merging extensions v2 read endpoints into scope/role-aware routes; clients must migrate and response, auth, and cache behavior change, so a human should approve the contract and migration.

Re-trigger cubic

@admdly
admdly merged commit 249ce5f into main Sep 17, 2026
9 checks passed
@admdly
admdly deleted the refactor/extensions-v2 branch September 17, 2026 09:46
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.

1 participant