Terminal & Coding
Terminal & Coding
Software engineering and scientific computing tasks carried out in a containerised terminal: repairing an existing codebase, re-implementing a program that can only be executed, or writing a numerical solver from scratch. Hidden tests run in a separate container on data generated at grading time.
Typical tasks
Seven delivered tasks
Each task runs offline in an ubuntu:24.04 container.
| Area | Core problem | Task type |
|---|---|---|
| Build systems · Crash consistency | Content-addressed build cache that stays equivalent to a clean build after interrupts and reverts | Repair and extension |
| Audio DSP · Loudness metering | Reproducing an execute-only loudness meter's readings, errors and resumable streaming true peak | Black-box re-implementation |
| Pharmacokinetics · NCA | Field-by-field, error-by-error re-implementation of an NCA calculator | Black-box re-implementation |
| Molecular simulation · Numerics | Periodic neighbour search in arbitrary cells, three-body potential and Bloch linear response | Repair and extension |
| Quantitative finance · Free-boundary problems | Implied volatility of American options with cash dividends, to 2e-5 | Implementation from scratch |
| Queueing theory · Transient analysis | Transient metrics for a two-class priority call centre with piecewise arrival rates | Implementation from scratch |
| Signal processing · Inverse problems | Blind calibration of raw TDR records and impedance profiles of lossy segmented lines | Implementation from scratch |
Representative sample
Crash-consistent build cache repair
Problem
A team builds its C service with an in-house, ninja-style Python build tool that keeps a content-addressed cache of build actions. When a CI job is cancelled with SIGKILL mid-build, the cache is still saved; the next job restores it, and the published binary still carries an old constant from a header that has since changed. The tool must be repaired so that the guarantees in its documentation hold for every history they allow.
Inputs and constraints
- Inputs: the tool's source, the C service and its manifest, the guarantees document, the CLI and syntax reference, CI scripts, an incident report and public tests.
- After every successful build, all outputs must be identical to a clean build of the current tree.
- Compiler launches are strictly limited: none when nothing has changed, none for units that are unaffected or covered by the restored cache, and at most one per remaining unit per build.
- The CLI, manifest syntax and cache location must not change, nor any existing file outside the tool and the regression script.
- Resources: 1 CPU, no network; all builds in one history within 30 s, peak memory per build within 1024 MiB.
Required work
- Find how a killed process leaves a cache record that looks complete but is stale, and make cache writes atomic.
- Key the cache on the files the compiler actually read (its gcc dependency closure), not on the declared dependency list.
- Handle header shadowing: a new higher-priority header of the same name, nearest-match lookup for nested headers, and fallback after deletion.
- Keep several results per build action, so that reverting to earlier content hits the cache.
- Write a regression script that exits 1 on faulty versions and 0 on a correct implementation, within 20 s per run.
Acceptance criteria
Grading runs in a separate container. Each random seed produces two randomly generated histories, in addition to fixed short histories, header-shadowing histories and a replay of the incident. After every successful build, the sha256 of every output in the manifest must match an independent clean build. All compiler launches pass through the grader's own compile service and are checked against the launch rules. The regression script must fail several faulty variants and pass several correct ones. All checks must pass under every seed for a score of 1; otherwise the score is 0.
Common errors
- Fixing only the scenario in the incident report, without covering interleaved edits and reverts or cache snapshots restored into a fresh checkout.
- Keying the cache on declared dependencies only, so that a shadowing header changes what the compiler reads while the old entry still hits.
- Recompiling everything to be safe: the outputs are correct, but the launch rules are broken.
- Validating the regression script only against one's own implementation, so that it raises false alarms on other correct ones.
Availability
Not publicly downloadable. The full package (instruction, environment, reference solution and grader) is available after approval, under terms agreed per engagement.
Representative sample
Black-box re-implementation of a pharmacokinetic calculator
Problem
A laboratory's pharmacokinetic analysis depends on a non-compartmental analysis (NCA) calculator that can be executed but not read. An independent Python implementation is needed to replace it. During development the original can be queried without limit; during grading it is not available. All concentration–time data are synthetic.
Inputs and constraints
- Inputs: the execute-only program, a public interface document (input syntax, tested domain, 20 output keys, error codes), four example cases and downstream import scripts.
- Output is a 20-line key=value report in fixed order; the positions of NA values must match the original exactly.
- Numeric fields within a relative tolerance of 1e-6; four time fields must be equal as doubles.
- For invalid input, the exit code and the first line of the error message must match the original character for character.
- Resources: 2 s and 512 MiB per call; the submission directory is limited to 1 MiB and may not contain binaries or a copy of the original.
Required work
- Implement Cmax, Tmax, AUClast, AUCall, AUCinf, λz, MRT, CL, Vz and the remaining report fields.
- Probe the original with constructed inputs to infer how it selects the terminal-phase window and when it reports NA.
- Infer the priority of error codes, and the line reported, when an input has several faults.
- Compare against the original on large random input sets, including deliberately degenerate curves: flat, symmetric, or with too few points.
Acceptance criteria
Grading uses a fixed core of degenerate cases plus cases generated per seed, covering targeted behaviours, inputs close to decision thresholds, domain corners and unit-scaling variants. Expected values are first cross-checked between the original program, an independent mathematical model and a high-precision witness. Every report must also be parsed correctly by the downstream import script. Any mismatch on any case results in a score of 0.
Common errors
- On a nearly flat or symmetric terminal phase (for example concentrations 5, 6, 5), floating-point rounding yields a tiny negative slope: the implementation reports numbers where the original treats the slope as zero and reports NA.
- Comparing mostly against smooth decay curves and never constructing degenerate inputs.
- Reporting the wrong error code or line when an input has several faults.
- Packing the original program, or an encoded copy of it, into the submission; the grader detects this and fails the task.
Availability
Not publicly downloadable. The full package (instruction, environment, reference solution and grader) is available after approval, under terms agreed per engagement.
Deliverables
Task package contents
- Task instruction and environment: a Dockerfile based on ubuntu:24.04 and the files visible to the solver.
- Reference solution, installed to the delivery location by a script.
- Independent grader; hidden tests and the reference solution enter the container only at grading time.
- Per-task documentation: skills assessed, grading rules, layout and how to run it.
- Reproducibility: a fixed seed regenerates the same hidden data.
- Optional run records: agent trajectories and grading results.
Format: Harbor task packages, with solving and grading kept separate. Licensing and usage terms are agreed per engagement.
Quality assurance
Verification and safeguards
- Fresh environment: every grading run starts from a new container.
- No memorisation: hidden data are generated from random seeds at grading time, so remembered examples do not pass.
- Reward hacking controls: submissions are scanned for binaries, copies of reference programs and large encoded blobs, and toolchain hashes are verified.
- Resource limits: CPU, memory and wall-clock limits are measured by the grader.
- Trusted expected values: where applicable, a reference program, an independent model and high-precision computation are cross-checked.
- Confidential: hidden tests, reference solutions and grader source code are not published.