Skip to content

Time predictions only support solo solves — extend to duo/team or handle gracefully #129

@JanMikes

Description

@JanMikes

Problem

GetPlayerPrediction and the related puzzle intelligence pipeline only compute predictions for solo solves. When a player submits a duo or team result, the recap page used to still render the solo-based prediction because the controller mistakenly treated duo solves as solo (detected via teamId === null, which is also true for duos since only team solves have a team_id in the puzzle_solving_time.team JSON).

Current state (after quick fix)

src/Controller/AddedTimeRecapController.php now uses \$solvingPuzzle->players === null to detect solo — same approach as GetResultImage and GetPlayerResultsController. For duo and team solves, the entire solo-specific recap block (ranking, performance summary with prediction, history, overall progress) is now hidden.

This is a cosmetic workaround. The recap for non-solo solves is now essentially just the shareable result image and a link to the puzzle detail.

TODO

Decide and implement one of:

  1. Extend puzzle intelligence to duo/team — compute baselines, difficulty, and predictions separately for duo and team results. This is the proper fix but is a larger piece of work touching:

    • PlayerBaselineCalculator, PuzzleDifficultyCalculator, PlayerSkillCalculator, DerivedMetricsCalculator, MspRatingCalculator
    • GetPlayerPrediction, GetRanking, GetPlayerSkill, GetPlayerRatingRanking
    • The PlayerBaseline, PuzzleDifficulty, PlayerSkill, PlayerElo entities (likely need a puzzling_type dimension)
    • Fixtures, tests, and the cron recalc command
  2. Design a duo/team-specific recap — show something meaningful for non-solo solves (e.g. team composition, each teammate's contribution stats, pair ranking against other pairs) rather than the empty recap we have now.

References

  • Controller: src/Controller/AddedTimeRecapController.php
  • Prediction query: src/Query/GetPlayerPrediction.php
  • Puzzle intelligence design doc: docs/features/puzzle-intelligence/README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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