Skip to content

Stage 6C — Reconciliation Hook & Full Tournament Integration #11

Description

@KineticTactic

Starts after: Stages 6B complete. Stage 5 must also be merged.

What this is: The wiring that connects room completion → bracket advancement → round detection. Everything before this stage was built in isolation; this stage proves they compose correctly end-to-end.

Tasks

  1. Complete Reconciliation Worker tournament hook

    • In the reconciliation_queue worker: after writing ContestRoom final results to MongoDB, check if contestId belongs to a knockout contest.
    • If yes: call the bracket advancement hook from Stage 6B.
    • Works for both 1v1 and 3v3 rooms (maps team result to ContestStanding).
  2. Full pipeline stress test

    • 8-player knockout (3 rounds). All real CF accounts.
    • Verify: correct participants advance at each round, bracket state is correct at every step, final winner recorded in Contest.winner.
    • Verify: all room:<id>:* Redis keys deleted after each room ends.
    • Verify: all contest:<id>:* Redis keys deleted after the contest completes.
  3. Redis cleanup verification

    • After every room ends: all room:<id>:* keys deleted.
    • After tournament completes: all contest:<id>:* keys deleted.

Testing Gate

  • Full 8-player knockout stress test passes without errors.
  • Two rooms finishing simultaneously does not double-advance anyone or trigger duplicate round completion.
  • All Redis keys cleaned up after full tournament.
  • Contest.winner populated correctly at the end.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions