Overview
Each item is an original, long-horizon development task in a real, actively maintained codebase. In one message, a developer asks for a capability the codebase does not have yet. The agent has to find its way around the code, locate every place that must change, implement the whole behaviour across many files (every parallel code path, default, edge case and error condition) and commit it. Each item has two parts: a re-runnable task environment in the DeepSWE format (a Harbor task directory: the Dockerfile of an offline environment, the request, hidden tests and a reference solution), ready for reinforcement learning; and full trajectories of Claude Opus 5.5 at max effort working on it in mini-swe-agent, the bash-only agent harness of the DeepSWE leaderboard, each with its grade and an audit of why it passed or failed, for supervised fine-tuning.
Difficulty and quality
- Hard tier: Claude Opus 5.5 at max effort succeeds in at most 1 of 3 attempts.
- Failures are the model’s, not the task’s: when the agent gets a task wrong, the cause lies in its own change, not in the request or the grader.
- Reference scores 1.0: every task comes with a reference solution that gets reward 1.0 under Harbor’s oracle agent, so you can check each task yourself.
What you get
tasks/<task>/ # Harbor task directory: runs as is with Harbor or Pier
├── task.toml # metadata, resources, time limits; no network for agent or grader
├── instruction.md # the request: the agent's only input
├── environment/ # Dockerfile + build context (codebase at a fixed commit) for the offline image
├── tests/ # hidden: test.sh, hidden tests, fail-to-pass and regression lists, build/type-check gates
├── solution/ # reference solution: solution.patch, solve.sh
└── requirements.json # each requirement of the request <-> the hidden tests that check it
trials/<task>__<n>/
├── agent/
│ ├── requests.jsonl.zst # request-level API records: full context and reply of every call, thinking summaries
│ ├── trajectory.json # the same run in ATIF
│ ├── mini-swe-agent.trajectory.json
│ └── steps.jsonl # step view: thinking summary, command, output
├── artifacts/model.patch # the committed change that was graded
├── verifier/ # reward.json, ctrf.json, test output
├── result.json # run summary: model calls, commands, time
└── audit.json # why the run passed or failed; root cause of each failing test
index.json # tasks and trials
README.md # building, running and grading
Running with Harbor
# the reference solutions
harbor run -p tasks -a oracle
# your agent
harbor run -p tasks -a <agent> -m <model>
- Grading: a run scores 1 when every fail-to-pass test passes and no regression test or build/type-check gate fails, otherwise 0; reward.json also records the pass fraction of each kind of test. The hidden tests go through the public interface the request names; the agent’s own test files are set aside while grading.
- Isolation: the agent works offline and never sees the hidden tests or the reference solution; grading runs in a fresh container on the committed change.
- Trajectories: each step holds a thinking summary, a bash command and its output; the request-level records keep the full context of every model call.
Samples
Three tasks from the hard tier, in Python and Rust, each in a different field. Reference solutions add 553–2,165 lines across 13–21 files; each task has 188–754 hidden fail-to-pass tests, plus 807–9,319 regression tests.
| Sample | Language | Field | Reference solution | Fail-to-pass tests |
|---|---|---|---|---|
| 1 | Python | ORM admin panel | +751 lines / 21 files | 392 |
| 2 | Rust | Authorization policy engine | +2,165 lines / 13 files | 188 |
| 3 | Python | RDF graph library | +553 lines / 19 files | 754 |
Each card shows the request exactly as the agent received it, what makes the task hard and what the hidden tests check.
Sample 1 of 3
CSV import: update existing rows by ID columns, batched commits and dry runs
sqladmin, a Python library that adds an admin web interface for SQLAlchemy models (sync or async engines) to Starlette and FastAPI apps.
CSV import can only insert, so re-importing an edited export duplicates rows or breaks unique constraints. The request adds ModelView.import_id_columns, which looks each row up by its coerced values in those columns, updates a single match and inserts when nothing matches; ModelView.import_batch_size, which commits every time that many rows were created or updated, so an import that stops keeps its committed batches; and a dry_run form field whose run does the same validation, lookups, permission checks and per-row flushes, commits nothing, and must report exactly what the real run would. Every result event gains created, updated and dry_run, and the import modal gets a dry-run checkbox and shows both counts.
Why it is hard
- A dry run commits nothing, yet must report exactly what a real run with the same
import_batch_sizereports, including the rows a stopped real run had already saved in batches and constraint violations that only per-row flushes reveal. - Only created or updated rows count towards a batch; an import stopped by a row failure, client disconnect or failed commit rolls back only uncommitted work, with counts and summary covering committed batches, identical to an unbatched run when nothing was committed.
- Lookups use coerced values (
yesmust match a storedTrue); an empty boolean ID cell coerces toFalseyet counts as missing; rows apply in file order, so later rows match rows just created or updated, or committed by an earlier batch. add_view()checks against the resolved import columns (falling back tocolumn_list, then the primary key);import_batch_sizemust rejectbool, floats, strings andNone, and be positive only withimport_id_columns.- The change spans the import flow, configuration checks, the result event and the import modal’s template and script, while progress events, upload-validation errors, existing result keys and real-run summaries stay exactly as they were, on sync and async engines alike.
The request, verbatim (the agent’s only input)
CSV import can only insert, so re-importing an edited export duplicates rows or breaks unique constraints.
Add ModelView.import_id_columns: ClassVar[list[str | InstrumentedAttribute]] = []. Entries (attributes or names) must be mapped columns, not relationships, in the resolved column_import_list; otherwise Admin.add_view() raises sqladmin.exceptions.ImproperlyConfigured. When the list is empty, nothing changes. Otherwise, each valid row with a value in every id column (an empty cell counts as missing) is looked up by equality on those columns using its coerced values. Rows missing an id value or a match are inserted. A row with exactly one match updates it with the row's import-column values (empty nullable cells set NULL, as on insert) and counts as updated even if nothing changed. Rows apply in file order, so a row can match one created or updated by an earlier row, in any batch. Updates (not inserts) also require can_edit and await check_can_edit(request, existing_obj). A refused update or a multi-row match fails like other persistence failures (aborting the import, or skipped with continue_on_error), with a non-empty errors["__all__"] list in its missed_rows entry. on_import_row(data, model, request) also runs for updates, with the existing instance as model. Rows absent from the file are untouched, and on_model_change/after_model_change aren't called. Every result event, aborts included, gains created (int), updated (int) and dry_run (bool), with imported always equal to created + updated.
Add ModelView.import_batch_size: ClassVar[int] = 0, a non-negative int (not a bool) that may be positive only with import_id_columns; otherwise add_view() raises ImproperlyConfigured. A positive value commits whenever that many rows have been created or updated since the last commit (failed rows don't count), and commits the rest at the end; 0 keeps one transaction. An import that stops early, for any reason, rolls back only what isn't committed. Aborted results keep ok: false, aborted: true, rolled_back: true and today's skipped/missed_rows, but imported, created and updated count the rows of committed batches. When that count is non-zero, the summary keeps its first sentence but ends with <N> row(s) were saved before the import stopped. (<N> = imported) instead of saying no rows were imported.
POST {base_url}/{identity}/import accepts a dry_run form field parsed exactly like continue_on_error. A dry run does the same validation, lookups, permission checks, on_import_row calls and per-row flushes (so constraint violations become row failures) but commits nothing. It reports exactly what a real run with the same import_batch_size would, aborts included, except for dry_run: true and a Dry run: summary prefix. The import modal gets a name="dry_run" checkbox sent with the upload and shows the created/updated counts.
Progress events, upload-validation error responses, existing result keys and non-dry-run summaries are otherwise unchanged, and sync and async engines behave identically.
IMPORTANT: Please work on this in a new branch from main and commit everything when you are done.
What the hidden tests check
- add_view() validates the configuration: import_id_columns (default "[]", attributes or names) rejects relationships, unknown names and columns outside the resolved import columns; import_batch_size (default int 0) rejects negatives, bools, floats, strings, None, and positive values without import_id_columns.
- Rows are matched on every ID column by coerced value (yes and no match stored booleans); an empty ID cell inserts without matching NULL rows; a single match is updated from the import columns (empty nullable cells set NULL, unchanged rows still count), rows absent from the file stay as they are, and later rows update rows created earlier or committed by an earlier batch.
- Updates need can_edit and check_can_edit called with the existing row (an authorization backend denying edits blocks them too), inserts do not; refused updates and multi-row matches carry a non-empty __all__ error list and are skipped with continue_on_error or abort the import; on_import_row gets the existing instance for updates, and on_model_change and after_model_change are never called.
- With batches, each full batch is committed before the next row runs, failed rows don't count, and the rest is committed at the end; a stop by row failure, client disconnect, or failed batch or final commit keeps the committed batches, counts only them and ends the summary with "N row(s) were saved before the import stopped."; with nothing committed the result is identical to an unbatched import.
- dry_run is parsed like continue_on_error (1, true, on, yes in any case; 0, off, y, 2 and the like import for real); a dry run checks permissions, calls on_import_row and reports constraint violations, including clashes with rows it created earlier, as row failures, yet commits nothing at any point.
- A dry run's counts, missed rows and summary match a real run with the same import_batch_size, stopped and cancelled imports included, apart from dry_run: true and the "Dry run: " prefix.
- Every result event, aborts and cancels included, has int created and updated and a bool dry_run, with imported equal to their sum; progress events, upload-validation status codes and texts (dry runs too) and real-run summaries are unchanged.
- On the list page, used as a person would, the import modal's dry_run box makes the upload a dry run (ticked then unticked, it imports for real), is sent along with the continue_on_error box, and the modal shows the created and updated counts; checks cover sync and async engines, the 807 existing tests must still pass, and the package must still build and pass mypy.
- fail-to-pass tests
- 392
- regression tests
- 807
- build/type-check gates
- 2
- files in the reference solution
- 21
- lines it adds
- +751
Sample 2 of 3
Per-policy authorization explanations for Cedar, with stopping-condition source ranges
Cedar, a Rust workspace implementing the Cedar authorization policy language: parser, evaluator, authorizer, validator, formatter, CLI and JSON/wasm FFI.
For every policy, report whether each scope constraint matched, which when / unless clause (if any) stopped it or errored, and whether it determined the decision. For a policy stopped by a clause, also give the byte range of that clause’s condition, in the same offsets as evaluation-error source locations: linked policies point into their template’s text, and policies not parsed from Cedar text have no range. Expose this via Authorizer::explain, cedar authorize --explain and JSON/wasm FFI functions, with the CLI turning the range start into a line and a character-counted column, and existing behaviour unchanged.
Why it is hard
- The core AST folds all
when/unlessclauses into one expression, so clause boundaries are lost and neither indices nor condition ranges can be read off it. - A range covers the condition as written: only surrounding whitespace and comments drop out, enclosing parentheses and inner comments stay, and text such as
}or//inside strings or annotations must not throw it off. - One position has two coordinate systems: byte offsets from the start of the parsed text in the API and FFI, with linked policies pointing into their template, and a 1-based line and character-counted column in the CLI. Multi-byte characters make the two counts differ.
- Each scope constraint is checked separately with template slot values across
==,in,is,is ... inand action lists, and any mismatch must skip conditions. Clauses stop at the first one that fails, withunlessinverted and both runtime errors and non-boolean results reported asError. - Spans the Rust API, CLI, JSON FFI and
cedar-wasm, which must all report the same results, while existingis_authorizedresults, CLI output bytes and exit codes must not change.
The request, verbatim (the agent’s only input)
is_authorized can't say why a policy didn't apply. Keeping existing behaviour unchanged, add Authorizer::explain(&self, &Request, &PolicySet, &Entities) -> AuthorizationExplanation and cedar_policy root types:
AuthorizationExplanation:response() -> &Responseanddecision() -> Decision(same asis_authorized),policies() -> impl Iterator<Item = &PolicyExplanation>(static and template-linked policies sorted by ID string),policy(&PolicyId) -> Option<&PolicyExplanation>.PolicyExplanation:id() -> &PolicyId,effect() -> Effect,outcome() -> PolicyOutcome,condition_index() -> Option<usize>,condition_range() -> Option<std::ops::Range<usize>>,boolgettersprincipal_matched(),action_matched(),resource_matched(),is_determining()(iff the ID is inresponse().diagnostics().reason()).PolicyOutcome(derivesDebug, Clone, Copy, PartialEq, Eq):NotApplicable,ConditionFalse,Satisfied,Error.
All scope flags are always computed, each on its own (links use slot values); any false gives NotApplicable with no condition evaluated. Otherwise when/unless clauses are evaluated in source order until one doesn't pass (when needs true, unless false): Error if it errored or wasn't boolean, else ConditionFalse; Satisfied if none does. For ConditionFalse/Error only (else None), condition_index() is that clause's 0-based index and condition_range() the byte range of its condition inside the braces, minus surrounding whitespace and comments, in the same offsets as the policy's evaluation-error source locations (for linked policies, into the template's text); the range is also None if the policy (or its template) wasn't parsed from Cedar text.
cedar authorize --explain prints the normal output, a blank line, explanation:, then per policy in ID order <id> (<permit|forbid>): <text>, <text> being satisfied (determining), satisfied, scope did not match: <parts> (non-matching of principal, action, resource, in order, joined by , ), condition <i> not satisfied or error in condition <i> (<i> = condition_index()); if the range is known, the last two gain (line <l>, column <c>), the range start's 1-based line and character-counted column in the policies input. Exit codes don't change.
In cedar_policy::ffi add explain_authorization(AuthorizationCall) -> ExplanationAnswer, explain_authorization_json and explain_authorization_json_str (typed like their is_authorized counterparts; Err only for input that isn't an AuthorizationCall), and a wasm_bindgen export explainAuthorization (feature wasm) re-exported by cedar-wasm. Unparseable inputs give is_authorized's failure answer. Success is is_authorized's success answer plus "policies":[...]: ffi::PolicyExplanation objects, with condition_range(&self) -> Option<ffi::SourceLocation>, in policies() order, each with exactly id, effect ("permit"/"forbid"), principalMatched, actionMatched, resourceMatched, outcome (camelCase variant), determining, conditionIndex and conditionRange ({"start":s,"end":e}), the last two null when absent.
IMPORTANT: Please work on this in a new branch from main and commit everything when you are done.
What the hidden tests check
- API surface: Authorizer::explain, the root types and getters, PolicyOutcome derives, policy() lookup by ID, and explanations outliving the policy set they came from; policies() sorted by ID string, case-sensitively and for default policyN IDs, with unlinked templates excluded and empty sets listing nothing.
- response() matches is_authorized, and is_determining() matches its reasons, for allow-with-errors, deny-by-forbid, default deny and a skipped erroring forbid; is_authorized results themselves are unchanged.
- Scope flags for "==", in via hierarchy, is, is ... in, action lists and template slot values, singly and combined; mismatches yield NotApplicable without evaluating conditions.
- Clause outcomes: when / unless truth rules, stopping at the first failing clause, one index running across when and unless clauses, errors from missing attributes and overflow, non-boolean values, and the conditions array order for JSON policies.
- Range contents: only ConditionFalse and Error have one; it covers the whole condition, not just the erroring part; surrounding whitespace and comments drop out, while enclosing parentheses, inner comments and line breaks stay; braces and comment markers inside strings, and braces inside record literals and annotations, change nothing.
- Range offsets: bytes, counting comments and annotations before the policy and the whole policy set text; consistent with evaluation-error locations; unchanged by a new ID; pointing into the template text for links; absent for JSON, PST and protobuf-decoded policies and for links of JSON templates.
- CLI: exact --explain lines after the normal output, --verbose included; 1-based lines and character-counted columns, for policies from a file or stdin; no location for JSON-format policies; byte-identical output without the flag, on success and on failure; unchanged exit codes.
- FFI and wasm: exact top-level keys and nine keys per policy, with null kept when absent; the typed condition_range() agreeing with the JSON conditionRange; failure answers and warnings matching is_authorized; Err from the _json functions only for input that isn't an AuthorizationCall; the cedar-wasm re-export is checked too.
- fail-to-pass tests
- 188
- regression tests
- 3,482
- build/type-check gate
- 1
- files in the reference solution
- 13
- lines it adds
- +2,165
Sample 3 of 3
Add RDF 1.2 base direction end to end, including JSON-LD @direction
rdflib, a Python library for working with RDF: a graph and term model, parsers and serializers for N-Triples, Turtle, TriG, N3, JSON-LD and other formats, a pyparsing-based SPARQL 1.1 engine, and pluggable stores.
Make RDF 1.2 directional language-tagged strings ("x"@ar--rtl) work end to end. That covers a direction on Literal, the N-Triples and Turtle-family parsers and serializers, SPARQL syntax plus LANGDIR, hasLANG, hasLANGDIR and STRLANGDIR, SPARQL result formats, stores, and JSON-LD @direction. When parsing JSON-LD, value objects use only their own direction, and other strings take their term’s direction if it defines one, else the context default; when serializing, a bare string or language-map entry is written only if the direction it reads back as equals the literal’s own, otherwise a value object. Anything without a base direction must behave and serialize exactly as today.
Why it is hard
- Many parallel paths must agree:
Literal, the RDF syntax parsers and serializers, SPARQL grammar and functions, result formats, stores, and the JSON-LD context, parser and serializer; the reference touches 19 files. - JSON-LD parsing has a fixed precedence: value objects use only their own direction, even when tagged; strings take their term’s direction if it defines one (
nullincluded), else the context default, wherever their language came from; embedded and scoped contexts inherit the default, and anullcontext clears it. - JSON-LD output must read back unchanged: bare strings, language-map entries and list items are allowed only where the direction they read back as equals the literal’s own (absence included), otherwise a value object, using the context’s alias for
@directionif it has one. - Bad directions must raise the right error in the right place: only lowercase
ltrorrtlmay follow--, withParserErrorin nt/nquads andBadSyntaxin turtle/trig/n3; in JSON-LD an invalid@directionraisesJSONLDExceptionwhen its document orContextloads, even if unused or on a value whose direction would be dropped. - Non-directional data must behave exactly as today, guarded by 9,321 pass-to-pass checks (existing tests plus build/type-check gates), JSON-LD parsing and output included, though equality, hashing and pickling gain a field.
The request, verbatim (the agent’s only input)
rdflib handles "x"@ar everywhere; add RDF 1.2 base direction ("x"@ar--rtl, rdf:dirLangString) end to end.
Literal gets a fifth parameter direction=None and a read-only .direction (.datatype stays None); a direction other than 'ltr'/'rtl' raises ValueError (even ''), one without a language tag TypeError. ==, hash and eq() distinguish "x"@ar, "x"@ar--ltr and "x"@ar--rtl. repr() is rdflib.term.Literal('x', lang='ar', direction='rtl'); n3() is "x"@ar--rtl, parsed back by rdflib.util.from_n3; pickle, copy, deepcopy, Literal(lit) and Memory/BerkeleyDB stores (across re-open) preserve it.
The nt/ntriples/nt11, nquads, turtle/ttl, trig and n3 parsers and serializers, plus longturtle, handle it and round-trip; parsing accepts it with subtags (@en-US--ltr) and after every Turtle/TriG string form and N3's double-quoted ones. Only lowercase ltr/rtl may follow --; anything else, or --rtl without a language tag, raises ParserError (nt, nquads) or BadSyntax (turtle, trig, n3).
SPARQL queries and updates accept it wherever a literal may appear. LANGDIR gives "ltr"/"rtl", "" for other literals, an error for IRIs/bnodes; hasLANG/hasLANGDIR give xsd:boolean, true iff given a literal with a tag/direction (never an error); STRLANGDIR("abc", "ar", "rtl") is "abc"@ar--rtl, an error for a bad direction or tagged/typed first argument. DATATYPE("x"@ar--rtl) is rdf:dirLangString (a plain URIRef, not added to rdflib.RDF); LANG gives just the tag. UCASE, LCASE, SUBSTR, STRBEFORE, STRAFTER and REPLACE keep the direction where they keep the tag; CONCAT keeps tag and direction only if all arguments share both, else neither. In SPARQL results, json adds "its:dir": "rtl" beside "xml:lang" and xml a dir attribute in namespace http://www.w3.org/2005/11/its on <literal>, both parsed back; tsv parsing accepts "x"@ar--rtl; txt prints --rtl.
JSON-LD @direction (aliasable like other keywords) maps to Literal.direction: value objects use only their own, other string values their term's if it defines one (even null), else the context default, independent of their language's source. Embedded and scoped contexts inherit the default unless they set one; a null context clears it. Directions on values without a language tag are silently dropped. @direction values other than "ltr", "rtl" or null (none) raise JSONLDException with "invalid base direction" in the message when their document or Context is loaded, even if unused. The serializer adds @direction (or the context's alias) to value objects of directional literals and keeps today's bare-string or language-map form for a language-tagged literal only if the direction that form reads back as (its term's @direction if defined, else the context default) equals the literal's own, absence included; otherwise it writes a value object with @value, @language and any @direction. Context.direction holds the default (None if unset); its terms get a direction field and add_term() a direction argument (UNDEF if not given); to_dict() emits @direction for a set default and each term defining one.
Anything without a base direction must behave and serialize exactly as today.
IMPORTANT: Please work on this in a new branch from main and commit everything when you are done.
What the hidden tests check
- Literal: fifth positional direction, read-only property, ValueError/TypeError checks, equality, hashing and Graph storage keeping three variants apart, repr, n3(), from_n3, pickle and copies.
- RDF syntaxes: nt, nquads, turtle, trig, n3 accept @ar--rtl and subtags in each format's string forms, bad directions raise ParserError/BadSyntax; exact N-Triples/N-Quads lines with escaping, and round-trips through nt, nt11, nquads, turtle, longturtle, trig and n3.
- SPARQL: directional literals in queries and updates (triple patterns, VALUES, BIND, CONSTRUCT, ASK, INSERT/DELETE DATA, DELETE/INSERT WHERE, named graphs) and comparisons; LANGDIR, hasLANG, hasLANGDIR, STRLANGDIR (with COALESCE fallback on errors), DATATYPE, LANG, string functions and CONCAT tag/direction rules.
- Results and stores: JSON its:dir and XML ITS dir round-trips, TSV cells, TXT output; Memory and BerkeleyDB stores keep the direction across re-open.
- JSON-LD parsing: whether the value object, the term or the context default sets the direction; language maps, lists, sets, index maps and @nest; embedded, property-scoped, type-scoped and null contexts; @direction aliases; numbers, booleans and typed values untouched, directions dropped without a language tag.
- JSON-LD errors and Context: an invalid @direction in value objects, contexts, term definitions, embedded and scoped contexts, context files, the parser's or serializer's context argument and Context objects raises JSONLDException on load, even unused; Context.direction, term direction, the direction argument of add_term() and to_dict() output.
- JSON-LD serializing: value objects with @direction without a context; with one, bare strings, language-map entries and list items only where the direction read back matches, aliases honoured, output reading back to the same graph; non-directional output as today.
- End to end: Turtle→query→JSON/XML results; N-Triples→STRLANGDIR update→serialize; TriG↔N-Quads; data from Turtle, TriG and SPARQL Update through JSON-LD and back; a JSON-LD file with a referenced context queried with SPARQL for tags and directions.
- fail-to-pass tests
- 754
- regression tests
- 9,319
- build/type-check gates
- 2
- files in the reference solution
- 19
- lines it adds
- +553
Customization
Including, but not limited to, the following; anything else is open for discussion.
- Languages and codebases: languages and stacks (Java, C++ and others too), kinds and sizes of codebases, size of the change.
- Task mix and requests: new features, enhancements, behaviour changes, fixes, refactors; length and tone of the request, how much of the interface it names.
- Difficulty: the reference model and the pass-rate band to hit.
- Verification: number of hidden tests, regression scope, build and type-check gates.
- Trajectories: agent harness (the DeepSWE leaderboard’s bash-only harness, Claude Code and others), model and reasoning effort, trajectories per task.
- Format, volume and schedule: Harbor or Pier task directories, ATIF or request-level trajectories; how many and by when.