feat(sandbox): add test counter and SQLite load actors#4500
feat(sandbox): add test counter and SQLite load actors#4500NathanFlurry wants to merge 2 commits intomainfrom
Conversation
… actors Add three new test actors to the sandbox example: - testCounter: simple in-memory state counter - testCounterSqlite: SQLite-backed counter using rivetkit/db - testSqliteLoad: 50 migrations with a runLoadTest action that executes 20 SQLite queries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🚅 Deployed to the rivet-pr-4500 environment in rivet-frontend
|
PR Review: feat(sandbox): add test counter and SQLite load actorsOverall this is a clean, well-structured addition. The three actors follow RivetKit conventions consistently and demonstrate both in-memory and SQLite-backed state patterns nicely. A few things worth addressing: Issues
The migration creates a table seeded with
Several places in
The 20 queries run sequentially with no transaction. If the actor crashes mid-run the database is left in a partially inserted state. Wrapping the inserts in a transaction would make the test hermetic and also demonstrate SQLite transactional capability. Minor
The increment action does an UPDATE followed by a SELECT to return the new value. If the bundled What is working well
|
Summary
testCounteractor: simple in-memory state counter with increment/getCount/resettestCounterSqliteactor: same counter interface backed by SQLite viarivetkit/dbtestSqliteLoadactor: 50 migrations inonMigrate,runLoadTestaction runs 20 diverse SQLite queries (inserts, selects, joins, aggregates, updates)Test plan
🤖 Generated with Claude Code