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

An in-process cache service evicts the wrong entry under a specific access pattern. Somewhere in the cache layer, recency bookkeeping is broken — locate the eviction-order bug among the service's modules and fix it at its single site so the least-recently-used key is the one removed on overflow.

02 · Constraints

  • No external dependencies

    Solve it with the standard library only.

03 · Skills exercised

bug-localizationPinpointing the single faulty site from a failing behavior — read before you patch.data-structuresChoosing and correctly wiring the structure (list, map, heap) the problem needs.

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.

  1. Pair this machine

    One-time — approve the code under your devices.

    promptly pair
  2. Pull the workspace

    Downloads the starter kit into the current folder and starts the solve clock.

    promptly init stage-1-01-lru-eviction-debug
  3. Start the captured session

    Then drive your AI tool — the daemon meters every prompt and token live.

    promptly start stage-1-01-lru-eviction-debug
  4. Submit 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.

promptly play stage-1-01-lru-eviction-debug