web capabilities: the web lane machinery, part by part
- 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.
this is the web lane's internal capabilities document as it stood on day 31, the last day, published alongside the non-web capabilities page, whose thirteen-section skeleton it shares. agent ids are replaced by roles (the parent, a racer, a reasoner, autopilot, our own account), and the section numbers are its own: the posts and the web architecture page cite them ("7.5"). each part says what it does, why it exists (the day and the numbers that caused it) and where it lives in our repository.
1. overview
web challenges hand out temporary http targets instead of downloadable artifacts: an assignment names target urls and answer ids, and every tier (single, time trial, mastery) provisions fresh targets. the lane's whole design follows from that: the target's own responses are the artifact, so the machinery saves them before solving, then reads them offline from the saved transcript, and never carries a value between targets.
2. components
| part | kind | role |
|---|---|---|
gm.py |
the shared gm client | start/submit/status on the assigned targets, the web reset op, the preparing poll, the 5xx incident path (3) |
ctfkit.hlib/web.py |
offline readers | artifact evidence and saved captures as request rows (7.1) |
ctfkit.hlib/web_live.py |
live capture | the per-target collector, the recipe set, the answer mapping (7.2-7.8) |
ctfkit.hlib/runner.py |
the timed runner | preflight, the deadline, chaining (9.1) |
| the autopilot slot | deterministic, no model in the loop | 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) |
tools/comp/web_keeper.py |
local process | classifies every racer each 10s and respawns a stalled or dead one (4.4) |
tools/comp/web_handoff.py |
local queue | the reasoner packet: captures, intel, mail, findings (4.1) |
tools/comp/catalog_watch.py |
local watcher | polls the web listing, binds a racer name per new base, fans out the chains (4.5) |
tools/comp/start_at.py |
the web launch | the warm reasoners, the day's racers, the keeper (4.6) |
tools/comp/web_posthook_log.py |
session hook | every web agent's shell command lands in the web session log (5) |
tools/after-action/testweb |
the local web stack | a fake gm serving capture-faithful mock targets; the morning self-check (6.5, 8) |
3. the gm client's web ops (gm.py)
the shared client's web half. the transport, the team 429 window, artifact delivery and the cloudflare edge are the non-web page's section 3; everything here is web-only behavior.
3.1 start on the assigned targets
start provisions the tier's fresh targets (single, time trial, mastery) and returns its answer ids; a CORRECT reply is a flag, written to logs/comp/flags.json. a start reply can be preparing before the targets are ready: provisioning has no clock yet, so the client reconnects through status, never retries start, and polls for up to nine minutes without consuming another attempt — following the gm's retry_after_ms cadence when the reply carries one, backing off 1, 1.6, 2.6, 4.1 then 5 s otherwise, so a three-second provision still costs under two seconds of latency and a five-minute one about sixty calls. a target still preparing after fifteen seconds mails the lane's parent. one reply quirk: a retry has been seen returning the previous assignment's questions with freshly rotated answer ids, so answer_ids are authoritative for submission and a solver never indexes questions by answer id.
3.2 status
read-only status is the only truth about an attempt: its attempt id, deadline and accepted answers. a request timeout does not prove an attempt failed — check status and reconnect before starting or submitting again (the day-23 report's rule), and op=status recovers an earned flag the client never saw (already_solved). the coordinator's watcher reconciles it on its own thread (4.5), so a tier completed outside the agent ledger is picked up without a local claim.
3.3 the reset op
op reset (day 21) replaces an attempt's live target with a fresh one for untimed play; on a ranked run it ends the run. it is the one gm call that throws a target away, so every refusal comes first:
- the roster, and a solved challenge is never reset; no reset of this challenge in the last 120 s and at most two today — a third dead target is a gm incident for the web parent, not another reset;
- no other process running the attempt (a run in flight fails on a dead target and saves itself: reset after it ends), and status must show an attempt that is not still
preparing; - then it probes every assigned target url — one get of exactly that url, no redirect, two tries 2 s apart — and refuses when every target answers below 500: a page that answers without a proof is a recipe problem, and a slow but working recipe is never thrown away.
a ranked run needs --end-ranked: the run ends and continues as untimed play (the flag still counts; the end-of-day rerun gives the time). a live target whose state is wrecked (a stored payload that broke the page for the moderator, an object the recipe consumed) takes --state: the probe is skipped, the evidence attested, and the reset mailed to the web parent. after it, the fresh assignment replaces the single's saved start.json, an intel row says RESET, the base's autopilot re-captures and re-runs, and one dead target in a mastery resets the whole attempt (every target is captured again). the ledger is sessions/web-resets.json.
3.4 the 503 incident path
a gm json 5xx on a start is reported once (intel plus urgent mail) and opens one incident with one owner; the same error on the same tier again inside the hold stops the run instead of starting again (day 8: a time trial was started twenty times into the same 503 by four agents, none reading the body). while the incident is open no timed start goes into it; every waiting run verifies its solver offline and resumes by itself when the owner resolves. the ranked pool's own 5xx (service_unavailable) is not an incident: the tier falls back to regular untimed play.
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), and one solver file per base is what every tier runs.
4.1 the handoff queue (tools/comp/web_handoff.py)
a sqlite queue per day under sessions/web-handoff/ — jobs (packet, reply, state, worker) and workers (state, heartbeat, pid, base). the racer posts a packet when its edit still finds no proof; the reasoner that claims it reads saved captures only and never claims, contacts a target or the gm, edits or submits. the packet carries:
- the saved captures: every response's method, url, status, stage, request and a body excerpt (6000 characters a body, 48000 the packet), the attempted recipes and the capture diagnostic;
- the base's intel rows, labelled exactly like
coord.py intelprints them (confirmed / rejected / observed / idea), so a confirmed row reads as grader-accepted and a rejected one as a dead end; - the newest mail addressed to the reasoner or to all, and both findings channels — the web lane's own and the shared log — labelled as priors: cross-day conventions, never values; the target's own responses override them.
assignment is sticky (one reasoner per base, claimed atomically); an on-demand reasoner spawns when the warm pool is exhausted. the reply is one bounded same-origin plan the racer implements; a refusal or infraction is a handoff failure, never a plan. every reasoner is mirrored into sessions/agents/ (waiting / working / retired) from its wait loop, claim, reply and fail paths, so both dashboards show it — display only: binding, scaling and surplus never read reasoner records.
4.2 web-state records
| file | contents |
|---|---|
sessions/web-state/<base>.json |
one row per web challenge — phase, pid, agent, since, updated_at — written under the lock on every phase change (gm_start, gm_preparing, target_active, gm_reset, slot_queued, slot_released, solver_edit, external_complete) |
sessions/web-target-*.lock + -queue.json |
one target provision in flight per challenge: start and reset serialize on it |
sessions/web-resets.json |
the reset ledger the cooldown and day cap read |
sessions/web-team.json |
the day's roster counts |
sessions/agents/*.json |
the racer and reasoner records: state, heartbeat, web day, base binding |
4.3 the racers and the reasoners
the racer: one model session per open base, handed by coord.py wait-live --next and kept on it through its tiers; web claims are per runner, so its claim never blocks autopilot's, and the reverse. the moment it reads a proof it submits directly — it never waits for a replay — and keeps its recipe in the base's solve.py so autopilot can replay and chain the later tiers. on a genuine miss the gap row's fingerprint plus the saved capture is its entire input (no brief re-read, no grep of other bases, no cross-base solver read, no scratch decode): it runs uv run web-inspect, pastes the ready-to-paste recipe skeleton, changes only the routes, parameters and records the fingerprint names, and saves one complete edit. the shared solve.py is serialized by coord.py edit <base> (one writer; release after each save). a racer whose shell backgrounds a call still running keeps every wait inside 20 s and polls a backgrounded wait within the same turn (dd30: three racers froze behind a 170 s wait on the release morning and never woke).
the reasoner: the queue's other side (4.1) — a model session on saved evidence only, answering a packet with one bounded same-origin plan.
4.4 the keeper (tools/comp/web_keeper.py)
every 10 s it classifies each reserved racer of the day from three signals — its agent-record heartbeat, its last line in the web session log, and a process scan for its session pid — into:
- live — a beat inside the 90 s window;
- stalled — the process is alive but silent past the window: marked stopped, killed, respawned at once with the same prompt the launcher used;
- dead — no process: the same respawn;
- attempt — a live gm attempt for one of its tiers: the window extends, and a racer is never respawned under a live attempt.
it also refreshes a mid-analysis reasoner's agent record, so a long analysis turn never renders it stale on a dashboard, and logs every non-live line to logs/comp/web/keeper.log. --once --dry-run prints one pass — a ten-second parent gate at any moment of the morning (every racer must say live). dd30: three racers froze silently and one died 30 s before release before this existed; the parent noticed the freeze on a dash timer, not a tool.
4.5 the catalog watch (tools/comp/catalog_watch.py)
kickoff starts it before the live marker (its console to logs/comp/web/catalog-watch.log), and it holds the day's board open while it runs. its first poll goes out at once when the release list held no web base, else after the release minute (+62 s), then every 20 s:
- every newly visible base joins today's board and one racer name binds to it; more bases than warm names reserve more, and a warm name still unbound once every open base is bound elsewhere is surplus — its lane counts done,
wait-liveexits 2 and it retires; - it fans out the normal chains: an autopilot worker per open base, each taking its own real claim, posting gaps, releasing it;
- it reconciles web status on its own short thread, so a tier completed outside the agent ledger — our own account, dd27's socket-to-me — is reflected without waiting for another call, and the day's records retire once the board closes;
- it scales the roster to the open bases (reasoners to the base count, racers down to it), launches the web auditor as soon as a finished timed run fails, and starts replacement workers for stopped sessions, their consoles to a fallback log of their own under
logs/comp/web/.
4.6 the web launch (tools/comp/start_at.py)
before release the launcher pre-spawns the warm reasoners (a no-proof gap never waits for a cold start; the supervisor keeps trying and logs to logs/comp/web/reasoner-supervisor.log), reserves the warm racer names (three by default), spawns the day's racers — one detached session per name, its prompt carrying the authorization, the one wait command, the exit-code rules, the pre-release inbox rule and the fingerprint-only miss rule — and starts the keeper detached. a bound base whose solve.py is not a readable file is a preflight failure and no racers launch (day 28: a bound base silently had no runnable solver).
4.7 how next and check route web agents
wait-live --next hands a racer one base and keeps it there through its tiers; before release each call pages the lane brief (docs/comp/lanes/web.md) one page at a time and nothing else. exit 5: run the same wait again and nothing else (no board, no demand, no list, no status, no solver by hand); exit 2: the base or the day is done, retire; exit 6: release the stalled task and run again. check <id> advances the caller's per-agent cursor (the intel and findings other agents added since its last look) and, after a saved fix, reports the rerun's verdict — the racer never re-runs a solver by hand. a check whose python files changed since the edit lock was taken releases the lock; reacquire for another write, or release a stale one with coord.py edit <base> --release.
5. logging (logs/comp/web/)
every web actor logs under logs/comp/web/, beside the shared logs/comp/session.log the non-web lanes use:
events.jsonl— the cross-process timing ledger: one secret-free line per web event under an exclusive file lock, from every actor at once. each row carries wall and monotonic timestamps, the day, challenge, tier, event, agent and pid, plus a fixed field set (attempt ids, result, status, elapsed and duration milliseconds, target and request counts, proof count and time-to-proof, accepted and rejected ids, the ranked marker, the reasoner and its plan size): a request started/finished pair per target request, capture started/finished per target, the gm call envelope, the solver start/replay/revision rows, the claim and edit-lock rows, the rerun verdicts and the external-completion rows. a capture's request count and its time-to-proof are measurable from this file offline.session.log— the web agents' shell transcript: every bash command a web agent runs is appended natively by the PostToolUse hook (tools/comp/web_posthook_log.py); the web racers cannot use the shared wrapper model (day 28: the racers bypassed it), and the hook never blocks the tool and never fails the racer. the keeper reads each racer's last line here.racers.log— each racer session's console, appended by the launcher and the respawner.keeper.log— one line per non-live classification and every respawn.- the rest, one file each:
autopilot.log(the slot),parent.log(the web parent),reasoner-supervisor.log(the warm-reasoner supervisor),catalog-watch.log(the watcher's console),practice-reruns.log(the practice reruns), andreasoners/(one log per reasoner session).
6. tools
6.1 tools/comp/web_handoff.py
the reasoner queue (4.1). cli: serve, wait --name --model --day [--base] (a reasoner's claim loop), request <base> --map <the observed target map> [--run <run dir>], reply --file (the plan), fail --reason (never a plan), result (the racer's short poll for a reply), status [--day] (the reasoner view: how many ready, waiting, working); the launcher and the watcher call its configure and resize directly.
6.2 tools/comp/web_keeper.py
the racer keeper (4.4). --day N runs detached and exits when the day's board completes; --interval (10 s), --window (90 s), --once, --dry-run. tests/test_web_keeper.py.
6.3 tools/comp/catalog_watch.py
the release watcher (4.5). --day N, --duration (default 1200 s), --interval (default 20 s), --no-autopilot (watch only, no chains). web catalog reads share the gm rate window with timed submissions, so the release-minute quiet gate is built in.
6.4 tools/comp/web_posthook_log.py
the PostToolUse(Bash) hook (5): reads the hook json on stdin, routes a web agent's command line to logs/comp/web/session.log and every other agent's to the shared logs/comp/session.log, exit 0 always.
6.5 tools/after-action/testweb
the local web stack: a fake gm upstream that provisions capture-faithful mock targets (mock_ttb, mock_ia, mock_pti, mock_qtc, mock_generic) and grades proofs against them, reconstructing each challenge's http contract from its real captures. launch.py is the morning self-check: for each challenge and tier, start an attempt, run the documented recipe against the mock target, submit, and assert the gm grades it CORRECT — deterministic, offline, no agent spawn: the solve-tooling gate before the release. --worker <name> --ref <sha> adds the full live-agent pass (a real web worker solving the mocks through the testing-grounds topology: a paid session, opt-in) — the rehearsal.
7. the web library (ctfkit.hlib)
7.1 the offline readers (hlib/web.py)
for the rare web challenge that ships an artifact, or for reading a saved capture as evidence.
web.parsereads combined / IIS / JSON access logs, HAR, raw HTTP, pcap HTTP (vianetcap.fields), and.gz/ tar bundles of those, intoRequestrows: time, client ip, method, url and path, status, size, headers, decoded + stored params, bodies, and attack tags (sqli xss lfi ssti rce xxe ssrf deserialization upload webshell).web.candidates(rows, field, q)ranks 2-8 field-shaped readings of a row, narrowed by the question's own evidence;web.answerreturns the stored form before url/hex/base64 readings (web.decoded).web.code(files)reads anANS-code from a puzzle json viaapk.decodeor the one stored code.web.source_facts(body, name)inventories a source file (names, request parameter names, execution calls) without ever running it — day 21's evidence challenges arrived as stored web sources.
7.2 live capture (web_live.capture_targets)
the collector provisions the assigned urls and returns one capture bundle per target.
- one client and cookie jar per target, so a recipe pays tls once (day 19: a shared jar leaked one target's session into another).
- same-origin only: redirects, links, credentials and cookies never leave the assigned scheme, host and port, and the game-master credential is never attached to a target request.
- no request-count, redirect or response-size cap before the attempt deadline (the day-20 caps were lifted on day 22, when the stored-receipt flow needed its 60-second poll inside the deadline); at most sixteen targets capture concurrently (
MAX_TARGET_WORKERS). - every exchange lands in a JSON transcript (
files/*.web-capture.json) saved before solving: stage, method, url, status, request, response headers, body, and the attempted-recipe list. replay and fixtures read these;uv run web-inspectprints the same capture as a map (forms, links, api routes, statuses).
7.3 the recipe set
capture runs the recipes deterministically, in evidence order: the page's own links, clue fields, forms and text select a recipe first; a model session only ever sees a genuinely novel class.
7.4 named signatures
framework-keyed flows, each with the day that caused it: the day-19 starlette webhook (the clue's event type and owner scope posted under every alias behind a 405 post_required guard), the day-20 administrative route (/api/clues -> feature_route), the day-21 callback nonce (reflected before it is reproduced), the day-23 template (template={{objective}} query on the clue route), the day-23 stored-report condition (a %' OR 1=1-- posted through the feature route, read back on the secondary), the day-23 profile role binding (the exact administrator_required error gates the synthetic flat update), the fail-open-friday policy format (the day-24 challenge id, raced on day 28: remote_policy_required -> the policy route's query_parameter + prefix re-open the feature read), the if-a-breach-falls-in-a-log recovery guide and graphql reference (the day-25 challenge id, raced on day 28), the day-28 upload preview (a clue naming a preview guide, render route and upload schema; one documented upload shape posts, only the returned preview path is followed).
7.5 the generic clue fallback (_generic_clue_records, dd30-1..6)
the organizer renames cycled shapes, so this pass owns every variant: it follows every same-origin *_route the clue document names (the reads surface any proof they carry), then sends what those bodies disclose through the feature route in ranked shapes under a 32-request budget:
- records bare, wrapped under their source key, and privilege-swapped for a post-only inspector (day 26: the signature verifies the signed fields but trusts the renamed hook field);
- a service url with a cross-role id composed inside it, for a fetch-parameter route (day 27);
- base64-json state blobs with a role scalar swapped to a value the same blob discloses (days 21/23);
- post-then-audit re-reads of the clue routes (the day-24 and day-25 challenge ids, raced on day 28);
- the delegated-identity sweep (day 28, dd30-6): a 401/403 whose error names identity or delegation against a clue document naming an identity or directory route; every disclosed identity is carried under
X-Delegated-Userfirst, then the observed alternates, on the feature route then the secondary, eight bounded pairs, values ranked owner-keyed; - queue-then-audit (day 29, dd30-6): the post-only branch prepends explicit
{"owner": <restricted owner>}shapes from disclosed owner scalars, collects id-like scalars from each job response, and reads the clue-named audit route per id under its own 400-disclosed query parameter, with one loopback-header retry on a denied read.
7.6 transport selection
a 426 / upgrade signal or an event-stream content type routes the resolved route to its transport: a bounded websocket exchange (day 22: the plain get could not collect the proof until the handshake carried the clue's stream reference, the masked frame and the continuation reassembly) or a bounded sse read (day 27: never blocking past the deadline). a 401/403 plain read sweeps the forwarding-header set, one header per request (header_trust, the day-23 loopback trust). a clue value under a qualified name (stream_reference=…) is sent under derived keys (clue-key): a service-named key first (an /openapi.json parameter for the route, or a sibling clue field of equal value), then the stem, then the name verbatim.
7.7 transport primitives (web_live.Capture)
get, post, post_json, upload, websocket(messages=, on_message=, permessage_deflate=), sse(idle_timeout=, max_events=, max_bytes=), race(copies=N) — one barrier-released request per fresh connection, the day-21 double-spend primitive — and raw(read_responses=N), a verbatim request byte-string over a socket that parses pipelined responses. helpers: header_trust, xxe (echoed or blind-loopback external entities), prototype_pollution, cache_poison, the jwt forge set (forge_jwt_none/hs256/hs/rs_to_hs/kid, find_jwts, decode_jwt — the rsa-to-hmac confusion signs with the public key the target itself discloses), and the base64-json blob helpers (b64json_blob, find_state_blob, mutate_blob). each shipped with an offline fixture before it raced (the day-22 websocket discipline).
7.8 the answer mapping (web_live.answer)
the question's Target N label (or answer id) selects the capture, a proof-shaped pattern ranks the target's own disclosed values, and exactly one value must exist. a proofless capture raises a diagnostic that carries the whole target fingerprint instead — up to four clue routes, each route's status, json keys and scalar values, the api errors, the forms, the same-origin links and a ready-to-paste recipe skeleton (dd30-2: the racer's first note re-derived these by hand for nine minutes). a target that answers nothing or only server errors raises the reset op's cue (a fresh target; the op probes first and refuses a live one, so it never throws away a slow but working recipe).
7.9 the solver files
each base's solve.py is the lane's newest web solver copied beside the single's bytes (uv run newchal): web.answers for artifact evidence, web_live.answer for saved captures, and a challenge-specific recipe as web_live.CUSTOM_RECIPE = capture — process-local, so it travels with the challenge, never the library. a field the lane cannot name gets a handler in handlers.py beside it. ctfkit.hlib is frozen during the race exactly like the non-web lanes; a shared protocol capability moves into web_live at the end of the day, fixture first.
8. replay and fixtures
8.1 the fixtures
- offline family fixtures:
tests/test_web_live_*.pypin each recipe class on local live-target servers; the day-28 and day-29 classes are pinned as generic families (tests/test_web_live_families_dd30.py), with their capture recordings intests/fixtures/web/. - every new transport and recipe ships with an offline fixture before it races (the day-22 websocket discipline): fixture first, never a cold build under the clock.
8.2 the mock targets
capture-faithful mock targets (tools/after-action/testweb/mock_*.py) reconstruct each challenge's http contract from its real captures; the generic matcher must beat them end to end with no CUSTOM_RECIPE (6.5).
8.3 replay
- saved runs replay offline (
uv run replay <run dir>); a correct run with a new trait is promoted as the tier's fixture (uv run replay --promote). - no offline bytes to replay, so a full replay spends fresh ranked variants against live targets: the end-of-day rerun re-runs every solved base and records to
logs/after-action/reruns.jsonl, neverflags.json(13).
9. lifecycles
9.1 a web attempt, start to flag
release, and the catalog watcher lists the day's web bases. the autopilot slot claims the single (the base's solve.py is the lane's newest solver) and gm.py starts the fresh target. web_live captures — home page, clue document, every clue route — and the transcript is saved before solving (7.2). the recipe set runs: named signatures, then the generic clue fallback (7.3-7.5). the answer step reads one proof value in this target's own responses (7.8). one grouped submit through gm.py, every accepted field banked; a single CORRECT writes the flag to logs/comp/flags.json, and autopilot chains the time trial and then the mastery, each on a fresh target. the fallbacks loop inside the same path: a miss hands the fingerprint to the racer, whose saved edit autopilot re-runs within about a second — nobody prompts it — and a dead target at capture goes to the reset op (3.3).
the timed half of the same lifecycle (ctfkit.hlib.runner):
- a single won by hand chains the tiers the moment
solve.pyreproduces every graded field; the autopilot slot claims each single at release, captures, solves and submits, and on correct runs the time trial and the mastery itself. runner.preflightre-solves the last correct run (or the confirmed single) before any timed clock: a proofless non-graded set is tolerated, fail-soft like the live submit, while graded answers stay hard (dd30-6: the day-26 mastery run carried a proofless non-graded set and the replay refused to reproduce a run the grader had already accepted).- a crashed or rejected timed run is saved under
files/runs/<run>/;uv run replay <run>re-solves it offline while the fixer fixes, and the saved fix re-solves the live attempt's own bytes within about a second.
9.2 a racer's day
before release each wait-live call pages the brief and the inbox is cleared (never spend release seconds on mail). release hands it one base. the matcher has already run — autopilot owns the first capture — so a known class is solved and the racer moves on; a genuine miss is its work: inspect the saved capture, make one complete recipe edit (7.8's fingerprint names every route, parameter and record), save, and autopilot re-runs it within about a second. the moment it reads a proof it submits directly, never waiting for a replay; if the edit still finds no proof it posts the handoff packet and implements the plan that returns. a solved signal (exit 3) means move on; exit 2 retires it. the budget: a novel single won within ~85-95 s of release — the matcher win is under a second and the timed chain 20-35 s after it, so a novel class has that window for inspect plus one complete edit and still clears the two-minute goal (the day-28 race of the day-25 challenge if-a-breach-falls-in-a-log lost it to three edits, 205 s).
9.3 a reasoner's day
spawned warm before release and waiting (its heartbeat mirrored into sessions/agents/, so the dashboards show it). a packet arrives and it claims it — sticky, one reasoner per base; an on-demand one spawns when the warm pool is exhausted. working: a long analysis turn never renders it stale, because the keeper refreshes its record each pass. it replies with one bounded same-origin plan for the racer to implement, or fails the handoff (a refusal is a failure, never a plan), and retires at the day's end. it never claims a task, contacts a target or the gm, edits or submits.
10. failure handling
| failure | mechanism |
|---|---|
| no proof in the capture | the diagnostic carries the whole target fingerprint — up to four clue routes (each route's status, json keys and scalar values), the api errors, the forms, the same-origin links, a ready-to-paste recipe skeleton — so the racer's one complete edit uses every route, parameter and record it names; autopilot re-runs the saved recipe within about a second (7.8, 9.2) |
| the racer's edit still finds no proof | the handoff packet: captures, intel, mail and findings as priors go to a reasoner, one bounded same-origin plan comes back, the racer implements it (4.1) |
| a stalled or dead racer | the keeper marks it stopped, kills it, respawns it at once with the same prompt — never under a live gm attempt (4.4) |
a dead target (web: TARGET DOWN (target N: …)) |
the reset op: probes first and refuses a target that answers, 120 s cooldown, at most two a day, a third is a gm incident (3.3) |
| a live target whose state is wrecked | --state attests the evidence, skips the probe, mails the web parent (3.3) |
preparing / preparing_capacity (the 503-shaped queue reply) |
the runner polls status for up to nine minutes on the gm's own cadence and never retries start; the day-23 report's prepared workflow reset the queue after seven seconds, which forfeits hall-of-fame eligibility for the queued ranked run — never automated; a request timeout does not prove an attempt failed, check status and reconnect (3.1, 3.2) |
| a gm json 5xx | one incident, one owner, reported once; the same error again stops the run; waiting runs verify offline and resume by themselves; the ranked pool's own 5xx is regular play, no incident (3.4) |
| a proofless non-graded set in a correct run | preflight tolerates it fail-soft like the live submit; graded comparisons stay hard (dd30-6; 9.1) |
| a ranked start refused | the regular untimed pool: no deadline, a wrong submit leaves the attempt open; the board marks it unranked and the end-of-day rerun gives the time |
| a target read timeout in a timed bundle | the target's partial transcript and diagnostic are saved while the other targets continue; the runner retries only the solver locally, one proof field at a time, to bank the unaffected targets' proofs; it never re-contacts a failed target automatically |
web: no reader for 'x' |
add a handler for the exact graded field (7.9) |
web: 'x' has N possible … values |
narrow by target, tag, status, path, time or client; otherwise return a ranked list |
web: no matching … |
fix classification or the exact count/property rule; do not guess |
| the team 429 window | per team, clears at the next clock minute; every process holds and resends then (the non-web page's 3.5) |
11. known limits
- same-origin only, always; no proof carried between targets, tiers or attempts, and no value guessed — a proof is only ever read from the assigned target's own response.
- the matcher is deterministic: a miss handed to a model session is genuinely novel, never a renamed known class.
- no client-side script execution: stored cross-site scripting is handled by the moderator-receipt poll; a challenge that needs a real browser is an escalation decision, not a mid-race build.
12. tips & tricks
live targets instead of files: the target's own words name the recipe, and the collector reads them before any request is guessed. what makes this lane fast to each flag and is not obvious from the gm's api; each trick with its measured number and where it lives.
12.1 matcher first, never hand-solve a known class
the deterministic matcher follows the clue document's routes and the named families; a known or renamed class resolves in its first capture, before any worker session opens. the 62 s hand-solve was a day-26 practice rerun of the challenge-20 base; day 20's raced time trial was autopilot at 79.2 s release-to-flag. a renamed family's capture is sub-second once the class is named. lives in src/ctfkit/hlib/web_live.py and the autopilot slot (tools/comp/autopilot.py).
12.2 a no-proof capture carries its own fingerprint
a capture that ends without a proof lists up to four clue routes' keys and scalar values and a ready-to-paste recipe skeleton, so one complete edit follows every parameter the target disclosed: fail-open-friday's first edit (raced on day 28) dropped the policy route's own query parameter, and if-a-breach-falls-in-a-log took three edits to find the post-then-audit flow. three edits become one when every disclosed field is carried — each avoided edit saves an autopilot replay. lives in src/ctfkit/hlib/web_live.py.
12.3 vary on a denial names the trusted input
a denial can carry a vary header naming the request header its gate keys on. day 30's delegated-identity single trusted a fixed-name claim header (X-Delegated-User); day 31's framework roulette named its claim header per instance, disclosed only in the second denial's vary, in no body — and the sweep that found it read the response headers of a saved capture: 41 s day 30's delegated-identity single once the header was read. the vary read lives in the day-30 base's solver (challenges/day30/web-exploitation-day-30-framework-roulette/solve.py), not the library.
12.4 never carry a value between targets
routes, claim-header names and proofs rotate with every assignment; each value is read from the current target's own responses. day 31's framework time trial spent one ranked attempt (17d313d3, 15 ranked attempts remaining throughout) — two no-proof capture runs inside it — before the third derived the header name from the fresh target's denial instead of the single's: 57.5 s from the attempt's start to the second no-proof capture's end. lives in src/ctfkit/hlib/web_live.py.
12.5 one connection pool per origin
the collector keeps one http pool per assigned origin, so a recipe pays tls once and the target's cookies never leave it; several mastery targets capture concurrently and share nothing. ~0.1 s a target request at the median, against half a second and up for a gm call. lives in src/ctfkit/hlib/web_live.py.
13. the web after-action
the web lane ran the same stages beside the non-web review with its own artifacts: no download to promote, so its fixtures are recorded captures and mock targets, and no offline bytes to replay, so its replay spends fresh ranked variants against live targets.
13.1 the stages
| stage | what it does | day 30's night |
|---|---|---|
| fixtures | the day's novel classes pinned on capture-faithful local targets: recorded captures in tests/fixtures/web/, a mock target per class replaying the day's exchanges, a test each |
the two day-30 classes, with their mock targets and capture recordings |
| report | the web lane's own findings and open items, beside the general one | findings F1 to F7, open items dd30-6 to dd30-19 |
| replay | every solved base from day 19 to the day, re-run on fresh ranked variants, one proof field at a time | 58 tiers across 29 bases: 55 correct, 1 accepted, 2 refused, both refusals fixed the same night |
| variants | the backtest over every saved web run | 0 wrong, 0 crash |
| prep | the lane's prep file: the day's families, the unobserved alternates, the keeper gate | the two day-30 families |
| fixes | web items in board-seconds order, a replay each | six commits, each with its targeted test |
| writeups | a writeup per challenge, the posts in both trees | the day-28 and day-29 writeups, the day-30 posts |
13.2 the gate
the web gate is the replay and the rehearsal: every solved base must come back correct on a fresh variant before the night ends, a new class lands as a named family with a local mock target and an offline test, and one command runs a real web worker against the local targets as the rehearsal (tools/after-action/testweb, 6.5). the readiness gate replays the fixtures, so a class that regressed fails the night's gate, not the race. the board-gated steps of the shared pipeline wait for the web lane: an after-action that starts while web still races works on a sibling worktree and runs them after the merge.
13.3 what the day-30 replay proved
- the replay's rerun ledger holds 57 rows: 19 ranked, 4 unranked, 34 with no ranked marker recorded.
- every base reproduced on fresh targets with that night's code — including the tiers our own team's accounts completed outside the agent ledger (one account on 37 tiers, another on one: our own play, never another team's) and socket-to-me, completed by our own account at +25:55.3 with about a minute spent after it was solved before the stop mails went out (09:26:45, 09:27:03). the scoreboard credits our team, team.dev, on all 93 web questions.