Track A — Coding Under Time Pressure

The reported onsite has two coding rounds, and the first uses a progressive multi-part format that the source candidate explicitly said he did not know how to prepare for (../../research/source-report.md row 41). That makes it the least-practised round in the loop and the highest-leverage thing in this program.

This track is not a LeetCode grind. It is a taxonomy of stateful systems problems built to match what these loops reportedly ask.

→ Study guide: WARMUP.md — the ten patterns from first principles, with complete runnable implementations, complexity tables and failure modes. Read that to learn the material; read this file to know what to practise and how you are scored.

QUIZBANK.md — 150 questions asked after your code works, with mechanism-level answers. The round is not decided by the tests passing; it is decided by the ten minutes afterwards when the interviewer asks why. Work a harness problem, then answer that section out loud before reading it.


Table of Contents


What This Round Actually Is

Three reported facts define it:

  1. Progressive gates. Each problem has roughly four stages of increasing difficulty. Each stage must work before the next opens. The reported pass bar is clearing two; at least one source reports a stricter bar. Assume the stricter one — the asymmetry of that error is total.
  2. Volume. Multiple sources report that you write substantially more code than in a typical FAANG interview, and that solutions are judged on production quality — real edge cases, maintainable structure — not on cleverness.
  3. Practical, not algorithmic. One source states flatly that string-manipulation puzzles do not appear. What appears is stateful data structures, versioning, streaming, parsing, caching, scheduling, and concurrency.

The structural consequence, and it is not obvious: the gated format inverts the normal optimization. In a standard round you can spend fifteen minutes designing before writing. In a gated format, every minute of upfront design is stolen from stages 2–4, and a gate you never open scores zero regardless of how elegant your unwritten design was.

So you need a habit most senior engineers have spent a decade unlearning: build the smallest correct thing fast, then extend it under pressure. But — and this is the tension the format actually tests — your stage-1 code must be extensible, because you will be extending it in eight minutes with no warning about the direction.

Fast and extensible. That is trainable, and this track trains it.


Concept Inventory

Every item names the file that teaches it and the problem that drills it.

A1. Stateful data structures

ConceptTaught inDrilled by
Versioning and MVCCharness/problems/versioned_kv/README.mdversioned-kv
Snapshot isolation, write skewsameversioned-kv gate 4
Tombstones and logical deletionsameversioned-kv gate 2
Compaction and reachability GCsameversioned-kv gate 3
Predecessor queries and why they need ordersameversioned-kv gate 1
LRU via intrusive linked list + dictTrack A drill noteslru-ttl-cache
TTL: lazy vs sampled vs active expirysamelru-ttl-cache gate 2
Write-ahead logging and replaysamewal-store
Inverted indexes and segment mergingsametext-index

A2. Streaming and incremental algorithms

ConceptTaught inDrilled by
Online vs offline algorithmsharness/problems/token_stream_differ/README.mdtoken-stream-differ
Delta records vs state snapshotssametoken-stream-differ gates 3–4
Bounded lookahead as the price of being onlinesametoken-stream-differ gate 2
Checkpoint / rollback / undo semanticssametoken-stream-differ gates 3–4
Chunk-boundary-safe tokenizationcatalog briefstreaming-parser
Windowed deduplication and its correctness costcatalog briefevent-dedupe
Resumable iteration with serializable state../../diagnostics/ANSWER-KEY.mdresumable-iterator

A3. Concurrency and backpressure

ConceptTaught inDrilled by
Bounded queues and real backpressurecatalog briefbounded-queue-backpressure
Graceful shutdown and drainsamebounded-queue-backpressure gate 2
Cancellation propagationTrack Bbounded-queue-backpressure gate 3
Bounded concurrency (semaphores)catalog briefasync-crawler
Per-key sharded lockingcatalog briefrate-limiter gate 3
Single-flight / stampede controlcatalog brieflru-ttl-cache gate 4
Load shedding vs queueingTrack Cbounded-queue-backpressure gate 4

A4. Rate limiting and scheduling

ConceptTaught inDrilled by
Token bucket, lazy refill, injectable clockscatalog briefrate-limiter
Fixed vs sliding window, and the boundary burstsamerate-limiter gate 2
Distributed limiting, fail-open vs fail-closedsamerate-limiter gate 4
Heap-based delayed execution, deterministic tiescatalog briefjob-scheduler-inmem
Fixed-rate vs fixed-delay recurrencesamejob-scheduler-inmem gate 2
Backoff with jitter (full / equal / decorrelated)../README.mdjob-scheduler-inmem gate 3
Priority without starvation; per-tenant capssamejob-scheduler-inmem gate 4

A5. Parsing and memory

ConceptTaught inDrilled by
Char-level state machines over regexescatalog briefstreaming-parser
Dependency graphs, topological order, cycle detectioncatalog briefspreadsheet-eval
Incremental recomputationsamespreadsheet-eval gate 3
Symlink resolution and ELOOPcatalog briefpath-resolver
__slots__, measuredTrack Bobject-pool gate 2
memoryview and zero-copyTrack Bobject-pool gate 3
Bloom/cuckoo filters and error directioncatalog briefevent-dedupe gate 3

The Progressive Harness

cd tracks/coding/harness
./progressive.py list                       # the catalog
./progressive.py start token-stream-differ  # begin; prints gate 1 ONLY
./progressive.py test  token-stream-differ  # run current gate; unlock on pass
./progressive.py chart                      # time-to-first-gate trend

The harness enforces the format's actual constraint: gate N+1 is not printed until gate N's tests pass. You cannot design for requirements you have not seen, which is precisely the difficulty the real round exercises.

It records, per gate: wall-clock time at first pass, and how many test runs it took. From that it derives the metric that matters — see below.

Rules for using it honestly:

  • Do not read problems/*/README.md or solution.py before finishing. They contain the gate structure.
  • Do not open the gate tests. Same reason.
  • Narrate out loud, recorded, every time.
  • When the budget expires, stop. A problem finished in 70 minutes tells you nothing about a 45-minute round.

The Problem Set

Fifteen problems, four gates each. Run ./progressive.py list for the live catalog.

ProblemThemesBudgetGatesSource-report link
versioned-kvstate, memory45mRow 7 — the reported screen question
token-stream-differstreaming, state, memory45mRows 19–20 — the reported onsite question
rate-limiterstate, concurrency40mCorroborated as a recurring pattern
lru-ttl-cachestate, memory40mCorroborated as a recurring pattern
resumable-iteratorstate, memory, streaming40mCorroborated; also the D1 diagnostic
job-scheduler-inmemscheduling, concurrency45mCompanion to row 8's design question
streaming-parserparsing, streaming45mOff-report breadth
spreadsheet-evalparsing, state45mCorroborated (dependency evaluation)
path-resolverstate, parsing35mCorroborated (cd with symlinks)
bounded-queue-backpressureconcurrency, streaming45mRow 23 — concurrency theme
wal-storestate, memory45mOff-report breadth
text-indexstate, memory, streaming45mYour home turf — should be your fastest
event-dedupestate, memory, streaming40mFeeds the webhook project
async-crawlerconcurrency, streaming45mCorroborated (multithreaded crawler)
object-poolmemory, concurrency35mRow 23 — memory-efficiency theme

All fifteen have automated gate tests — 60 gates, all green. Run them against the reference solutions any time with python3 harness/runtests.py; the whole suite takes about six seconds. Each problem's solution.py carries a module docstring explaining the representation that survives all four gates, and the harness prints the WARMUP chapter that teaches the pattern once you finish.

Roughly a quarter of the set is deliberately off the source report. One candidate account must not be allowed to narrow preparation into a blind spot — see the anti-narrowing clause.


Drill Set

DrillCadenceWhat it trains
Full gated run3×/weekThe actual round. One problem, budget enforced, narrated, recorded
Gate-1 sprintDaily, 12 minOnly gate 1 of a fresh problem. Trains time-to-first-correct in isolation
Cold re-runWeeklyA problem from ≥3 weeks ago, from scratch. Exposes memorization vs skill
Extension drillWeeklyTake a finished problem and have me invent a fifth gate. Trains extending under surprise
Invariant-firstEvery problemWrite the assertion that pins the tricky invariant before implementing
Typing throughput10 min, 3×/weekType a known-good 120-line solution from memory. Reported signal is code volume; keyboard speed is a real, trainable variable
Narration-onlyWeeklySolve with your hands off the keyboard, speaking the code. Brutal, and it fixes the go-silent-when-stuck reflex faster than anything else

Time-to-First-Correct

The metric the whole track optimizes. ./progressive.py chart plots it.

Why it dominates: in a gated format an unopened gate scores zero. Two candidates who both understand the problem perfectly, one reaching gate 1 at minute 8 and the other at minute 20, do not finish 12 minutes apart — they finish one to two gates apart, because the later gates are where the time goes.

Time to G1ReadingThe fix
≤ 8 minStrongWork on extensibility, not speed
9–15 minNormalVolume. Gate-1 sprints daily
16–25 minOver-designingSet a 10-minute alarm. When it fires, whatever you have must run
> 25 minFormat failureGate-1 sprints only, for two weeks, before any full runs

The trap on the other side: rushing gate 1 with a representation that dies at gate 3 costs more than a slow start. Both failure modes are visible in the harness log — a fast G1 followed by a long G3 gap is the signature of a bad representation, and it is exactly what the extension drill trains against.

The reconciliation is not "design longer." It is asking better clarifying questions in the first two minutes. In both automated problems, one question at minute one determines whether gate 3 is additive or a rewrite. That is the skill.


The Talk-While-Coding Checklist

Every problem, every time, out loud:

  1. Restate the problem in your own words.
  2. Clarify — at least two questions, and at least one that could change your representation. (Not "should I handle empty input." Something like "is the source replayable?" or "are versions global or per key?")
  3. State the approach in two sentences, and name the data structure.
  4. State the complexity before implementing, not after.
  5. Write the test for the tricky invariant first.
  6. Code, narrating decisions — not keystrokes. "I'm recording the event count per feed so I can unwind it later" is a decision. "Now I'm writing a for loop" is a keystroke.
  7. When stuck, keep talking. Say what you tried and why it failed. Silence is the single costliest narration failure: the interviewer cannot give you a hint they do not know you need, and it reads as lost even when you are thinking productively.

Self-score 0–5 after each recording. Anything below 3 twice in a row triggers a narration-only drill.


Failure Modes

FailureSymptom in the harnessFix
Over-designing gate 1Time-to-G1 > 16 minGate-1 sprints; 10-minute alarm
Under-designing gate 1Fast G1, then a rewrite at G3Better clarifying questions, not longer design
Rewrite at any gateLarge gap between gate timesExtension drill; ask "what breaks if this needs to be reversible?"
Silent debuggingNarration score ≤ 2Narration-only drill
Testing at the endMany test runs on the final gateInvariant-first drill
Complexity blindnessPasses tests, cannot state the complexityState it out loud before coding, every time
Not reading the specFailures on edge cases stated in the briefRe-read the brief after your first passing run, before submitting
Ignoring the budgetCompletions over budgetStop at the budget. Log the gate you were on
MemorizationCold re-run much slower than the originalYou learned the answer, not the skill. More variety, less repetition

Self-Assessment Rubric

Level bands

LevelStandard
L0≤1 gate within budget, or time-to-G1 > 25 min
L12 gates within budget; time-to-G1 9–15 min; occasional rewrites
L23 gates within budget; time-to-G1 ≤ 12 min; no rewrites; narration ≥ 3
L34 gates within budget; time-to-G1 ≤ 8 min; representation survives all gates; narration ≥ 4

Hire-bar translation

VerdictWhat it looks like
No hireNo working solution, or needed substantial hints to reach one
Hire (senior)Working solution, some prompting, reasonable complexity stated
Strong hire (senior)Working, unprompted, clean, tested the tricky invariant first
Hire (staff)Above, plus the initial design anticipated the next stage
Strong hire (staff)Above, plus taught the interviewer something about the problem

L3 is not "solved it." L3 is "chose a representation at minute three that made minute forty easy."


References