CI / Build and push docker image (push) Successful in 1m45s
New tavolo-briscola distribution implementing briscola on the platform: - pure rules (state.py, engine.py): 3-card deals, a face-up trump that is the last card drawn, trump-first trick resolution (A > 3 > K > H > J > 7 > 6 > 5 > 4 > 2), 120 points per deal, 60-60 patta re-deals, a configurable target score (default 61), deal-end acknowledgements and turn auto-play; - BriscolaEngine (briscola, 2 players) and BriscolaQuattroEngine (briscola_a_quattro, 4 players in fixed partnerships) adapters; - registered in tavolo-app, packaged in the Docker image, documented. Platform fixes surfaced by a two-player lobby: - the websocket state and snapshot payloads now carry seats_open (they were only in the REST lobby payload), so lobbies with player counts other than four render correctly; seats_open is clamped at zero; - the web client logs unparseable server messages instead of silently dropping them. Web client: briscola table for both variants (stock, face-up trump, trick, last-trick banner), deal summary modal and game-over overlay. Tests: tavolo-briscola rules/adapter suites, app integration tests (lobby, websocket play, turn timeout, deal-end acks, persistence), a platform seats_open test and frontend model parsing tests.
1.6 KiB
1.6 KiB
tavolo-app
The deployable tavolo application: the composition root wiring
tavolo-platform to the
tavolo-scopone and
tavolo-briscola games.
Contents
app.py— assembles theKayaApp(session/OIDC/Tortoise/OpenAPI mixins plusPlatformMixinand the deadline scheduler), registers theScoponeEngine,BriscolaEngineandBriscolaQuattroEnginewith their configured timeouts, and exposestavolo.app:appfor granian.config.py— environment-driven frozenSettings.telemetry.py— the optional OpenTelemetry wiring beyond kaya-otel: meter/tracer/logger providers, thetavolo.active_users/tavolo.ongoing_gamesgauges (polled from the stores), process/CPython metrics viaopentelemetry-instrumentation-system-metrics, Postgres/Redis query spans via the asyncpg/redis instrumentations, and OTLP log export.aerich_config.py— Tortoise ORM configuration consumed by the aerich CLI (migrations live inserver/migrations/; aerich itself is configured via the[tool.aerich]section ofserver/pyproject.toml).logging_config.py— logging setup.static.py— SPA shell hosting for the compiled frontend.
Development (from packages/tavolo-app/)
.venv/bin/python -m mypy --namespace-packages --explicit-package-bases \
src/tavolo/app.py \
src/tavolo/config.py \
src/tavolo/telemetry.py \
src/tavolo/static.py \
src/tavolo/aerich_config.py \
src/tavolo/logging_config.py
End-to-end coverage of the wired stack lives in server/tests/.