S01 · The Bootsector · L-02
Bounded Ring Buffer
- Difficulty
- easy
- Type
- generation
- Session
- Standard
- Stack
- Go go1.22
- Domain
- Data Pipelines
- Est. solve
- ~25 min
01 · The task
Implement a mutex-backed bounded FIFO queue from empty signatures: blocking Push/Pop with a fixed capacity, safe under concurrent producers and consumers. The interface and tests are given; you write the implementation.
02 · Constraints
Thread-safe
Must be correct under concurrent producers and consumers.
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 the current folder and starts the solve clock.
promptly init stage-1-02-bounded-ring-bufferStart the captured session
Then drive your AI tool — the daemon meters every prompt and token live.
promptly start stage-1-02-bounded-ring-bufferSubmit 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-02-bounded-ring-buffer