Tactical LogHuntress CTF 2026 // team archive

Days / Day 28 / Script Analysis / Out of Order

DAY 28//LANE: SCRIPT ANALYSIS//STATUS: CORRECT x3

Out of Order

Script Analysis SSTTMM Modes reported CORRECT in this write-up

Out of Order — script-analysis-day-28-terraform-cloud-timeline

Role: script-analysis Solver Repair Engineer (OFFLINE repair test, no live Game Master) Ticket: challenges/Day 28/_board/agent-1.script-analysis-day-28-terraform-cloud-timeline.repair.json Date: 2026-10-28

Ticket as received

  • classification: extraction_miss
  • mode_matrix: single_solve CORRECT, time_trial OPEN, mastery OPEN
  • missing_answer_ids: [], question_shapes: [], artifact_refs: [], recipe: null
  • diagnostic: the ranked Time Trial start returned HELD ("current GM status does not report an ended attempt with an available continuation; no write sent. NOT STARTED"); mastery SKIPPED because TT is not CORRECT. rc=0, no stderr.
  • residue file (..._time_trial.residue.json): residue: [], questions: {}, tool_reading: {}.

Investigation (all offline, from captured evidence only)

Ground truth available without a GM:

  • GM record .../_gm_record/...homestation.jsonl (13 entries): single start (1703 questions + answers), single submit → CORRECT flag Token2bb8d7b14e84352dda4167b5b31112f5, and a historical TT start that captured only answer_ids (1781) + statement_sha1 — no question text, no TT answers. The record stores artifacts as size + sha256, not bytes.
  • Repair context agent-1...repair.context.json: mode=time_trial, start.questions = the 1781 TT questions, and artifacts[0] = an embedded base64 zip.
  • Stage _stage/Out_of_Order/ prebrief: TT verdict: RESIDUE, resolved: 0 of 1781; model line "no predicted candidate matches today's ids/artifacts/fields — UNPREDICTED layer"; mastery 21372 ids / 12 sets (geometry_flags: mastery_sets 2 -> 12 (was Day 11)).

Root cause (proven)

The challenge has two different artifacts:

  • single evidence.zip — 154511 B, sha 2c039db4…, 179 semantic-named files (resource-sample.ps1, host-context.js, …).
  • TT/MM evidence.zip — 177606 B, sha 53f9c610…, hash-named files (5e15c2.ps1, 8a1bab.js, b1907a.sh, …). This artifact was never downloaded, because the timed attempt was HELD/never started (no live GM offline).

The repair-context builder, having no TT artifact on hand, attached the only artifact it had — the single evidence.zip — to the TT repair context. The TT's 1781 questions reference 178 hash-named files, of which 0 are present in the attached single zip. Any extractor run therefore resolves 0/1781 — and the pipeline mislabelled this extraction_miss, dispatching a repair engineer to "build an extractor" against bytes that can never contain the answers.

This is not a lane-solver extraction bug. It is a HELD timed mode (GM-unavailable offline) whose repair context was populated with a mismatched artifact and a misleading classification.

Offline verification (_repair_work_d28/verify.py, ground-truth, no GM)

checkresult
(a) single questions vs its OWN artifact1703/1703 resolved and byte-equal to the CORRECT answers; 0 unresolved
(b) TT questions vs the single artifact (the repair-context pairing)0/1781 resolved; referenced-file ∩ zip-names = 0/178

(a) proves the extractor is healthy; (b) proves TT fails purely by artifact mismatch.

Incidental latent defect (out of scope, reported to Commander)

autosolve_script.solve_fields_ext line ~483 calls solve_poly_d8._d23_fill, which no longer exists (module 'solve_poly_d8' has no attribute '_d23_fill'). It is swallowed by a bare except, so the D25 "two labels joined by |" pipe-pair fill path is dead code. It did not affect this solve (no pipe-pair questions; single still scored 1703/1703). Needs a separate, authorized fix.

What we learned

Solved

  • single_solve: CORRECT (GM-confirmed historically; flag Token2bb8d7b14e84352dda4167b5b31112f5). Reproduced offline byte-for-byte (1703/1703) by the current solver.
  • time_trial / mastery: NOT SOLVABLE in this offline test. Their artifact (sha 53f9c610…) was never downloaded because the attempt was HELD with no live GM. Correctly left HELD — no guess, no hand-submit. There is no residue and no TT/MM ground truth to solve or verify against.

Learned

  • The script-analysis TT/MM "Out of Order" layer uses hash-named files and per-object question ids (<lang>-<hex6>-<field>) with new field suffixes beyond the single-solve scheme: secondary, tertiary, style, indicator, steps, campaign-token, and the polyglot-terraform_hcl-* fields (stage-count, stage-profile, obfuscation, next-language, file-path). secondary/tertiary are scenario-conditional indicators (wallet for resource-hijacking, staged file name for collection, recovery-note name for impact).
  • A HELD timed mode has no artifact of its own; a repair context built for it must not silently inherit a different mode's artifact. "resolved: 0" then means wrong bytes, not missing extractor.

What we learned

Solved

  • Diagnosed the HELD on TT/MM to the exact line: worker-agent-1-day-28.log:1116 pipe-pair fill failed: module 'solve_poly_d8' has no attribute '_d23_fill'. autosolve_script.py (SS already CORRECT, flag preserved) still depends on _P8p._d23_fill(d,_pipe) for every "two labels joined by |" question — the python carrier (=carrier|windows_chain) and obfuscation (=syntax|obfuscation) pipe-pairs.

Learned

  • Root cause is a lost-code regression, not a lane bug. The HS_D27_CUTOVER_20261027 reconciliation overwrote challenges/_lib/solve_poly_d8.py with a Day-08-only stub (574 lines, sha 35af66ca…), dropping the entire Day-23/25 _d23_* layer (_d23_fill, _d23_file_kv, _d23_derive, set_strict_for_mode, _strict, plus LYR decode / extra codecs / descriptor bruteforce / style detectors / bash_adv improvements). No copy of the layer survives in the tree except the pre-cutover audit backup (1495 lines, sha 54df1491…). This also explains the no file for polyglot-terraform_hcl-* noise: the stub's extra_answers/poly_answers chain lost its _d23 coverage too.
  • Confirmed the pipe-pair semantics from kb/retro_fill_v2_script_analysis.homestation.txt: the python descriptor carries discrete carrier, windows_chain, syntax, obfuscation fields; the join is proven (both halves always present) so it resolves on timed and untimed routes alike — no guessing. Strict mode (set_strict_for_mode('time_trial'|'mastery')) withholds a half-descriptor.

Live mode completion — 2026-10-28 (Commander continuation)

This section supersedes the earlier offline-only status above. The earlier SS completion remained intact; it was not restarted or resubmitted.

  • Time Trial: GM CORRECT, regular/unranked. Resumed existing attempt [id] (started 2026-10-28T13:37:34Z; 1,781 assigned answer IDs; no deadline; run_for_time=false). The normal autosolver refused to convert this existing attempt into a ranked one and solved it as-is. End-to-end mode time: 40.5 s. No duplicate attempt was opened.
  • Mastery: GM CORRECT, ranked. Fresh attempt [id], 21,372 assigned answer IDs, run_for_time=true, HOF eligible; server deadline 2026-10-28T14:48:19.171Z. The normal Script adapter downloaded the assigned artifact and completed in 236.6 s, before the server deadline.
  • The restored solve_poly_d8.py path passed focused offline tests immediately before the live run: strict-mode/rejection 43/43, determinism 3/3, pipe-pair 6/6, Terraform D23 derivations 33/33. The real autosolve path reported the same solver and field_formats.confirm_all handled the complete answer maps. No model-solving call was used.
  • The initial autosolve invocation safely skipped because the local pool fallback contained only SS while the day snapshot was stale. I fetched the official day list once, reconciled through board.reconcile (no additional marks), and atomically refreshed the existing list_snapshot before rerunning the normal autosolver. The refreshed snapshot showed only SS solved; TT and Mastery remained open. This was a stale local-state issue, not a solver failure.
  • Fresh-process GM status after completion reported TT and Mastery CORRECT; board reload confirmed the TT and Mastery mode entries durable. SS was already present as the base challenge entry in done.json before this run.
  • No answer values are repeated in this note; GM accepted results and the protected local autosolve receipt remain the source of truth.

D28 failure analysis and next-run playbook

What went wrong this morning

The retained evidence shows three separate issues; they should not be collapsed into “the solver failed”:

  1. Timed-mode repair was misclassified. The first repair ticket described an extraction_miss, but its timed residue was empty and the GM had not opened a TT attempt. The context had no TT artifact; the repair builder attached the only local artifact, the SS zip. TT’s 178 hash-named file references had zero overlap with that zip’s 179 semantic-named entries. A 0/1,781 result against those bytes was therefore an artifact/mode-context mismatch, not evidence of an extractor defect. Check GM.status and the per-mode artifact identity before opening an extractor ticket or starting a timed mode.
  2. The shared Script solver had a real lost-code regression. The deployed solve_poly_d8.py copy had lost the D23/D25 _d23_* derivation layer that autosolve_script.py calls. The approved, byte-verified 1,495-line backup was restored before this run. The live solver now exposes _d23_fill and the related strict-mode helpers; tests below cover this path. Keep this restored version and its regression tests together during future source reconciliation.
  3. The first Commander autosolve run saw stale local state. The day snapshot had aged out and the no-list fallback rebuilt one SS-only entry from the local pool record. Since SS was already in done.json, the resulting empty mode list made autosolve say “every mode is already solved,” despite GM showing TT open and MM not started. I refreshed the existing whole-day snapshot atomically from one authoritative GM.list, ran the sanctioned add-only board.reconcile, then reran the normal autosolver from that fresh snapshot. Reconciliation added nothing; the refreshed state correctly showed only SS complete. Do not treat the SS-only local pool fallback as a full mode inventory.

Reusable deterministic method

The current Script path is autosolve.py → autosolve_script.compute → solve_fields_ext / solve_poly_d8.extra_answers and _d23_fill → answer_contract.filter_answers → the existing GM submit path. It maps each fresh question ID to its current assigned, hash-named file and derives fields from the embedded versioned descriptor. Pipe-pair values are emitted only when both descriptor components are present; strict TT/MM mode withholds incomplete pairs and unproven guesses. The TT and MM answers were computed from their own GM-assigned artifacts. No SS answer mapping was replayed, and no model-solving call was used.

What will make the next solve faster and safer

  • Before any timed-mode decision, read mode state once from the fresh station snapshot or the existing GM.status result. If the snapshot is stale, refresh it through list_snapshot.write from the watcher’s authoritative whole-day list; do not repeatedly call GM.list from each worker.
  • Preserve the solver preflight order: confirm the helper surface exists, run the strict malformed/partial-descriptor controls, then require a complete, typed candidate for the exact current mode before a first ranked start. An already existing attempt is resumed as-is; it is never restarted to convert it to ranked.
  • Add artifact_match_guard to repair classification so “mode not started,” “wrong mode’s artifact,” and a genuine extraction miss receive different labels. An empty residue is not an extraction failure.
  • Profile the real adapter’s download, outer-archive indexing, per-set extraction/analysis, descriptor derivation, answer-contract filtering, and submit/GM latency separately. Cache parsed facts only within the current artifact SHA and attempt; never reuse answer values across variants.
  • The telemetry for this run recorded cap_layer as not_dispatched even though the legacy Script adapter solved correctly. Review the capability contract/registration for this family so future agents discover the validated method directly; do not replace the working legacy path until parity tests pass.

Measured result and limits

The resumed regular TT completed in 40.5 s end-to-end for 1,781 answer IDs; its solver phase telemetry was 27.5 s. Fresh ranked MM completed in 236.6 s end-to-end for 21,372 answer IDs, within its 380-second server window, leaving about 143 seconds. These are one-run observations, not p50/p95 or proof of a universal solve-time target. The MM figure includes the normal attempt/answer path and should not be compared directly with pure offline compute. Next optimization work should use phase-level profiling on a retained sanitized artifact and preserve the fresh-variant, strict-abstention, and exact-answer-ID checks.

<!-- kb-check not-a-script: b1907a.sh -->