Skip to content

Let claimants withdraw their own pending developer-profile claim - #165

Merged
admdly merged 2 commits into
mainfrom
feature/cancel-developer-claim
Jul 28, 2026
Merged

Let claimants withdraw their own pending developer-profile claim#165
admdly merged 2 commits into
mainfrom
feature/cancel-developer-claim

Conversation

@admdly

@admdly admdly commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds POST /developers/claims/{id}/cancel, scoped to the caller's own claim and status = 'pending', so a claimant can withdraw a claim without waiting on a moderator to reject it.
  • Companion to a change in the extensions repo that blocks "Create" on the account pages while a pending claim is outstanding — a user can only ever own one developer profile, so letting a create happen alongside a pending claim just sets up a future conflict at approval time.

Adds POST /developers/claims/{id}/cancel, scoped to the caller's own
pending claim, so a claim can be retracted without waiting on a
moderator to reject it — needed alongside blocking "Create" on the
extensions account pages while a claim is outstanding, since a user
can only ever own one developer profile.

Claude-Session: https://claude.ai/code/session_01QaaK546yMRs9xgyGrnu7Vx
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 28, 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 cae13e8 Commit Preview URL

Branch Preview URL
Jul 28 2026, 06:52 PM

@admdly admdly self-assigned this Jul 28, 2026

@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 2 files

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

Re-trigger cubic

Comment thread src/services/extensions/v2/index.ts
The D1 mock had no branch for the new DELETE, so any test exercising
it failed with a simulated DATABASE_ERROR; add the mock branch plus
route tests for own/foreign/non-pending claims. Also narrows the
cancel handler's error-status mapping to 404/500 (the shared
statusFromErrorCode helper's 409 case doesn't apply here and doesn't
match the route's declared responses).

Claude-Session: https://claude.ai/code/session_01QaaK546yMRs9xgyGrnu7Vx

@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 3 files (changes from recent commits).

Auto-approved: Adds a self-service endpoint for claimants to cancel their own pending claims, scoped to the claimant and pending status. The change is bounded, well-tested, and clearly beneficial.

Re-trigger cubic

@admdly
admdly merged commit 366d04d into main Jul 28, 2026
9 checks passed
@admdly
admdly deleted the feature/cancel-developer-claim branch July 28, 2026 18:57
admdly added a commit that referenced this pull request Jul 30, 2026
main gained "Let claimants withdraw their own pending developer-profile
claim" (#165) after this branch diverged, touching the same three files
rewritten here for Drizzle. Auto-merge pasted the old raw
db.prepare().bind().run() implementation in verbatim (git can't know it
needs rewriting), so cancelClaim() is reimplemented against the Drizzle
query builder to match rejectClaim()'s pattern, and its route handler now
goes through getExtensionsDb() like every other v2 route. Also resolves
a modify/delete conflict on the now-deleted mock-db.ts (kept deleted) and
rewrites the three ported tests to use the db-fixtures helpers instead of
the removed tables.* Map-mock API.
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