Skip to content

feat(mint): canonical /mint + 308-redirect deprecated aliases (E1)#19

Merged
chitcommit merged 1 commit into
mainfrom
feat/canonical-mint-route-e1
May 27, 2026
Merged

feat(mint): canonical /mint + 308-redirect deprecated aliases (E1)#19
chitcommit merged 1 commit into
mainfrom
feat/canonical-mint-route-e1

Conversation

@chitcommit
Copy link
Copy Markdown
Member

@chitcommit chitcommit commented May 27, 2026

POST /mint is now the canonical endpoint. /v1/mint, /api/get-chittyid, /generate return 308 to /mint with deprecation reminder headers + JSON body. Sunset 2027-05-27.

Summary by CodeRabbit

  • Changes
    • Standardized the mint endpoint to a single canonical route.
    • Legacy mint endpoints now return deprecation notices and direct users to the current endpoint.

Review Change Stack

Per user decision: id.chitty.cc/mint is the canonical external mint route —
short, logical, identity-service-as-mint-front-door.

Backend stays the same (handleDirectChittyIdGeneration proxying to
mint.chitty.cc/api/mint). Frontend simplifies to /mint.

Deprecated aliases with 308 redirect + reminder headers:
- POST /v1/mint
- GET  /api/get-chittyid
- GET  /generate

All three redirect to https://id.chitty.cc/mint with:
- Status 308 (preserves method + body)
- Deprecation: true
- Sunset: 2027-05-27
- Link to successor-version + SOP-012 reference
- Warning 299 (deprecation reason)
- JSON body with _deprecation reminder for clients that ignore redirects

Refs:
- mint-discovery.md G3 (multiple competing mint endpoints)
- SOP-012 v0.3.0 (canonical format)
- User decision 2026-05-27: id.chitty.cc/mint as base

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chitcommit chitcommit merged commit 4e3afdd into main May 27, 2026
@chitcommit chitcommit deleted the feat/canonical-mint-route-e1 branch May 27, 2026 17:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fffd745e-898d-428f-96d6-42cdd920a3dd

📥 Commits

Reviewing files that changed from the base of the PR and between a4fe883 and 67a9b58.

📒 Files selected for processing (1)
  • worker.js

📝 Walkthrough

Walkthrough

The PR establishes POST /mint as the canonical ID minting endpoint and adds HTTP 308 deprecation responses with metadata headers for legacy endpoint aliases (POST /v1/mint, GET /api/get-chittyid, GET /generate), redirecting clients to the new canonical URL.

Changes

Canonical Mint Endpoint and Legacy Route Deprecation

Layer / File(s) Summary
Canonical endpoint and legacy route deprecation
worker.js
POST /mint routes directly to handleDirectChittyIdGeneration as the canonical minting endpoint. Legacy routes (POST /v1/mint, GET /api/get-chittyid, GET /generate) now return HTTP 308 with Deprecation, Sunset, Location, Link, and Warning headers plus JSON metadata pointing to https://id.chitty.cc/mint, replacing previous direct mint delegation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • chittyfoundation/chittyid#6: Both PRs modify worker.js's minting flow by wiring POST /mint to handleDirectChittyIdGeneration and/or changing that handler's direct-mint delegation logic/signature.

Poem

🐰 A mint so fine, now takes the stage,
Old paths retire—they've had their age,
With 308s and headers bright,
We guide the clients to the light,
One /mint endpoint, clean and tight! 🌟

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/canonical-mint-route-e1

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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