S01 · The Bootsector · L-05
ORM N+1 Fix
- Difficulty
- easy
- Type
- debugging
- Session
- Quick
- Stack
- Python python3.11
- Domain
- Database
- Est. solve
- ~20 min
01 · The task
One route in a small orders service gets dramatically chattier with the database as its result set grows, while its neighbors stay lean. Work out what makes that endpoint's data access blow up with size and bring it back down to a flat, predictable cost.
02 · Constraints
No N+1 queries
The endpoint must issue a bounded number of queries.
03 · Skills exercised
How to playDaemon
The whole level runs through the local promptly daemon — it pulls the workspace, captures your token usage, tests locally, and submits the ranked run.
Pair this machine
One-time — approve the code under your devices.
promptly pairPull the workspace
Downloads the starter kit into
nplus1/and starts the solve clock —cdin before the next step.promptly init nplus1Start the captured session
Then drive your AI tool — the daemon meters every prompt and token live.
promptly startSubmit for ranked grading
Runs the full hidden suite and ends the attempt.
promptly submit
Or combine steps 02–03 into one commandShortcut
promptly play pulls the workspace, launches the daemon, and starts the captured session in a single step — the same as running init then start. Then cd nplus1 and drive your harness.
promptly play nplus1