S02 · Distributed Chaos · L-07

Vector Clock

Difficulty
medium
Type
generation
Session
Standard
Stack
Go go1.22
Domain
Distributed
Est. solve
~25 min

01 · The task

Build a vector clock from empty stubs against a fixed API — Tick, Merge, and Compare. The signatures ship in the kit; the causality semantics each one has to honor are yours to work out and get exactly right.

02 · Constraints

  • Closed API

    Implement against fixed signatures — don't change the public interface.

  • No external dependencies

    Solve it with the standard library only.

03 · Skills exercised

distributed-primitivesSmall building blocks (clocks, registers) that distributed systems compose.causalityTracking happens-before relationships between distributed events.vector-clocksPer-node counters that order events and detect concurrency.

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 vclock/ and starts the solve clock — cd in before the next step.

    promptly init vclock
  3. Start the captured session

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

    promptly start
  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. Then cd vclock and drive your harness.

promptly play vclock