Skip to content

fix(api): reject invalid purchase verify skill ids - #145

Merged
dirtybits merged 1 commit into
mainfrom
fix/reject-invalid-purchase-verify-skill-id
Aug 21, 2026
Merged

fix(api): reject invalid purchase verify skill ids#145
dirtybits merged 1 commit into
mainfrom
fix/reject-invalid-purchase-verify-skill-id

Conversation

@dirtybits

Copy link
Copy Markdown
Owner

Summary

  • return 404 Skill not found for malformed repository skill UUIDs on POST /api/skills/[id]/purchase/verify
  • reject malformed IDs before database initialization or PostgreSQL ::uuid casts while preserving supported chain- skill IDs
  • add a no-database regression and use a valid UUID fixture for the normal purchase-verification cases

Test plan

  • npm test --workspace @agentvouch/web -- __tests__/api/skills-purchase-verify.test.ts --maxWorkers=1 --no-fileParallelism
  • npm run format:check
  • npm run lint:web
  • npm run typecheck
  • npm test --workspace @agentvouch/web -- --maxWorkers=1 --no-fileParallelism
  • npm exec --workspace @agentvouch/web -- next build --webpack
  • git diff --check

The production build passed with the existing viem Tempo dynamic-import warning and expected local DATABASE_URL static-generation fallbacks. No live purchase flow was run; this is request-boundary validation only.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@dirtybits
dirtybits merged commit 6ab6d97 into main Aug 21, 2026
3 checks passed
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