web architecture: how a task gets from release to flag

  • 8web lane modules9,443 lines
  • 297web tests
  • 2saved capture fixtures
  • 31challenge solver recipesone per web challenge
  • 2web tool articles
  • 31web posts

counted from the repository at every build.

two diagrams of the web lane's race machinery: the pieces and who talks to whom, then one challenge from its release to its last flag with every fallback path. each box names the real file or command; the section numbers (3.3, 7.5, 9.2) point into the web capabilities page, which describes each part in full.

the pieces

web components and who talks to whom the live target temporary, per-team, same-origin only game master api, behind a cloudflare edge list, start, download, submit, status. each start provisions fresh targets; the web reset op replaces a dead one. a CORRECT is a flag. public scoreboard place, points and first bloods per question gm.py: the one gm client start and submit on the assigned targets, the reset op (3.3), the team 429 hold; a CORRECT is written to logs/comp/flags.json catalog watcher polls the web listing, binds a racer name per new base, fans out the chains (4.5) autopilot slot auto.web.<base> claims each web single at release, captures, solves, submits, chains the tiers on a win (9.1) the racer one model session per open base the one-complete-recipe edit when the matcher misses (4.3, 9.2) the reasoner model sessions, saved evidence only a bounded plan through the local handoff queue (4.1, 9.3) web_keeper.py classifies every racer each 10s and respawns a stalled or dead one (4.4) coordination for web (coord.py and the web tools) the actors never talk to each other directly: they share files under sessions/ through coord.py (claims, intel rows, mail, the board) a sqlite queue per day under sessions/web-handoff/; sessions/web-state/<base>.json: one row per web challenge; sessions/web-team.json: the day's roster counts; sessions/web-resets.json: the reset ledger; sessions/agents/*.json: the racer and reasoner records the solver files one solver file per base (solve.py + its CUSTOM_RECIPE) is what every tier runs files/*.web-capture.json: every exchange saved before solving (7.2) ctfkit.hlib web_live: the recipe set (7.3) — named signatures and the generic clue fallback — plus the answer mapping (7.8) the offline readers (hlib/web.py) replay and fixtures uv run replay <run dir>, capture recordings in tests/fixtures/web/, capture-faithful mock targets (6.5), uv run web-inspect logs/comp/web/ events.jsonl — the cross-process timing ledger; session.log — the web agents' shell transcript; keeper.log, racers.log, autopilot.log (5) https list start and submit submits directly

the game master is the only grader, and the target is the only evidence: no request leaves the assigned origin (redirects, links, credentials and cookies stay on the target's own scheme, host and port, and the game-master credential is never attached to a target request), every response lands in the transcript before it is read, and a proof is only ever read from the assigned target's own response, never guessed and never carried between targets, tiers or attempts. the actors never talk to each other directly — they share files under sessions/ through coord.py (claims, intel rows, mail, the board), and one solver file per base (solve.py + its CUSTOM_RECIPE) is what every tier runs.

a task from release to flag

one web challenge from release to flag release, 09:00 et the catalog watcher lists web bases autopilot claims the single solve.py is the lane's newest solver; gm.py starts a fresh target web_live captures home page, clue document, every clue route; the transcript is saved before solving (7.2) the recipe set (web_live) runs: named signatures, then the generic clue fallback (7.3) the answer step web_live: one proof value in this target's own responses (7.8) gm.py submit grouped; every accepted field is banked single CORRECT gm.py writes the flag to logs/comp/flags.json time trial, then mastery autopilot runs each tier on a fresh target (9.1) no proof: a genuine miss the diagnostic carries the whole target fingerprint: every clue route's status, keys and values, the api errors, a recipe skeleton the racer (one per base) reads it and makes ONE complete edit in solve.py using every route and record it names; autopilot re-runs the saved recipe within about a second, on the same live target still no proof the reasoner handoff — a packet of the saved captures (plus the base's intel, mail and findings) returns one bounded plan; the racer implements it a dead target no response, or nothing but server errors: gm.py reset provisions a fresh target; it probes first and refuses a live one (3.3) a stalled or dead racer no record beat, no transcript line, no process web_keeper.py respawns it immediately, never under a live game-master attempt (4.4) ranked start refused the game master will not open a ranked attempt the regular untimed pool: no deadline, a wrong submit leaves the attempt open; the board marks it unranked and the end of day reruns it for a time (gm.py start, 3.4) rate-limit window 429s inside the release minute the window is per team and clears at the next :00; every process holds and resends then (10) proof CORRECT no response no proof

the middle column is the path a clean day takes, each box naming the actor that owns it: the catalog watcher's release, autopilot's claim (gm.py starting the fresh target), web_live's capture and its proof, one grouped submit through gm.py, then autopilot chaining both timed tiers on fresh targets from the same solver. each red arrow is a fallback's trigger: a miss hands the fingerprint to the racer, whose one edit loops back into the recipe set — autopilot re-runs the saved recipe within about a second, nobody prompts it — and a dead target at capture goes to gm.py reset. the boxes beside it are the fallbacks, each one a separate mechanism with its own trigger.

fallback trigger what happens where
the racer's one complete edit no recipe fits the target's own evidence the gap row carries the whole fingerprint (every clue route's status, keys, values, the api errors, a recipe skeleton); the base's racer makes one complete CUSTOM_RECIPE edit and autopilot re-runs it within about a second 7.8, 7.5, 9.2
the reasoner handoff the racer's edit still finds no proof a packet of the saved captures plus the base's intel rows, mail and cross-day findings (labelled priors) goes to a reasoner, which returns one bounded same-origin plan for the racer to implement 9.3
a dead target no response, or nothing but server errors gm.py reset provisions a fresh target; it probes every assigned url first and refuses a live one 3.3
a stalled or dead racer no record beat, no transcript line, no process web_keeper.py respawns it immediately, never under a live game-master attempt 4.4
ranked start refused the game master will not open a ranked attempt the regular untimed pool: no deadline, a wrong submit leaves the attempt open; the board marks it unranked and the end of day reruns it for a time gm.py start, 3.4
rate-limit window 429s inside the release minute the window is per team and clears at the next :00; every process holds and resends then 10