Stop counting refused matches as pending in rating status

Open
#424 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api, backend, databases

Research direction

Start with the implementation and tests for GET /api/v1/status/ratings and ADR 0069, which the issue identifies as the current behavior. Trace how the engine handles refused live updates and how pending age is calculated; the issue allows for a generated migration if tracking refusal needs a field. Update the ADR and the existing behavior test, then verify refused matches do not cause delayed while unprocessed matches past the threshold still do.

Written by the indexing model from the issue text.

Description

area:ratings enhancement

Why
GET /api/v1/status/ratings (#140, ADR 0069) counts a confirmed match recorded after the engine snapshot's last save as pending. A match the engine refuses in a live update (for example, self-reported and confirmed by one team) is never saved to the snapshot, so in a quiet period it keeps the status at delayed until the next live update or replay, at worst the weekly scheduled replay. That is not a pipeline failure: the match waits for the next replay by design.

What

  • Record when the engine refuses a live update for a match (generated migration if a field is needed).
  • Leave refused matches out of the oldest pending age. Matches the engine has not tried yet still count.
  • Update ADR 0069 and the test that records the current behavior.

Done when

  • A refused match no longer makes the status delayed.
  • A match the engine has not processed past the threshold still does.
Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 7m
Merged PRs (30d)
206

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/backend

All issues in openpickleball/backend

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.