S01 · The Bootsector · L-04

Crawler Race Fix

Difficulty
easy
Type
debugging
Session
Standard
Stack
Rust rust1.75
Domain
Concurrency
Est. solve
~25 min

01 · The task

An async crawler has a data race on its shared visited-set, dropping or double-visiting URLs. Fix the synchronization so the visited set is consistent. Grading uses a seeded scheduler — public test #1 carries an evil seed that reproduces the race immediately, so the defect fails on the first run rather than flaking.

02 · Constraints

  • Seeded scheduler

    A seeded scheduler reproduces the concurrency bug deterministically.

  • Deterministic grading

    Graded by replaying fixed inputs; behavior must be reproducible.

03 · Skills exercised

data-racesTwo threads touching the same memory without synchronization — a correctness bug.deterministic-concurrencyReproducing concurrency bugs reliably via a seeded scheduler.synchronizationCoordinating threads so shared state stays consistent.

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-04-crawler-race-fix
  3. Start the captured session

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

    promptly start stage-1-04-crawler-race-fix
  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-04-crawler-race-fix