S01 · The Bootsector · L-01
LRU Eviction Debug
- Difficulty
- easy
- Type
- debugging
- Session
- Quick
- Stack
- Go go1.22
- Domain
- Core Algorithms
- Est. solve
- ~20 min
01 · The task
A fixed-capacity cache is dropping the wrong keys: under some access patterns it discards entries that should have survived and holds on to ones a true LRU would have evicted first. Dig into how it tracks usage over time and get its eviction order back in line with least-recently-used.
02 · Constraints
No external dependencies
Solve it with the standard library only.
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
lru/and starts the solve clock —cdin before the next step.promptly init lruStart 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 lru and drive your harness.
promptly play lru