tips & tricks: the uncommon parts that made the solvers fast

this page collects the uncommon pieces of engineering that made our solvers fast, grouped by where they act: the wire, the release second, the chain of tiers, the submit, the fixer's save and the cpu. each card names the trick, says why it exists, gives the number we measured or logged for it and the file in the repo where it lives. none of it is a model or an agent trick; it is plumbing around the game master's api, and most of it runs with no agent in the loop. the badges rate each card's impact (high: on the critical path of every flag; medium: seconds when something needs fixing or on bigger artifacts; low: hygiene, rare paths, rehearsal) and what it saved with its unit, dashed where the figure is our estimate.

  • ~18xsmaller json repliesgzip: a 523 kb start in 29 kb
  • ~30 msedge trace on every new socketa far colo is re-dialed
  • ±40 msgm clock sample at t-65 sntp offset vs date headers
  • 80 msbetween hedged release liststwo warm sockets from t-0.3 s
  • 1.8 smedian clock used per timed attempt356 attempts; median deadline 50 s
  • 0.25 spoll for a fixer's saved fixa saved fix re-runs in under 0.5 s
  • 3 suntil a hard single is the fixer'sautopilot keeps searching
  • 95%of a binary time trial carried day to daydays 19 to 21; reported, never used

the clock used comes from the race clock telemetry; every other number from the code and the capabilities notes the card names.

ranked by what it saved

the order puts time saved on the critical path of a flag first, a measured figure before an estimate, and a trick that runs on every attempt before one that runs on a rare path.

  1. the next tier is held before the single winsthe chainsaves an agent turn per tier
  2. warm slots, no agent in the loopthe release secondsaves an agent turn per tier
  3. one write is the fixfixing in secondssaves 13.5 to 39 s per fix
  4. the slow first call, paid earlythe wiresaves ~2 to 3 s per release
  5. sockets opened before the clockthe wiresaves a tls handshake per timed attempt
  6. a start before any listthe release secondsaves ~2 s per release
  7. a near edge on every socketthe wiresaves ~1 s per gm call on a far socket
  8. every written form in one gothe submitsaves an agent turn per failed submit
  9. one optimistic full submit, then bisectthe submitsaves a fresh attempt with new bytes per failed submit
  10. aes zips in memorycpu on the clocksaves ~0.8 s per timed attempt
  11. no second solve before a chained tierthe chainsaves ~0.55 s per tier
  12. gzip on every json replythe wiresaves ~94% of the json bytes per gm call

the ratings are our own reading of the logs and the capabilities notes, not a controlled measurement.

the wire

every gm call crosses a kept-alive tls socket, one per thread; these cards keep that socket open, near and small.

  • sockets opened before the clock

    warm() connects the main socket and every fetch worker (tcp + tls, no request) before a timed start. the fetch pool lives for the process: connections are per thread, so a pool per call paid a handshake per download on the clock.

    ~2.6 s a cold connect cost on day 7, when the list landed at +2.76 s

    • impact high
    • saves a tls handshake per timed attempt

    lives in gm.py

  • the slow first call, paid early

    the gm's first authenticated call on a fresh socket costs seconds of worker time. kickoff's list sockets and every autopilot slot send a list at t-20 s and t-3 s on the exact sockets the release will use.

    2.2 to 3.4 s a list on a fresh socket, against 0.2 to 0.7 s on one that has answered a call

    • impact high
    • saves ~2 to 3 s per release

    lives in tools/comp/kickoff.py

  • sockets about to drop are replaced

    the gm closes a socket that sent no request ~15 s after connect. _stale reconnects one before it carries a request, and renew_fetchers re-opens every unused fetch socket at t-4 s, which lasts to ~t+11 s, past the release downloads.

    19 of 19 release downloads on day 11 found their t-20 s sockets closed

    • impact high
    • saves a reconnect and resend per gm call

    lives in gm.py

  • a near edge on every socket

    anycast lands some connections on an ocean-away colo. each new socket reads its colo from /cdn-cgi/trace (answered by the edge, not a gm call) and re-dials a far one; the morning probe pins the fastest ip, and a pinned socket that traces far drops the pin.

    ~30 ms for the trace; a list via a far colo took 1387 ms median against 405 ms via a near one (day 28 probe)

    • impact high
    • saves ~1 s per gm call on a far socket

    lives in gm.py

  • gzip on every json reply

    every call but a download sends Accept-Encoding: gzip; a start or submit reply repeats every question, so a mastery reply is megabytes of json. downloads stay raw: the edge never compresses them. each reply logs its exact wire cost (gm.py wire).

    ~18x a 523 kb binary mastery start crossed in 29 kb (day 17 test)

    • impact high
    • saves ~94% of the json bytes per gm call

    lives in gm.py

  • a timeout is never re-sent

    the gm already holds a request that timed out, so a re-sent post would double a start or a submit. only a stale kept-alive socket (reset, broken pipe, closed before a reply) reconnects and re-sends, once.

    • impact low
    • saves a duplicate start or submit per gm call that timed out

    lives in gm.py

  • fewest calls, team-wide

    the gm's 429 is a per-team window that clears at the next clock minute. warm() sends no request, a single's solve.py reuses the attempt autopilot already started (saved_single), and kickoff skips its +62 s re-plan when every lane was listed.

    20 of 57 calls before day 10's release-minute 429 were fresh list sends; two remain

    • impact medium
    • saves a 429 hold of up to 60 s per release, estimated

    lives in gm.py, src/ctfkit/hlib/runner.py

the release second

the singles release at 09:00 et; these cards decide how close to that second the first start goes out.

  • fire on the gm's 09:00

    kickoff samples the gm's clock at t-65 s, an ntp offset checked against date-header bounds from ~25 quick calls, and schedules every send on it. the sample lands at 08:58, so its calls stay out of the 08:59 warm-up minute.

    ±40 ms the precision of the clock sample

    • impact high
    • saves the local clock's offset (to ±40 ms) per release

    lives in tools/comp/kickoff.py, gm.py

  • hedged release lists

    from t-0.3 s two warm sockets take turns sending the list every 80 ms, and two fresh ones send at +0.05 s and +0.15 s; the first non-empty answer plans the day.

    80 ms between sends; a list answered in 0.2 to 0.3 s alone or in pairs, 0.6 to 1.0 s with seven in flight

    • impact high
    • saves up to a list round trip (0.2 to 0.3 s) per release, estimated

    lives in tools/comp/kickoff.py

  • a start before any list

    the warmups single's id is known before the release (warmups-day-NN), so its slot sends the start at t+0.01 s and once more at +0.3 s if the gm called it early (gm.start_predicted: direct only, no failover). a list naming the same id waits for that start instead of starting twice.

    2.28 s day 16's lane list took, the wait this start skips

    • impact high
    • saves ~2 s per release

    lives in gm.py, tools/comp/autopilot.py

  • each lane lists only itself

    every autopilot slot sends its own lane= list from t+0.01 s: a lane's answer is smaller and comes back before the full list. binary's lane list came back empty every day, so that slot lists by its id prefix instead (3 rows in 0.32 s on day 15).

    2.28 s day 16's lane list, against +4.08 s for the full one

    • impact high
    • saves ~1.8 s per release

    lives in tools/comp/autopilot.py

  • warm slots, no agent in the loop

    autopilot slots start before 09:00 with every module imported, the lane's fixture scan done, the label vocabulary read and the watchdog armed. at the release each one runs yesterday's solver on today's bytes and submits, before any agent has read the task.

    9.8 s release to a complete board on day 11, the fastest day

    • impact high
    • saves an agent turn per tier

    lives in tools/comp/autopilot.py, tools/comp/kickoff.py

  • ranked pool first

    a timed start asks for the ranked pool and plays the untimed pool only when the gm refuses it, so a tier's time counts on the board the first time it is played.

    213 ranked tiers over the month, 35 unranked

    • impact medium
    • saves a rerun for a board time per tier

    lives in gm.py, src/ctfkit/hlib/runner.py

  • yesterday's archive at t-60 s

    kickoff archives the days before at t-60 s, before any slot posts. on day 28 the plan archived day 27 at +3.8 s, 0.4 s after autopilot's mobile handout landed, and swept the handout along.

    • impact low
    • saves a swept handout per release

    lives in tools/comp/kickoff.py

the chain

a single's flag opens its time trial, and the time trial's flag opens mastery; these cards keep that hand-off inside one process.

  • the next tier is held before the single wins

    autopilot claims the time trial before its single's submit and chains from the same process, with the solver it has loaded. no agent reads the flag and starts the next tier by hand.

    1.9 s median day from a single's flag to its time trial's start, days 14 to 31

    • impact high
    • saves an agent turn per tier

    lives in src/ctfkit/hlib/runner.py, tools/comp/autopilot.py

  • no second solve before a chained tier

    the single's winning answers are remembered (remember_primaries), so the chained tier's preflight does not solve them again; the code-stamp import graph is parsed while the single's submit waits on the gm.

    0.55 s the re-solve a day 11 simulation still spent on that step

    • impact high
    • saves ~0.55 s per tier

    lives in src/ctfkit/hlib/runner.py

  • the chain runs the loaded module

    a solver that reproduces the single chains from memory: neither the owner's edit lock nor an idle claim on the tier holds it (coord.take_over). the claim is taken over and its holder mailed.

    120 s an edit lock lasts before it lapses

    • impact medium
    • saves up to 120 s of an edit lock per tier, estimated

    lives in src/ctfkit/hlib/runner.py, coord.py

  • a fix reaches the live attempt

    between a rejected submit's bisect steps, a settled solve.py change re-solves the attempt's own bytes, and its unaccepted fields go in on the same attempt (runner.REFIX, polled once a second).

    +95 s the flag of a day 15 drill whose fix was saved 20 s in and waited for the clock to run out (budget 50 s)

    • impact medium
    • saves a fresh attempt per fix

    lives in src/ctfkit/hlib/runner.py, tools/comp/autopilot.py

  • a spent tier is still a flag

    after the last fresh variant the gm answers next_op: practice; gm.py follows it, and op=practice continues the tier untimed on the same bytes and still completes the mode.

    3 min 28 s day 14 sat with next_op: practice in every reply

    • impact low
    • saves a stuck tier per tier

    lives in gm.py

  • never the next tier on code that just crashed

    a chained tier waits while the solver's digest is that of a crashed run of its challenge and runs on the next settled save (chain_waits). a re-solve of a live attempt reads its saved bytes instead of downloading them again (saved_attempt).

    7 of 12 sets raised on day 28's binary mastery, started 3 s after its time trial on a solver that had just crashed; 18 chain waits held such tiers over the month

    • impact medium
    • saves one failed attempt per crash

    lives in tools/comp/autopilot.py, src/ctfkit/hlib/runner.py

the submit

the grader answers all or nothing per submit, but a wrong submit leaves a timed attempt open; these cards spend that.

  • one optimistic full submit, then bisect

    accepted groups accumulate on an open attempt. the runner sends every field once; on a rejection it halves the group down to the wrong field and tries that field's alternatives inside the same attempt, while the deadline leaves room for the final submit.

    ~10 submits fit inside a 7 s mastery clock

    • impact high
    • saves a fresh attempt with new bytes per failed submit

    lives in src/ctfkit/hlib/runner.py

  • wrong in one set, suspected in all

    a field kind rejected in one set is usually wrong in the others, so its namesakes in other sets go alone before the rest of a group is halved.

    131 submits in 54.6 s on day 17's mastery, where two symbol fields were wrong in sets 1, 3 and 5

    • impact medium
    • saves tens of seconds per failed submit, estimated

    lives in src/ctfkit/hlib/runner.py

  • a reconnect sends only what is missing

    fields an attempt already banked are never sent again: a solve.py run against an open attempt reconnects to the same bytes and submits only the unbanked fields.

    • impact medium

    lives in src/ctfkit/hlib/runner.py

  • every written form in one go

    gm.variants follows each value with its other written forms: guid braces and case, a wrapper off, 0x on and off, separators, slashes, time forms. forms the field's answer kind cannot be and forms already rejected are skipped, and a value's forms count once against the guess cap.

    46 s day 13's right value waited in intel through five rejected shapes

    • impact high
    • saves an agent turn per failed submit

    lives in gm.py

  • labels from every grade ever

    a new family's label fields go out first in a timed submit, with every value the grader ever accepted for that suffix as alternatives (auto_alternatives). with no candidates at all, the bisect still pins the wrong field.

    • impact medium
    • saves a fresh attempt per failed submit

    lives in src/ctfkit/hlib/runner.py, src/ctfkit/hlib/graded.py

  • a graded position leads

    when a probe won a single with the solver's 2nd candidate, that position leads the same field kind on fresh bytes in the timed tiers (lead), so the reading the grader took goes first.

    • impact medium
    • saves a rejected submit per tier

    lives in src/ctfkit/hlib/runner.py

  • bank the clean fields

    a single-set attempt whose set crashed on a few fields is halved until each crasher stands alone, and the clean fields are submitted. the crashers stay gaps that a saved fix sends on the same attempt.

    25% of the clock left is the most the isolation spends

    • impact medium
    • saves one attempt per crash

    lives in src/ctfkit/hlib/runner.py

  • one form per digest

    a 32, 40 or 64 hex value goes lowercase only, and a computed digest only as a member's real digest, so the 25-guess cap is not spent on case and 0x forms.

    • impact low

    lives in gm.py

fixing in seconds

when the solver cannot read a field, a fixer writes the fix; these cards cut the time between the fixer's save and the flag.

  • the single goes to the fixer in 3 s

    a dry run still searching after EARLY_HANDOFF_S releases the single to its lane fixer, while autopilot keeps searching and submits if it finds the answer first.

    3 s to the hand-off; a dry run is capped at 15 s an answer set

    • impact high
    • saves 0 to 12 s per tier, estimated

    lives in tools/comp/autopilot.py

  • one write is the fix

    the hand computation is saved as handlers.py beside solve.py, never run first in a throwaway shell. autopilot re-runs the saved file from its warm process within a second and submits; a correct chains every tier, and nothing is retyped after the flag.

    13.5 to 39 s day 17's fixers spent retyping a hand computation after the value; a day 15 replay that saved the handler first chained its tiers 0.05 s after the single

    • impact high
    • saves 13.5 to 39 s per fix

    lives in tools/comp/autopilot.py, src/ctfkit/hlib/fields.py

  • autopilot keeps answering beside the fixer

    while a fixer works, autopilot sends stored tokens of the field's shape ranked by the words before them (locate.sweep), reader outputs whose words the field names (inventory.sweep), and a rejected field's other candidates and forms, up to 24 probes.

    86.8 s day 13's single took with no reader for a product code stored in an msi's string pool

    • impact medium
    • saves an agent turn per tier

    lives in src/ctfkit/hlib/locate.py, src/ctfkit/hlib/inventory.py

  • a hand win still chains

    a probe-won single whose solve.py cannot read a field chains through a located solver: autopilot learns the words before each graded token and answers the timed tiers' fresh bytes the same way.

    • impact medium
    • saves a fixer's edit per challenge

    lives in src/ctfkit/hlib/locate.py, tools/comp/autopilot.py

  • one lane's reader answers every lane

    a field the lane's own readers do not name is asked of every other lane's reader of exactly that name (hlib.crosslane); the dry run prints which lane read it, and a crash names the closest readers to reuse.

    • impact medium
    • saves a reader written by hand per tier

    lives in src/ctfkit/hlib/crosslane.py

  • briefs read before 09:00

    a fixer's pre-release wait calls page its lane brief, prep file and the new-family guide into its context, so at the release it fixes from what it has read instead of reading.

    • impact medium

    lives in coord.py

  • the question is the recipe

    a binary question that spells its rule (count the names matching a pattern, read an elf header field, join with one lf byte and hash) is answered from its own words on the member's real format, with no producer written (recipe.SOURCE_WORDS). a mobile puzzle no codec reads is scanned for the ANS- shape one and two steps deep.

    • impact medium
    • saves a producer written by hand per tier

    lives in src/ctfkit/hlib/recipe.py, src/ctfkit/hlib/apk.py

  • a handler survives the night

    a race handler that end of day did not promote into the shared library rides into the next day's scaffold as carried.py, loaded after handlers.py, which wins on a conflict.

    • impact low
    • saves a rewritten handler per day

    lives in src/ctfkit/newchal.py

  • the 'is yours' row brings a draft

    when autopilot gives up on a field it posts the question text, what it tried, the closest reader outputs and the bytes on disk, ending with a whole handlers.py draft for the closest reading. the fixer's first message writes it as is.

    10.7 s a day 25 fixer spent composing the same seven lines

    • impact medium
    • saves ~10 s per fix

    lives in tools/comp/autopilot.py

  • settle polling, not file watching

    autopilot stamps an unsolved single's solver files every 0.25 s and re-runs a change once a poll finds it unchanged, so an editor's half-written file is never submitted.

    0.25 s a poll; a saved fix re-runs in under 0.5 s

    • impact medium
    • saves a run on a half-written file per fix

    lives in tools/comp/autopilot.py

  • the fixes mailbox

    a fix to shared code goes in the challenge's solve.py as fixes.replace(module, name, error=...). on a correct the runner publishes it; a lane whose dry run crashes with the same error sees FIX AVAILABLE and applies it, kept only if the crash is gone and nothing new broke.

    5 agents wrote the same caesar +7 fix on day 14; 3 patches went unused

    • impact low
    • saves a second fix per crash

    lives in src/ctfkit/hlib/fixes.py

  • a soft cap and a sidecar watchdog

    every solve runs under a SIGALRM cap, and a capped run saves its bytes for replay. a cap only works if python gets control back, so a sidecar process kills the solver 5 s past any cap that did not end its block and posts the kill as intel.

    15 s the solve cap a run, or the deadline; the hard kill 5 s later

    • impact medium
    • saves a hung process per crash

    lives in src/ctfkit/proc.py

solving while the bytes arrive

a mastery serves its sets as separate downloads; these cards start solving before the last one lands.

  • streamed mastery solves

    per-set bundles land 0.3 to 2.5 s apart. under gm.streaming each set is unpacked in its download's worker thread and solved the moment it lands, while the other sets are still on the wire.

    ~225 ms of pbkdf2 per aes bundle, run in parallel across the threads

    • impact high
    • saves 0.3 to 2.5 s per timed attempt, estimated

    lives in src/ctfkit/hlib/runner.py, gm.py

  • the straggler hedge

    a download at least 1.5 s old and 4x the median of the finished ones, with half the set in, gets one duplicate request on another warm socket; the first answer wins. no duplicate goes out inside a 429 window.

    10.1 s one of 18 day 4 warmups mastery files took, while 17 finished under 1 s and a 7 s timer expired

    • impact low
    • saves a straggling download per timed attempt

    lives in gm.py

  • per-file parallel fetch is the ceiling

    a download ignores Range (200, the whole file) and is never compressed, so one file cannot be split across sockets. six fetch workers pull an attempt's files at once on sockets warmed before the clock.

    2.8 s four 32 mb binary mastery deliveries took on day 18

    • impact medium

    lives in gm.py

answering code without running it

some answers are computed by the artifact's own code; these cards run that code in a small interpreter instead of a device or a vm.

  • a small dalvik interpreter

    day 23's analysis codec carried no data: the app's dex computed the answer. dex.Vm runs every opcode but invoke-polymorphic, invoke-custom and method handles; a framework call it lacks raises an error naming it, never a guess. a race fix is one table entry (dex.FRAMEWORK, dex.STATIC_FIELDS).

    1,000,000 instructions per candidate method (dex.STEPS); day 23 needed at most 81k, at ~3 million a second

    • impact medium
    • saves an agent turn per tier

    lives in src/ctfkit/hlib/dex.py

  • java and .net bytecode, emulated

    a small concrete interpreter runs the jvm or cil method that builds a dynamic trace's outcome, once for every host string the method compares against and once for none. it knows what javac, kotlinc and roslyn emit for a string switch; anything else raises Unsupported.

    20,000 steps at most a run (STEP_LIMIT)

    • impact low
    • saves an agent turn per tier

    lives in src/ctfkit/hlib/emulate.py

learning the rule from the grader

a graded value teaches a rule the solver did not have; these cards keep it for the next tier. the variant series has its own story on the bugs page.

  • the located solver

    a graded value that is one integer, found exactly once as a packed integer in the head of one member, gives the field's offset, width and byte order, rendered by the graded string's own template (locate.learn_int). the single's tiers then chain without the fixer's handler.

    16 s day 20's metadata tiers waited on a handler for such a field

    • impact medium
    • saves ~16 s per challenge

    lives in src/ctfkit/hlib/locate.py

  • candidate positions carry forward

    a learned position is kept beside the number of candidates the solver listed on the graded bytes (_carried). when fresh bytes give a different count, a position on a written form moves with it and any other falls back to the solver's own order.

    3068 ms a day 30 metadata submit took after a lead pointed at a different form on fresh bytes

    • impact low
    • saves a rejected submit per tier

    lives in src/ctfkit/hlib/runner.py

  • the variant series

    the binary timed tiers came from one numbered series: period 16, the index printed in the zip comment, ranked mastery sets that were time-trial variants. we proved it on solved tiers in the unranked pool, never submitted a cached set in competition, and reported it.

    95% of a binary time trial carried from the day before, days 19 to 21

    • impact low
    • saves 2.5 to 4 s per timed attempt (never used), estimated

    lives in blog/bugs.md

decoding without a hint

warmups lines and mobile puzzles arrive under codecs no question names; these cards find the reading without one.

  • breadth-first peeling, scored by letter pairs

    a blob is peeled breadth-first over every registered transform until a reading meets the goal. readings rank by letter-pair log-probabilities from a committed lexicon: the system word list plus every graded and harvested slug word. a peel stops at 8 s a blob.

    223 to 23 ms day 28's single, once readings meet the goal as made

    • impact medium
    • saves ~0.2 s per tier

    lives in src/ctfkit/hlib/decode.py

  • ranked xor and a two-step repair

    single-byte xor tries all 255 keys through 256-byte translate tables at c speed and keeps the 4 best by english words and answer-shaped characters. a line that reads wrong gets every one- and two-step reading while the other lines stay, and the most fluent message whose slug is dictionary words wins.

    6.9 s of an 11.2 s failing day 17 peel was the per-byte xor

    • impact medium
    • saves ~7 s per tier with a failing peel

    lives in src/ctfkit/hlib/decode.py

  • a day's codec chain, one line

    a codec learned from a graded single is one line, a>b>c (decode.remember); the time trial's fresh blob and a mastery's new line read by it first. end of day adds it to decode.DAY_CODECS, the table that reads line k by day k's codec.

    308 to ~0 ms day 28's time trial blob, read by the single's chain

    • impact medium
    • saves ~0.3 s per tier

    lives in src/ctfkit/hlib/decode.py

cpu on the clock

a timed set has a 15 s solve cap or less; these cards keep cpu off that clock.

  • aes zips in memory

    winzip-aes members are read by pyzipper in memory, each nested zip once, the nested zips in a pool. the key derivation goes through hashlib.pbkdf2_hmac, which releases the gil, so the pool's threads run in parallel.

    1153 to 336 ms day 28's script mastery split, key derivation freed

    • impact medium
    • saves ~0.8 s per timed attempt

    lives in src/ctfkit/hlib/archive.py

  • big binaries read once

    the carrier cache keys a large member by object identity, never a hash of 30 mb of bytes. digests are cached per binary, sha256 only (binary fields never ask md5 or sha1), computed in a thread pool.

    • impact low

    lives in src/ctfkit/hlib/setcache.py

  • per-field work once per set

    a field loop never re-parses every path or re-scans every question: tags, basenames, the role question map, answer-format specs and letter-pair costs are cached.

    ~400k letter pairs scored in a warmups mastery, each pair's cost cached

    • impact low

    lives in src/ctfkit/hlib/runner.py, src/ctfkit/hlib/decode.py

  • vocabulary by file stamp

    the label vocabulary and known families are read per file through ctfkit.filememo, keyed by path, mtime and size, outside the modules autopilot reloads; the first read happens beside the start's round trip (prime_labels).

    553 to 18 ms day 28's binary time trial prepare, vocabulary read

    • impact medium
    • saves ~0.5 s per timed attempt

    lives in src/ctfkit/filememo.py, src/ctfkit/hlib/runner.py

  • a failing search fails fast

    a peel stops at 8 s a blob and a codec chain search at 1 s; a mastery line nothing reads gets 0.03 s, then goes out unsure. a runaway search past a set's 15 s cap would lose the whole attempt for one field.

    33.5 s one blob searched before the budget existed

    • impact medium
    • saves one attempt per crash

    lives in src/ctfkit/hlib/decode.py

  • no backups nobody asked for

    a confident dictionary slug skips the beam only a rejection would use, a whole evtx is parsed only when a property names an event-level key, and an apk's signer only when a signer_* key is asked.

    • impact low

    lives in src/ctfkit/hlib/decode.py, src/ctfkit/hlib/forensics.py

rehearsing the race

the release happens once a day; these cards run it many more times without the real game master.

  • a fake game master with the real one's quirks

    rehearse.py serves every lane's newest fixtures as today's challenges behind gm._call, the one transport choke point, and the real autopilot runs each lane end to end: claim, start, fetch, dry run, submit, chain. drills cover a ranked pool that answers 503, practice after the last variant, a hung solver and a partial crash.

    • impact low

    lives in tools/comp/rehearse.py

  • whole past days, simulated

    simday serves a day's fixtures from a local https fake gm that models the release flip, the slow first call on a socket, per-op latency, the clock-minute 429 and each tier's deadline, against the tooling at a git ref, with scripted agent turns of a modelled think time. the report sets each tier's flag time beside the real day's.

    • impact low

    lives in tools/after-action/simday.py

  • live replay in a sandbox tree

    the testing grounds replay a problem against the real gm with a fresh worker that knows only a chosen code and doc snapshot: the single from its race-day recording, the lane's tiers forwarded live, every other lane refused. a control and a treatment measure a fix.

    • impact low

    lives in tools/after-action/testgrounds.py

coordination

several agents and processes share one checkout and one rate window; these cards keep them out of each other's way.

  • the solved guard

    a pre-tool shell hook stops an agent's next command once its task was won by someone else, while the board is open; coordination calls and read-only gm calls still pass.

    5 cases of work on a solved task on days 6 and 8, before the guard

    • impact low
    • saves an agent turn per tier

    lives in tools/comp/solved_guard.py

  • one page per wait call

    before release a fixer's wait call returns one page of its lane's docs at a time, so a long brief is never cut off, and the wait caps at 170 s because the agent harness moves a shell call to the background at 180 s whatever its timeout.

    170 s the wait's cap, under the harness's 180 s

    • impact low
    • saves a task read a turn late per release

    lives in coord.py

  • headless fixers

    kickoff launches a detached headless fixer for every open lane with no live fixer at t-5m and every 30 s after the release, so a parent stopped before its first tool call leaves no lane without one.

    7 min 46 s day 28 went without a fixer before this

    • impact low
    • saves 7 min 46 s per day (day 28)

    lives in tools/comp/fixer_launch.py, tools/comp/kickoff.py

  • a 429 hold every process shares

    the first process to find the team's 429 window writes its end to sessions/ratelimit.json; every other process logs HOLD team 429 window and waits for the minute instead of sending. a start or a probe resends once at the minute.

    47 429 replies logged in race windows over the month

    • impact low
    • saves one more 429 per gm call sent into the window

    lives in gm.py

the web lane

live targets instead of files: the target's own words name the recipe, and the collector reads them before any request is guessed.

  • 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. a day-26 practice rerun of the challenge-20 base spent 62 s doing the matcher's job by hand; day 20's raced time trial went to the matcher's path at 79.2 s release-to-flag.

    sub-second a renamed family's capture once the class is named

    • impact high
    • saves 62 s on a practice rerun (day 26)

    lives in src/ctfkit/hlib/web_live.py, tools/comp/autopilot.py

  • a no-proof capture carries its own fingerprint

    a capture that ends without a proof lists the first four clue routes' keys and scalar values and a ready-to-paste recipe skeleton, so one complete edit follows every parameter the target disclosed. both classes raced on day 28: on fail open friday (challenge day 24) the first edit dropped the policy route's own query parameter, and on if a breach falls in a log (challenge day 25) it took three edits to find the post-then-audit flow.

    three edits become one when every disclosed field is carried

    • impact medium
    • saves an autopilot replay per fix

    lives in src/ctfkit/hlib/web_live.py

  • vary on a denial names the trusted input

    every 403 carries a vary header naming the request header its gate keys on. day 30's delegated-identity boundary trusted the fixed X-Delegated-User claim header, disclosed only there, 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 post's work-to-flag against a 53.7 s release-to-flag on the scoreboard

    • impact high

    lives in src/ctfkit/hlib/web_live.py

  • a per-instance rename is named by the second 403's vary

    a gate can rename its trusted claim header per instance, and no body discloses the name: day 31's framework-roulette gate keyed on a per-instance x-arena header that only the second 403's vary carried, and the sweep that won the tier read the name out of the current target's own denial.

    • impact medium

    lives in challenges/day30/web-exploitation-day-30-framework-roulette/solve.py

  • 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-roulette time trial ran two no-proof captures on its one ranked attempt, both carrying the single instance's header name to a fresh target, before the third run derived the name from the fresh target's own denial and won.

    57.5 s from that attempt's start to the end of the second no-proof capture

    • impact high

    lives in challenges/day30/web-exploitation-day-30-framework-roulette/solve.py

  • 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

    • impact low

    lives in src/ctfkit/hlib/web_live.py

{generated by a clanker}