Spaces:
Paused
Paused
File size: 4,876 Bytes
a0ceb1f 51e964a 626842d ee34154 135e328 ee34154 135e328 ee34154 135e328 ee34154 626842d 135e328 626842d ee34154 135e328 ee34154 135e328 ee34154 135e328 ee34154 135e328 ee34154 626842d 135e328 ee34154 135e328 ee34154 8dc0b0d 626842d 135e328 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # STATUS
_Updated 2026-10-30 during SQLite recovery and request-load reduction._
## Current product
The **cuddly happy game platform** remains a social-deduction platform with the dark parlor identity and existing mark. The lobby supports real-player matchmaking and a repeating poll. At five players, the default game is **The Midnight Parlor**, a playable discussion/investigation/vote/reveal loop. `/inference` remains secondary.
## Implemented now
- First visit: GSAP 3.15 door sequence and skippable personal questions. All submitted answers are stored on the user's profile and in SQLite telemetry in one transaction; skipping remaining prompts preserves answers already entered. The forget action removes both copies. Answers are not analyzed or used for roles in this build.
- Game: random private role assignment; per-round private Investigator clue; discussion → vote → reveal; wrong accusation removes a guest; win ends the room. Room state/actions are member-only and persisted; role maps are never returned to other players.
- Roles: backend-configurable catalog through `GAME_SETTINGS_JSON`; structured, consented numeric signal interface exists for future role matching. No model/text analysis or player text generation is connected.
- Game/chat frontend: `gameplay.js`, private role card, clues, vote controls/results, chat, phase updates via WebSocket + polling.
- GSAP official skills are project-local under `.agents/skills/`; CDN is pinned with SRI and CSS/reduced-motion fallback.
- Lobby queue controls include CSS `hidden` fix and idempotent same-session joins.
- SQLite defaults to `/data/app.db`, uses additive migration, warns if another legacy database is present, and never auto-merges database files.
- New database behavior: if `/data/app.db` is absent, create a new empty database. `instance/app.db` is never auto-imported. Existing SQLite databases get an integrity check before migrations.
- Simulation is enabled by default for this test Space, capped at 10 stable identities; bot chat is at most once per conversation per minute. `TEST_MODE=false` disables it.
- Lobby participation initially requires at least 3 words in a message (`MATCHMAKING_MIN_WORDS`); shorter messages remain visible but do not count.
- WebSocket-connected clients no longer continuously poll; fallback intervals are 15–30 seconds. Telemetry batches events, and successful polling GETs are no longer individually logged.
- Health/static requests do not create guest accounts; regression coverage prevents liveness probes from generating users.
## APIs
- Onboarding: `GET|POST|DELETE /api/onboarding`
- Queue/lobby: `/api/lobby/state`, `POST|DELETE /api/matchmaking/queue`, `/api/lobby/chat`, minigame vote endpoints
- Game: `GET /api/room/<id>/game`, `POST /api/room/<id>/game/action`
- Room chat: `/api/room/<id>/chat`, `/api/room/<id>/messages`
- Realtime: `/ws/lobby`, `/ws/room/<id>`
- Protected generation: `/internal/lobby/chat/generation`
`agents.md` has detailed payloads/config. The questionnaire's future-use flag is not consumed by the game or any analyzer.
## Verification
- Python compilation passed after the current changes.
- Node syntax checks passed for lobby, room, gameplay, and telemetry scripts.
- `python -m unittest discover -s tests -v`: 3 tests passed on disposable SQLite, including word-gated participation, batched telemetry, and the 10-account cap.
- No mounted database was used by tests. No browser visual test or live WebSocket handshake has been run; browser/DOM/linter tools are not installed here.
## Git / operations
- Current code change is committed locally as `626842d`; it has not been pushed because the configured remote (`igardner/StockAnalysis`) differs from an older project note. Confirm the intended Space before pushing.
- No manual container restart was run. A live Python app process was observed after the DB file reappeared; the code changes are not loaded into that process. A push may trigger an automatic build.
- The malformed `/data/app.db` was removed after a matching SHA-256 copy was preserved at `/data/recovery-source-app.db`; `/app/instance/app.db` was left untouched. The runtime subsequently recreated `/data/app.db`; read-only integrity check passed. The running process is still pre-change code. Aggregate inspection showed 313 non-bot users and 313 `user_create` events, consistent with sessionless health requests hitting the guest-creation hook; the hook now excludes `/health` and static assets. The recovery copy remains malformed and is not a live database.
- The supplied runtime traceback reported Python 3.13, while the checked-in Dockerfile specifies Python 3.11. Confirm deployed commit/image before changing the Docker base image.
- Runtime scheduler assumes the current single Gunicorn worker; add a cross-process lease/external worker before increasing worker count.
|