Commit graph

6 commits

Author SHA1 Message Date
968a38dd87 fix(tests): use per-test in-memory DB to prevent shared state conflicts
The testDB() function used cache=shared which caused UNIQUE constraint
failures when multiple tests seeded the same chip_sets row.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 08:16:50 +01:00
295844983a test(01-09): add ICM, chop/deal, tournament lifecycle, and integration tests
- 12 ICM tests: exact/Monte Carlo, validation, performance, convergence
- 6 chop/deal tests: chip chop, even chop, custom, partial, positions, tournament end
- 9 tournament unit tests: template creation, overrides, start validation, auto-close, multi-tournament, state aggregation
- 4 integration tests: full lifecycle, deal workflow, cancel, pause/resume
- Fix integration test DB concurrency with file-based DB + WAL mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 08:10:52 +01:00
75ccb6f735 feat(01-09): implement tournament lifecycle, multi-tournament, ICM, and chop/deal
- TournamentService with create-from-template, start, pause, resume, end, cancel
- Auto-close when 1 player remains, with CheckAutoClose hook
- TournamentState aggregation for WebSocket full-state snapshot
- ActivityEntry feed converting audit entries to human-readable items
- MultiManager with ListActiveTournaments for lobby view (MULTI-01/02)
- ICM calculator: exact Malmuth-Harville for <=10, Monte Carlo for 11+ (FIN-11)
- ChopEngine with ICM, chip-chop, even-chop, custom, and partial-chop deals
- DealProposal workflow: propose, confirm, cancel with audit trail
- Tournament API routes for lifecycle, state, activity, and deal endpoints
- deal_proposals migration (007) for storing chop proposals

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 07:58:11 +01:00
56a7ef1e31 docs(01-13): complete Layout Shell plan
- SUMMARY.md with all accomplishments and deviation documentation
- STATE.md updated: plan 8/14, 50% progress, decisions, session
- ROADMAP.md updated: 7/14 plans complete
- REQUIREMENTS.md: UI-01 through UI-04, UI-07, UI-08 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 04:15:37 +01:00
51153df8dd feat(01-06): implement financial transaction engine
- ProcessBuyIn with late registration cutoff and admin override
- ProcessRebuy with limit, level/time cutoff, and chip threshold checks
- ProcessAddOn with window validation and single-use enforcement
- ProcessReEntry requiring busted status with player reactivation
- ProcessBountyTransfer with PKO half-split and fixed bounty modes
- UndoTransaction reversing all financial effects
- IsLateRegistrationOpen checking both level AND time cutoffs
- GetSeasonReserves for season withholding tracking
- Rake split transactions per category (house, staff, league, season_reserve)
- Full audit trail integration for every transaction
- WebSocket broadcast for real-time updates
- 14 passing tests covering all flows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 04:11:58 +01:00
af13732b2b feat(01-01): initialize Go module, dependency tree, and project scaffold
- Go module at github.com/felt-app/felt with go-libsql pinned to commit hash
- Full directory structure per research recommendations (cmd/leaf, internal/*, frontend/)
- Makefile with build, run, run-dev, test, frontend, all, clean targets
- LibSQL database with WAL mode, foreign keys, and embedded migration runner
- SvelteKit SPA stub served via go:embed
- Package stubs for all internal packages (server, nats, store, auth, clock, etc.)
- go build and go vet pass cleanly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 03:34:44 +01:00