feat: play the Lemonade Stand on the web and through /api/stand #2

Merged
binjovi-bot merged 4 commits from game-20261012 into trunk 2026-10-12 13:39:00 +00:00
Owner

Stacked on PR 1 (skeleton). Release PR 1 first.

What

  • Pages: / title screen (no database), /stand with the order form, DAY RESULTS, THE STAND IS CLOSED and a ledger of the last ten days. The 5250 wording is kept.
  • JSON API: GET /api/stand, POST /api/stand/day, POST /api/stand/play, POST /api/stand/reset, GET /api/stand/history.
  • Every rule stays in Db2: LM_OPENDAY, LM_PLAYDAY, LM_NEWGAME, LM_GCOST, rule SIGNCOST.
  • The player is the HTTP session (W + 9 random characters). Cookie LEMONADE: Secure, HttpOnly, SameSite=Lax, 7 days.
  • Errors: 75008 → 409 cannot-afford; 75001 → 409 no-open-day (or 429 busy when the days are exhausted); 75002 or bad input → 422 invalid-order; other → 503 unavailable, no SQL text.
  • lemonade.days-per-hour (120): the ledger day counter is global and stops at 99999.

Tests

  • gradle check bootJar in the java-builder image: 42 tests pass, 5 live tests skipped.
  • scripts/live-smoke.sh against SOMEARA2: all 5 live tests pass, including a whole day through GameService + JdbcStandRepository (open, the same day again, cannot afford, play, no open day, history, reset).
Stacked on PR 1 (skeleton). Release PR 1 first. ## What - Pages: `/` title screen (no database), `/stand` with the order form, DAY RESULTS, THE STAND IS CLOSED and a ledger of the last ten days. The 5250 wording is kept. - JSON API: `GET /api/stand`, `POST /api/stand/day`, `POST /api/stand/play`, `POST /api/stand/reset`, `GET /api/stand/history`. - Every rule stays in Db2: `LM_OPENDAY`, `LM_PLAYDAY`, `LM_NEWGAME`, `LM_GCOST`, rule `SIGNCOST`. - The player is the HTTP session (`W` + 9 random characters). Cookie `LEMONADE`: Secure, HttpOnly, SameSite=Lax, 7 days. - Errors: 75008 → 409 `cannot-afford`; 75001 → 409 `no-open-day` (or 429 `busy` when the days are exhausted); 75002 or bad input → 422 `invalid-order`; other → 503 `unavailable`, no SQL text. - `lemonade.days-per-hour` (120): the ledger day counter is global and stops at 99999. ## Tests - `gradle check bootJar` in the java-builder image: 42 tests pass, 5 live tests skipped. - `scripts/live-smoke.sh` against SOMEARA2: all 5 live tests pass, including a whole day through `GameService` + `JdbcStandRepository` (open, the same day again, cannot afford, play, no open day, history, reset).
Spring Boot 4.1.1 on JDK 25, built with Gradle 9.8.1 in the java-builder
image. One repository, the package cache; the Spring Boot plugin and the
BOM come from Maven Central; gradle/verification-metadata.xml pins every
dependency by SHA-256.

- JTOpen 21.0.7 (java11) JDBC over TLS with access=read call, at most
  two pooled connections, none opened at start
- landing page at /, health component pub400 on management port 8081
- LivePub400SmokeTest and scripts/live-smoke.sh for SOMEARA1/SOMEARA2
- Argo CD application and manifests for lemonade.sean.farm, checked by
  ManifestsTest
Hikari calls setReadOnly(false) on each new connection. Under
access=read call JTOpen refuses that with "Connection authorization
failure occurred", so no connection opened. A read-only pool works, and
the lemonade procedures still commit through CALL (live test against
SOMEARA2).
sean force-pushed game-20261012 from 2b26bccbdb to 7ff6f256fc
All checks were successful
binjovi/ci Binjovi completed the frozen plan
2026-10-12 12:59:51 +00:00
Compare
binjovi-bot deleted branch game-20261012 2026-10-12 13:39:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/lemonade!2
No description provided.