Skip to content

feat(db): requestType discriminator + UserCommitment->ImageCaptcha rename#2635

Draft
HughParry wants to merge 1 commit into
mainfrom
feat/request-consolidation-phase1
Draft

feat(db): requestType discriminator + UserCommitment->ImageCaptcha rename#2635
HughParry wants to merge 1 commit into
mainfrom
feat/request-consolidation-phase1

Conversation

@HughParry

Copy link
Copy Markdown
Contributor

WIP

🤖 Generated with Claude Code

…ageCaptcha

Phase 1 of the captcha request consolidation (type layer only — no data
migration, physical collections unchanged).

- Add `RequestType` enum (session/powcaptcha/imagecaptcha/puzzlecaptcha) and a
  shared `RequestRecord` base; stamp `requestType` on every record schema via a
  per-type mongoose default (and explicitly on the pending-image placeholder).
- Rename `UserCommitment*` -> `ImageCaptcha*` across types, schemas, the
  `IProviderDatabase` interface, the provider-DB methods and their callers,
  keeping @deprecated back-compat aliases so consumers migrate gradually.
- Rename `ICaptchaDatabase.getCaptchas` result `userCommitmentRecords` ->
  `imageCaptchaRecords` (not aliasable).
- Live Mongo model-name strings ("UserCommitment"/"PowCaptcha") deliberately
  left unchanged; casing inconsistency documented for the Phase 2 merge.
- Add requestType unit test; update architecture.mmd.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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