Skip to content

docs: truth up architecture, write-gating, and conventions - #310

Merged
amrtgaber merged 1 commit into
mainfrom
docs-truth-up
Jul 27, 2026
Merged

docs: truth up architecture, write-gating, and conventions#310
amrtgaber merged 1 commit into
mainfrom
docs-truth-up

Conversation

@amrtgaber

Copy link
Copy Markdown
Contributor

Summary

Close-out documentation sweep after the generalization work — every drifted passage found by auditing the docs against current code:

Pre-existing drift (predates this week):

  • README's architecture section still described the LISTEN/NOTIFY nudge spine that Introduce PgBouncer connection pooling (DB conn ceiling) #196 replaced: the worker "emits a pg_notify" and the api "runs a dedicated LISTEN connection". Rewritten to the real design — the worker bumps nudge_versions in-transaction (now tagged with the touched tournaments), each api instance polls it through the pooled engine, no session-pinned connection anywhere. Diagram labels updated; the api bullet's stale min=1 max=10 replaced with the event_mode-driven reality.
  • README's Authentication section said owner rows are "inserted directly (SQL) for now; an API … is planned" — the owners API has existed for a while and is listed ten lines above. Replaced with the truth, plus a sentence on the one write that is still out-of-band by design: tournament_creators grants.
  • LISTENER_ENABLED descriptions (README env table + app/config.py comment) updated to "nudge poll loop + SSE fan-out"; a note records that the env var name predates Introduce PgBouncer connection pooling (DB conn ceiling) #196 and stays as deployment contract.

Drift from this week's changes:

  • README write-endpoints: POST /v1/tournaments no longer says "any authenticated user may" — it documents the creator allowlist and the can_create_tournaments gate; the PATCH bullet lists the real editable field set (rank_by included).
  • CLAUDE.md: NudgeVersion + TournamentCreator added to the entity groups, and two new convention bullets — Tournament write guards (creator allowlist, the SUPPORTED_TOURNAMENT_LEADERBOARD_IDS id-allowlist-not-name-check lesson, the two caps) and SSE nudge payload (tournament_ids contract and per-tick scoping semantics).

Docs-only plus one comment; suite still 600 passed.

Deliberately NOT touched: infra/README.md's cost-baseline paragraph still describes the retired db-f1-micro era — cost numbers should only be rewritten against billing actuals, so that's flagged for a future cost-audit pass rather than hand-edited here.

@amrtgaber
amrtgaber merged commit b4d6b1d into main Jul 27, 2026
3 checks passed
@amrtgaber
amrtgaber deleted the docs-truth-up branch July 27, 2026 00:34
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.

1 participant