Skip to content

feat: add platform webhook verification for console match reports - #1454

Open
Sophtassilk wants to merge 3 commits into
Arenax-gaming:mainfrom
Sophtassilk:feat/issue-1399-backend-implement-game-platform-verification
Open

Sophtassilk wants to merge 3 commits into
Arenax-gaming:mainfrom
Sophtassilk:feat/issue-1399-backend-implement-game-platform-verification

Conversation

@Sophtassilk

Copy link
Copy Markdown

Overview

This PR adds server-to-server verification for console match score reports. On score submission, matches are moved to a pending-verification state and a platform API verification call is enqueued; the platform's response either confirms the result (→ verified), flags a mismatch (→ auto-flagged for human review), or times out after N minutes (→ escalated to admin review).

Related Issue

Changes

🔗 Platform Verification Webhook

  • [MODIFY] backend/src/service/match_service.rs

    • Score submission now sets the match to pending-verification and enqueues a platform API verification call instead of immediately finalizing the result.
    • Handles the verification outcome: confirmed → verified, mismatch → auto-flagged for human review, timeout after N minutes → escalated to admin review.
  • [MODIFY] backend/src/service/platform_links.rs

    • Adds the platform API verification call used by the webhook step, resolving the linked platform account for the match.
  • [MODIFY] backend/src/models/match_models.rs

    • Adds the pending-verification / verified / flagged match states and verification metadata used by the service layer.
  • [MODIFY] backend/src/service/mod.rs

    • Registers the new verification flow in the service module.
  • [ADD] backend/migrations/20261021000001_platform_match_verification.up.sql

    • Schema for match verification state and platform verification records.
  • [ADD] backend/migrations/20261021000001_platform_match_verification.down.sql

    • Reverses the verification schema changes.
  • [ADD] backend/tests/platform_verification_test.rs

    • Stubs the platform API to return a confirmed match and asserts the match becomes verified.

Verification Results

cargo test --test platform_verification_test
✅ platform_verification_test passed (stubbed confirmed match → match verified)
Acceptance Criteria Status
On score submission, the match is set to pending-verification and a platform API call is enqueued ✅ Handled in match_service.rs
The platform API response confirming the match result moves the match to verified ✅ Confirmed response transitions match to verified
If the platform reports a mismatch, the match is auto-flagged for human review ✅ Mismatch path flags match for review
Timeout without a platform response after N minutes escalates to admin review ✅ Timeout path escalates to admin review
A test stubs the platform API to return a confirmed match and asserts the match becomes verified ✅ backend/tests/platform_verification_test.rs

Closes #1399

@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

@Sophtassilk is attempting to deploy a commit to the paul joseph's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

@Sophtassilk 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

@Sophtassilk

Copy link
Copy Markdown
Author

this PR is ready for another review. I resolved the merge conflicts with the main branch (pushed 2a6b95b).
Files changed: contracts/analytics/src/lib.rs, frontend/e2e/auth.spec.ts

@Sophtassilk
Sophtassilk force-pushed the feat/issue-1399-backend-implement-game-platform-verification branch from 2a6b95b to b67f76c Compare November 10, 2026 23:40

This branch has not been deployed

No deployments
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.

[Backend] - Implement game platform verification webhook for console match reports

1 participant