Skip to content

Fix/issues 399 400 401 402#413

Merged
hman38705 merged 4 commits intosolutions-plug:mainfrom
chukwudiikeh:fix/issues-399-400-401-402
Mar 29, 2026
Merged

Fix/issues 399 400 401 402#413
hman38705 merged 4 commits intosolutions-plug:mainfrom
chukwudiikeh:fix/issues-399-400-401-402

Conversation

@chukwudiikeh
Copy link
Copy Markdown
Contributor

fix: resolve API/contract drift, duplicate entrypoints, and error schema gaps (#399 #400 #401 #402)

This PR addresses four open issues across the backend API and smart contracts:

Closes #399
Closes #400
Closes #401
Closes #402

…tions-plug#401)

Single canonical cancel_market_admin function remains in lib.rs,
delegating to modules::cancellation::cancel_market_admin. Added doc
comment to make the canonical entrypoint explicit. ABI is unchanged.
…age (solutions-plug#402)

Single get_dispute_window implementation in modules/resolution.rs using
DEFAULT_DISPUTE_WINDOW_SECONDS (72h). Removed undefined DISPUTE_WINDOW_SECONDS
reference. Added unit tests covering default value, configured value, and
minimum-clamp enforcement.
…lutions-plug#399)

ApiError now includes a machine-readable 'code' field alongside 'message'.
Error constructors (internal, bad_request, not_found, conflict, rate_limited)
ensure all handlers map errors consistently. OpenAPI ApiError schema updated
to require both 'code' and 'message' fields with example values.
…mes (solutions-plug#400)

- Server URL updated from localhost:3001 to localhost:8080 to match
  default API_BIND_ADDR (0.0.0.0:8080) in config.rs
- ApiKeyAuth security scheme declared (X-API-Key header)
- Security applied to all admin routes: resolveMarket, emailPreview,
  emailSendTest, getEmailAnalytics, getEmailQueueStats
- Contract tests added (openapi_contract_test.rs) validating spec-vs-runtime
  route parity, server URL, security scheme declaration, and ApiError schema
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@chukwudiikeh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@hman38705 hman38705 merged commit 6887cd0 into solutions-plug:main Mar 29, 2026
2 of 13 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

2 participants