Repository navigation
docs(adr): let checked-in matches report without an operator - #322
Merged
Merged
Conversation
ADR-0024: when both players checked in at the table, by phone or by fob, POST /api/results takes the two check-ins as proof instead of an operator. Supersedes ADR-0015 on that one point. Refs #321 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BPzjRwDRcLSv7QBeECfkyS
7 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Players are going to check in at their half of the table, by phone (NFC sticker/QR) or with a key fob at the zaehlwerk hub (#321, stuttgart-things/zaehlwerk#92, stuttgart-things/zaehlwerk-firmware#63). Once both have checked in, nobody else needs to stand at the table, but ADR-0015 still requires an operator for every zaehlwerk result. The maintainer decided that checked-in matches go without one. This writes that decision down before any code, as CLAUDE.md asks of anything that contradicts an ADR.
Changes
POST /api/resultssends both check-in ids instead ofoperator_id. Schmetterpause accepts the result only if both check-ins exist, belong to exactlyhome_id/away_idon different halves, have not carried a result yet, and have not expired. Each check-in carries exactly one result.entered_via = 'checkin'.reported_bymay be null, but only forcheckin:check (reported_by is not null or entered_via = 'checkin').pending, as ADR-0015 says for the test phase.scoreboard.checked_in: trueflag, dropping the operator for all zaehlwerk matches.docs/adr/index.mdregenerated withscripts/adr_index.sh, and the ADR added to the nav inmkdocs.yml.Verified
sh scripts/docs_test.sh→ "ADR index and nav are current".go testwas not run.Left open, deliberately
accepted. The core (no operator once both have checked in) is the maintainer's call from the issue discussion. The mechanics are my proposal and are open to change in review: check-in ids in the result, a nullablereported_byinstead of an observer account, a validity of "a few hours" as a code constant.not nulland extending a CHECK constraint touch no rows) and invariant 3 (check-ins in Postgres, not Redis).Refs #321
🤖 Generated with Claude Code
https://claude.ai/code/session_01BPzjRwDRcLSv7QBeECfkyS
Generated by Claude Code