Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
52d13a7
chore: update .gitignore for database and sqlx cache
Jan 19, 2026
2f7cba6
docs: add comprehensive README with usage examples
Jan 19, 2026
6f827f9
chore: add database crate to workspace and update dependencies
Jan 19, 2026
cb65d04
feat: add database crate for game persistence
Jan 19, 2026
08529aa
docs: add sample configuration file
Jan 19, 2026
07aed8e
feat: integrate database into simulation crate
Jan 19, 2026
5c79516
refactor: update types crate for database integration
Jan 19, 2026
d3a78ad
test: add integration tests and update project docs
Jan 19, 2026
effb04c
fix: remove redundant tokio import
Jan 19, 2026
f137b71
docs: Add tech spec for initial database spike
Jan 19, 2026
b7c2d28
feat: optimize SQLite connection for better performance
Jan 20, 2026
7ad1b6a
fix: handle UUID parsing errors gracefully instead of panicing
Jan 28, 2026
3607258
docs: standardize environment variable to DATABASE_URL
Jan 28, 2026
bbe090f
feat: add GameMetadata struct for game configuration
Jan 30, 2026
2c1dac4
feat: add DatabaseWriter trait and GameHandle type
Jan 30, 2026
acfd70e
feat: implement GameEventCollector for bulk data collection
Jan 30, 2026
a5f09fb
feat: implement BulkGameWriter with single transaction logic
Jan 30, 2026
735fe00
feat: implement StreamingGameWriter for real-time persistence
Jan 30, 2026
81745ff
feat: implement transactional DatabaseWriter architecture
Jan 31, 2026
00233f1
docs: update documentation for DatabaseWriter architecture
Jan 31, 2026
d6c4033
docs: Update and cleanup README
Jan 31, 2026
1c4cb7e
style: Apply cargo fmt
Jan 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/target
target/
config.yaml
sqlite*
.sqlx/
17 changes: 14 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ Rust workspace implementing a card game simulation (President/Asshole variant) w
## STRUCTURE
```
roosevelt/
├── Cargo.toml # Workspace with 3 crates
├── Cargo.toml # Workspace with 4 crates
├── Cargo.lock
├── rust-toolchain.toml # Stable + rust-analyzer
├── rustfmt.toml # Import grouping rules
├── notes.txt # Project todo
├── database/ # Database persistence layer
│ ├── src/
│ │ ├── collectors/ # GameEventCollector, GameMetadata
│ │ ├── writers/ # BulkGameWriter, StreamingGameWriter
│ │ ├── config.rs # DatabaseConfig with writer type selection
│ │ ├── error.rs # DatabaseError types
│ │ ├── models.rs # ActionRecord, GameResultRecord
│ │ └── lib.rs
│ └── Cargo.toml
├── types/ # Core data structures
│ ├── src/
│ │ ├── action.rs
Expand Down Expand Up @@ -47,13 +55,16 @@ roosevelt/
| CLI entry point | `simulation/src/bin/run_simulation.rs` | YAML config loading, infinite loop |
| Card ordering | `types/src/card.rs` | Two is highest rank |
| Player data | `types/src/player.rs`, `player_state.rs` | Roles, hands, public/private state |
| Database writers | `database/src/writers/` | BulkGameWriter, StreamingGameWriter |
| Game recording | `database/src/collectors/` | GameEventCollector, GameMetadata |
| Database config | `database/src/config.rs` | Writer type selection |

## CONVENTIONS
- **Workspace**: Centralized dependency management in root `Cargo.toml`
- **Strategy pattern**: Dynamic dispatch via `Box<dyn Strategy>`
- **Logging**: Use `log::` facade, initialize with `env_logger::init()`
- **Formatting**: `imports_granularity = "Crate"`, `group_imports = "StdExternalCrate"`
- **No tests**: Zero test infrastructure exists
- **Testing**: Unit and integration tests exist for database, simulation, and types crates
- **CI/CD**: `.github/workflows/ci.yml` enforces fmt, clippy, build, test

## ANTI-PATTERNS (THIS PROJECT)
Expand Down
Loading