id
stringlengths
30
95
domain
stringclasses
5 values
task_type
stringclasses
49 values
difficulty
stringclasses
5 values
prompt
stringlengths
12
3.09k
context
stringclasses
596 values
observations
stringlengths
2
170
constraints
stringclasses
242 values
assumptions
stringclasses
51 values
plan
stringclasses
240 values
strategy
stringclasses
240 values
solution
stringlengths
5
766
answer
stringlengths
1
766
verification
stringlengths
268
1.71k
⌀
provenance
stringclasses
95 values
quality
stringclasses
29 values
education_level
stringclasses
6 values
concept_id
stringclasses
54 values
evidence
stringclasses
29 values
transformation
stringclasses
8 values
temporal
stringclasses
0 values
runtime
stringclasses
0 values
natural_language
stringclasses
1 value
translation_status
stringclasses
1 value
metadata
stringlengths
220
5.58k
or-coding-py-matrix-mul-a049547791a6
coding
code_generation
beginner
Implement `matmul(a, b)` for lists of lists of numbers. Raise ValueError on shape mismatch.
{"language": "python", "repository": {"files": {"solution.py": "def matmul(a, b):\n if not a or not b or len(a[0]) != len(b):\n raise ValueError(\"shape\")\n cols = len(b[0])\n out = []\n for row in a:\n out.append([sum(row[k] * b[k][j] for k in range(len(b))) for j in range(cols)])\n retur...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def matmul(a, b): if not a or not b or len(a[0]) != len(b): raise ValueError("shape") cols = len(b[0]) out = [] for row in a: out.append([sum(row[k] * b[k][j] for k in range(len(b))) for j in range(cols)]) return out
def matmul(a, b): if not a or not b or len(a[0]) != len(b): raise ValueError("shape") cols = len(b[0]) out = [] for row in a: out.append([sum(row[k] * b[k][j] for k in range(len(b))) for j in range(cols)]) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:03Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.6}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "matrix_m...
or-coding-py-huffman-freq-895f36a0c647
coding
code_generation
beginner
Implement `char_freq(text)` returning a dict of character -> count, omitting zeros. Empty string yields {}.
{"language": "python", "repository": {"files": {"solution.py": "def char_freq(text):\n out = {}\n for ch in text:\n out[ch] = out.get(ch, 0) + 1\n return out\n", "test_solution.py": "import unittest\nfrom solution import char_freq\n\nclass Test(unittest.TestCase):\n def test_freq(self):\n self...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def char_freq(text): out = {} for ch in text: out[ch] = out.get(ch, 0) + 1 return out
def char_freq(text): out = {} for ch in text: out[ch] = out.get(ch, 0) + 1 return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:03Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.375, "tests": 0.0, "total": 3.6750000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0"...
or-coding-py-debug-huffman-freq-7c2f4925eb57
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `char_freq(text)` returning a dict of character -> count, omitting zeros. Empty string yields {}. --- solution.py (buggy) --- def char_freq(text): out = {} for ch in text: out[ch] = out.get...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 1, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_freq (test_solution.Test.test_freq) ... FAIL\n\n======================================================================\nFAIL: test_freq (test_solution....
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def char_freq(text): out = {} for ch in text: out[ch] = out.get(ch, 0) + 1 return out
def char_freq(text): out = {} for ch in text: out[ch] = out.get(ch, 0) + 1 return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:03Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 3.525, "tests": 0.0, "total": 10.149999999999999}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details":...
or-coding-py-iso8601-date-48d56e72db33
coding
code_generation
intermediate
Implement `parse_ymd(s)` parsing YYYY-MM-DD into (y,m,d) ints. Validate month 1-12 and day 1-31 (do not validate month lengths).
{"language": "python", "repository": {"files": {"solution.py": "import re\n\ndef parse_ymd(s):\n m = re.fullmatch(r\"(\\d{4})-(\\d{2})-(\\d{2})\", s)\n if not m:\n raise ValueError(s)\n y, mo, d = (int(m.group(i)) for i in range(1, 4))\n if not 1 <= mo <= 12 or not 1 <= d <= 31:\n raise ValueE...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
import re def parse_ymd(s): m = re.fullmatch(r"(\d{4})-(\d{2})-(\d{2})", s) if not m: raise ValueError(s) y, mo, d = (int(m.group(i)) for i in range(1, 4)) if not 1 <= mo <= 12 or not 1 <= d <= 31: raise ValueError(s) return y, mo, d
import re def parse_ymd(s): m = re.fullmatch(r"(\d{4})-(\d{2})-(\d{2})", s) if not m: raise ValueError(s) y, mo, d = (int(m.group(i)) for i in range(1, 4)) if not 1 <= mo <= 12 or not 1 <= d <= 31: raise ValueError(s) return y, mo, d
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 2}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:03Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.525, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 4.575}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "iso86...
or-coding-py-queue-ttl-ba54c5273800
coding
code_generation
beginner
Implement `ExpiredQueue` with `push(t, item)` and `pop_ready(now)` returning all items with t <= now in insertion order and removing them.
{"language": "python", "repository": {"files": {"solution.py": "from collections import deque\n\nclass ExpiredQueue:\n def __init__(self):\n self.q = deque()\n\n def push(self, t, item):\n self.q.append((t, item))\n\n def pop_ready(self, now):\n out = []\n while self.q and self.q[0]...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
from collections import deque class ExpiredQueue: def __init__(self): self.q = deque() def push(self, t, item): self.q.append((t, item)) def pop_ready(self, now): out = [] while self.q and self.q[0][0] <= now: out.append(self.q.popleft()[1]) return out
from collections import deque class ExpiredQueue: def __init__(self): self.q = deque() def push(self, t, item): self.q.append((t, item)) def pop_ready(self, now): out = [] while self.q and self.q[0][0] <= now: out.append(self.q.popleft()[1]) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:03Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.675, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.5, "tests": 0.0, "total": 3.7750000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "s...
or-coding-py-debug-queue-ttl-bba887266492
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `ExpiredQueue` with `push(t, item)` and `pop_ready(now)` returning all items with t <= now in insertion order and removing them. --- solution.py (buggy) --- from collections import deque clas...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 1, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_pop (test_solution.Test.test_pop) ... FAIL\n\n======================================================================\nFAIL: test_pop (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
from collections import deque class ExpiredQueue: def __init__(self): self.q = deque() def push(self, t, item): self.q.append((t, item)) def pop_ready(self, now): out = [] while self.q and self.q[0][0] <= now: out.append(self.q.popleft()[1]) return out
from collections import deque class ExpiredQueue: def __init__(self): self.q = deque() def push(self, t, item): self.q.append((t, item)) def pop_ready(self, now): out = [] while self.q and self.q[0][0] <= now: out.append(self.q.popleft()[1]) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:03Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.675, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 10.975}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {...
or-coding-py-crc-like-sum-3d708315ebe3
coding
code_generation
beginner
Implement `wrapping_checksum(data: bytes)` as (sum of bytes) mod 256.
{"language": "python", "repository": {"files": {"solution.py": "def wrapping_checksum(data):\n return sum(data) % 256\n", "test_solution.py": "import unittest\nfrom solution import wrapping_checksum\n\nclass Test(unittest.TestCase):\n def test_sum(self):\n self.assertEqual(wrapping_checksum(bytes([255, 2])...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def wrapping_checksum(data): return sum(data) % 256
def wrapping_checksum(data): return sum(data) % 256
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.25, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.225, "tests": 0.0, "total": 3.075}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "crc_l...
or-coding-py-indent-blocks-fbfc145d12a1
coding
code_generation
intermediate
Implement `block_depth(lines)` using leading 2-space indents. Return a list of depths per non-empty line. Raise ValueError if indent is not a multiple of 2.
{"language": "python", "repository": {"files": {"solution.py": "def block_depth(lines):\n out = []\n for line in lines:\n if not line.strip():\n continue\n spaces = len(line) - len(line.lstrip(\" \"))\n if spaces % 2:\n raise ValueError(\"indent\")\n out.append(sp...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def block_depth(lines): out = [] for line in lines: if not line.strip(): continue spaces = len(line) - len(line.lstrip(" ")) if spaces % 2: raise ValueError("indent") out.append(spaces // 2) return out
def block_depth(lines): out = [] for line in lines: if not line.strip(): continue spaces = len(line) - len(line.lstrip(" ")) if spaces % 2: raise ValueError("indent") out.append(spaces // 2) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.45, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.6, "tests": 0.0, "total": 4.65}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "indent_b...
or-coding-py-ssa-rename-f92239238afb
coding
code_generation
beginner
Implement `fresh_names(vars)` assigning x, x#1, x#2, ... in order of first appearance counts: given a list of variable uses, return a list of renamed occurrences where the k-th use of name `v` becomes `v` then `v#1` etc.
{"language": "python", "repository": {"files": {"solution.py": "def fresh_names(vars):\n seen = {}\n out = []\n for name in vars:\n n = seen.get(name, 0)\n out.append(name if n == 0 else f\"{name}#{n}\")\n seen[name] = n + 1\n return out\n", "test_solution.py": "import unittest\nfrom so...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def fresh_names(vars): seen = {} out = [] for name in vars: n = seen.get(name, 0) out.append(name if n == 0 else f"{name}#{n}") seen[name] = n + 1 return out
def fresh_names(vars): seen = {} out = [] for name in vars: n = seen.get(name, 0) out.append(name if n == 0 else f"{name}#{n}") seen[name] = n + 1 return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.925, "tests": 0.0, "total": 4.300000000000001}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "...
or-coding-py-debug-ssa-rename-f7538eec5aab
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `fresh_names(vars)` assigning x, x#1, x#2, ... in order of first appearance counts: given a list of variable uses, return a list of renamed occurrences where the k-th use of name `v` becomes `v...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 1, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_ren (test_solution.Test.test_ren) ... FAIL\n\n======================================================================\nFAIL: test_ren (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def fresh_names(vars): seen = {} out = [] for name in vars: n = seen.get(name, 0) out.append(name if n == 0 else f"{name}#{n}") seen[name] = n + 1 return out
def fresh_names(vars): seen = {} out = [] for name in vars: n = seen.get(name, 0) out.append(name if n == 0 else f"{name}#{n}") seen[name] = n + 1 return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 10.7}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"err...
or-coding-py-lockfile-pin-515b47124038
coding
code_generation
intermediate
Implement `format_pin(name, version)` as `name==version` after validating name `[a-z0-9][a-z0-9._-]*` and version `[0-9]+(\.[0-9]+)*`.
{"language": "python", "repository": {"files": {"solution.py": "import re\n\ndef format_pin(name, version):\n if not re.fullmatch(r\"[a-z0-9][a-z0-9._-]*\", name):\n raise ValueError(\"name\")\n if not re.fullmatch(r\"[0-9]+(\\.[0-9]+)*\", version):\n raise ValueError(\"version\")\n return f\"{na...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
import re def format_pin(name, version): if not re.fullmatch(r"[a-z0-9][a-z0-9._-]*", name): raise ValueError("name") if not re.fullmatch(r"[0-9]+(\.[0-9]+)*", version): raise ValueError("version") return f"{name}=={version}"
import re def format_pin(name, version): if not re.fullmatch(r"[a-z0-9][a-z0-9._-]*", name): raise ValueError("name") if not re.fullmatch(r"[0-9]+(\.[0-9]+)*", version): raise ValueError("version") return f"{name}=={version}"
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.45, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.3, "tests": 0.0, "total": 6.35}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "lockfile...
or-coding-py-yaml-indent-check-53ba00fe9a91
coding
code_generation
beginner
Implement `tabs_in_indent(text)` returning True if any line uses a tab in its leading whitespace.
{"language": "python", "repository": {"files": {"solution.py": "def tabs_in_indent(text):\n for line in text.splitlines():\n i = 0\n while i < len(line) and line[i] in \" \\t\":\n if line[i] == \"\\t\":\n return True\n i += 1\n return False\n", "test_solution.py"...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def tabs_in_indent(text): for line in text.splitlines(): i = 0 while i < len(line) and line[i] in " \t": if line[i] == "\t": return True i += 1 return False
def tabs_in_indent(text): for line in text.splitlines(): i = 0 while i < len(line) and line[i] in " \t": if line[i] == "\t": return True i += 1 return False
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.loops
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.625}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "yaml...
or-coding-py-debug-yaml-indent-check-f7a60d2063d2
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `tabs_in_indent(text)` returning True if any line uses a tab in its leading whitespace. --- solution.py (buggy) --- def tabs_in_indent(text): for line in text.splitlines(): i = 0 while i < ...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 1, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_tab (test_solution.Test.test_tab) ... FAIL\n\n======================================================================\nFAIL: test_tab (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def tabs_in_indent(text): for line in text.splitlines(): i = 0 while i < len(line) and line[i] in " \t": if line[i] == "\t": return True i += 1 return False
def tabs_in_indent(text): for line in text.splitlines(): i = 0 while i < len(line) and line[i] in " \t": if line[i] == "\t": return True i += 1 return False
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 3.2, "tests": 0.0, "total": 9.925}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"...
or-coding-py-health-aggregate-64a07e8dba79
coding
code_generation
beginner
Implement `overall_health(checks)` where each check is `ok` or `fail`. Return `fail` if any fail, `ok` if all ok, `unknown` if empty.
{"language": "python", "repository": {"files": {"solution.py": "def overall_health(checks):\n if not checks:\n return \"unknown\"\n return \"fail\" if any(c == \"fail\" for c in checks) else \"ok\"\n", "test_solution.py": "import unittest\nfrom solution import overall_health\n\nclass Test(unittest.TestCase...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def overall_health(checks): if not checks: return "unknown" return "fail" if any(c == "fail" for c in checks) else "ok"
def overall_health(checks): if not checks: return "unknown" return "fail" if any(c == "fail" for c in checks) else "ok"
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.525, "tests": 0.0, "total": 3.45}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "healt...
or-coding-py-chunked-read-195ed981691f
coding
code_generation
beginner
Implement `chunks(seq, n)` yielding successive lists of length n, last possibly shorter. n must be >= 1.
{"language": "python", "repository": {"files": {"solution.py": "def chunks(seq, n):\n if n < 1:\n raise ValueError(\"n\")\n buf = []\n for item in seq:\n buf.append(item)\n if len(buf) == n:\n yield buf\n buf = []\n if buf:\n yield buf\n", "test_solution.py"...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def chunks(seq, n): if n < 1: raise ValueError("n") buf = [] for item in seq: buf.append(item) if len(buf) == n: yield buf buf = [] if buf: yield buf
def chunks(seq, n): if n < 1: raise ValueError("n") buf = [] for item in seq: buf.append(item) if len(buf) == n: yield buf buf = [] if buf: yield buf
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.475, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 3.5}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "chunke...
or-coding-py-debug-chunked-read-31ea8e68825d
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `chunks(seq, n)` yielding successive lists of length n, last possibly shorter. n must be >= 1. --- solution.py (buggy) --- def chunks(seq, n): if n < 1: raise ValueError("n") buf = [] for ...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 1, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_c (test_solution.Test.test_c) ... FAIL\n\n======================================================================\nFAIL: test_c (test_solution.Test.test...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def chunks(seq, n): if n < 1: raise ValueError("n") buf = [] for item in seq: buf.append(item) if len(buf) == n: yield buf buf = [] if buf: yield buf
def chunks(seq, n): if n < 1: raise ValueError("n") buf = [] for item in seq: buf.append(item) if len(buf) == n: yield buf buf = [] if buf: yield buf
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.475, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 10.774999999999999}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {...
or-coding-py-expr-simplify-double-neg-7d6a4d714970
coding
code_generation
beginner
AST nodes are tuples: ('neg', node) or ('num', int). Implement `simplify(node)` cancelling double negation.
{"language": "python", "repository": {"files": {"solution.py": "def simplify(node):\n if node[0] == \"num\":\n return node\n inner = simplify(node[1])\n if inner[0] == \"neg\":\n return inner[1]\n return (\"neg\", inner)\n", "test_solution.py": "import unittest\nfrom solution import simplify\n...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def simplify(node): if node[0] == "num": return node inner = simplify(node[1]) if inner[0] == "neg": return inner[1] return ("neg", inner)
def simplify(node): if node[0] == "num": return node inner = simplify(node[1]) if inner[0] == "neg": return inner[1] return ("neg", inner)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.325}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "expr_...
or-coding-py-debug-expr-simplify-double-neg-3d149d2c54df
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. AST nodes are tuples: ('neg', node) or ('num', int). Implement `simplify(node)` cancelling double negation. --- solution.py (buggy) --- def simplify(node): if node[0] != "num": return node inner = si...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 1, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_s (test_solution.Test.test_s) ... FAIL\n\n======================================================================\nFAIL: test_s (test_solution.Test.test...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def simplify(node): if node[0] == "num": return node inner = simplify(node[1]) if inner[0] == "neg": return inner[1] return ("neg", inner)
def simplify(node): if node[0] == "num": return node inner = simplify(node[1]) if inner[0] == "neg": return inner[1] return ("neg", inner)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 3.65, "tests": 0.0, "total": 10.325}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": ...
or-coding-py-histogram-ascii-619c33b5a4e4
coding
code_generation
intermediate
Implement `spark(nums)` mapping each value to a bar character from ` .:-=+*#%@` by min-max scaling. Constant arrays become all last char. Return a string.
{"language": "python", "repository": {"files": {"solution.py": "CHARS = \" .:-=+*#%@\"\n\ndef spark(nums):\n if not nums:\n return \"\"\n lo, hi = min(nums), max(nums)\n if lo == hi:\n return CHARS[-1] * len(nums)\n out = []\n for x in nums:\n idx = int((x - lo) / (hi - lo) * (len(CH...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
CHARS = " .:-=+*#%@" def spark(nums): if not nums: return "" lo, hi = min(nums), max(nums) if lo == hi: return CHARS[-1] * len(nums) out = [] for x in nums: idx = int((x - lo) / (hi - lo) * (len(CHARS) - 1)) out.append(CHARS[idx]) return "".join(out)
CHARS = " .:-=+*#%@" def spark(nums): if not nums: return "" lo, hi = min(nums), max(nums) if lo == hi: return CHARS[-1] * len(nums) out = [] for x in nums: idx = int((x - lo) / (hi - lo) * (len(CHARS) - 1)) out.append(CHARS[idx]) return "".join(out)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.55, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.6, "tests": 0.0, "total": 6.75}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "histogra...
or-coding-py-debug-histogram-ascii-6a10a5af3dd1
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `spark(nums)` mapping each value to a bar character from ` .:-=+*#%@` by min-max scaling. Constant arrays become all last char. Return a string. --- solution.py (buggy) --- CHARS = " .:-=+*#%@...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 1, \"failures\": 0, \"errors\": 1, \"skipped\": 0, \"passed\": false}\n\ntest_sp (test_solution.Test.test_sp) ... ERROR\n\n======================================================================\nERROR: test_sp (test_solution.Test...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
CHARS = " .:-=+*#%@" def spark(nums): if not nums: return "" lo, hi = min(nums), max(nums) if lo == hi: return CHARS[-1] * len(nums) out = [] for x in nums: idx = int((x - lo) / (hi - lo) * (len(CHARS) - 1)) out.append(CHARS[idx]) return "".join(out)
CHARS = " .:-=+*#%@" def spark(nums): if not nums: return "" lo, hi = min(nums), max(nums) if lo == hi: return CHARS[-1] * len(nums) out = [] for x in nums: idx = int((x - lo) / (hi - lo) * (len(CHARS) - 1)) out.append(CHARS[idx]) return "".join(out)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 1}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:04Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.55, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 10.85}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"e...
or-coding-py-micro-tripleneg-f55c23215c56
coding
code_generation
beginner
Implement `tripleneg`: Return n*3 if n<0 else n+3. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def tripleneg(n):\n return n*3 if n<0 else n+3\n", "test_solution.py": "import unittest\nfrom solution import tripleneg\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(tripleneg(-4), -12)\n def test_1(self):\n ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def tripleneg(n): return n*3 if n<0 else n+3
def tripleneg(n): return n*3 if n<0 else n+3
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 10}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.675, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.75, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 4.375}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-clamp8-45c5ed2a001b
coding
code_generation
beginner
Implement `clamp8`: Clamp n into [0, 8]. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def clamp8(n):\n return 0 if n<0 else 8 if n>8 else n\n", "test_solution.py": "import unittest\nfrom solution import clamp8\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(clamp8(-2), 0)\n def test_1(self):\n s...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def clamp8(n): return 0 if n<0 else 8 if n>8 else n
def clamp8(n): return 0 if n<0 else 8 if n>8 else n
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 14}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.875, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 3.8000000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-ones-mod-a3bd8b598f6a
coding
code_generation
beginner
Implement `ones_mod`: Return n % 9, with 0 mapping to 0 (digital-root step). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def ones_mod(n):\n return n % 9\n", "test_solution.py": "import unittest\nfrom solution import ones_mod\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(ones_mod(0), 0)\n def test_1(self):\n self.assertEqual(one...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def ones_mod(n): return n % 9
def ones_mod(n): return n % 9
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 20}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 1.175, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.125, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 4.375}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "mi...
or-coding-py-micro-is-sq-a8367c9627a4
coding
code_generation
intermediate
Implement `is_sq`: Return True iff n is a perfect square (n>=0). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def is_sq(n):\n if n<0:\n return False\n r=int(n**0.5)\n return r*r==n\n", "test_solution.py": "import unittest\nfrom solution import is_sq\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(is_sq(-1), False)\n...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def is_sq(n): if n<0: return False r=int(n**0.5) return r*r==n
def is_sq(n): if n<0: return False r=int(n**0.5) return r*r==n
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 19}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 1.2, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.75, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 4.975}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-debug-micro-is-sq-651eb06fd9b4
coding
debugging
expert
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `is_sq`: Return True iff n is a perfect square (n>=0). Use only the Python standard library. --- solution.py (buggy) --- def is_sq(n): if n<0: return True r=int(n**0.5) return r*r==n --- ...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 19, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_0 (test_solution.Test.test_0) ... FAIL\ntest_1 (test_solution.Test.test_1) ... ok\ntest_10 (test_solution.Test.test_10) ... ok\ntest_11 (test_solution...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def is_sq(n): if n<0: return False r=int(n**0.5) return r*r==n
def is_sq(n): if n<0: return False r=int(n**0.5) return r*r==n
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 19}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 1.2, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 11.5}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"err...
or-coding-py-micro-next-even-20a6a715b190
coding
code_generation
beginner
Implement `next_even`: Smallest even integer >= n. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def next_even(n):\n return n if n%2==0 else n+1\n", "test_solution.py": "import unittest\nfrom solution import next_even\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(next_even(-3), -2)\n def test_1(self):\n ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def next_even(n): return n if n%2==0 else n+1
def next_even(n): return n if n%2==0 else n+1
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 11}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.725, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 3.9000000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0",...
or-coding-py-micro-collatz-step-8ab9e140b6af
coding
code_generation
intermediate
Implement `collatz_step`: One Collatz step: n/2 if even else 3n+1, for positive n. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def collatz_step(n):\n return n//2 if n%2==0 else 3*n+1\n", "test_solution.py": "import unittest\nfrom solution import collatz_step\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(collatz_step(1), 4)\n def test_1(self...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def collatz_step(n): return n//2 if n%2==0 else 3*n+1
def collatz_step(n): return n//2 if n%2==0 else 3*n+1
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 15}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.925, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 5.25}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-popcount-ff83f628f559
coding
code_generation
intermediate
Implement `popcount`: Number of 1-bits in the absolute value of n. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def popcount(n):\n return bin(abs(n)).count('1')\n", "test_solution.py": "import unittest\nfrom solution import popcount\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(popcount(-8), 1)\n def test_1(self):\n se...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def popcount(n): return bin(abs(n)).count('1')
def popcount(n): return bin(abs(n)).count('1')
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 25}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 1.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.125, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 4.575}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "mi...
or-coding-py-micro-rev-digits-039714a11dae
coding
code_generation
beginner
Implement `rev_digits`: Integer obtained by reversing decimal digits of |n|, keeping sign. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def rev_digits(n):\n s=int(str(abs(n))[::-1])\n return -s if n<0 else s\n", "test_solution.py": "import unittest\nfrom solution import rev_digits\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(rev_digits(-120), -21)\...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def rev_digits(n): s=int(str(abs(n))[::-1]) return -s if n<0 else s
def rev_digits(n): s=int(str(abs(n))[::-1]) return -s if n<0 else s
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 7}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.55, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 4.1000000000000005}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "s...
or-coding-py-micro-sum-digits-844fe7dd7d4b
coding
code_generation
beginner
Implement `sum_digits`: Sum of decimal digits of |n|. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def sum_digits(n):\n return sum(int(c) for c in str(abs(n)))\n", "test_solution.py": "import unittest\nfrom solution import sum_digits\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(sum_digits(0), 0)\n def test_1(sel...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def sum_digits(n): return sum(int(c) for c in str(abs(n)))
def sum_digits(n): return sum(int(c) for c in str(abs(n)))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 6}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.475, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.4250000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "...
or-coding-py-micro-mid3-64a78f8aad58
coding
code_generation
beginner
Implement `mid3`: Median of three integers a,b,c. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def mid3(a,b,c):\n return sorted([a,b,c])[1]\n", "test_solution.py": "import unittest\nfrom solution import mid3\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(mid3(1, 2, 3), 2)\n def test_1(self):\n self.asse...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def mid3(a,b,c): return sorted([a,b,c])[1]
def mid3(a,b,c): return sorted([a,b,c])[1]
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 3.35}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-gcd3-612aab1c5039
coding
code_generation
beginner
Implement `gcd3`: gcd of three integers. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "import math\ndef gcd3(a,b,c):\n return math.gcd(math.gcd(a,b),c)\n", "test_solution.py": "import unittest\nfrom solution import gcd3\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(gcd3(12, 18, 30), 6)\n def test_1(se...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
import math def gcd3(a,b,c): return math.gcd(math.gcd(a,b),c)
import math def gcd3(a,b,c): return math.gcd(math.gcd(a,b),c)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.3, "tests": 0.0, "total": 3.3}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_gcd3...
or-coding-py-micro-powmod-4af1cf8e1eaf
coding
code_generation
beginner
Implement `powmod`: Compute pow(a,b,m) for m>0, b>=0. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def powmod(a,b,m):\n return pow(a,b,m)\n", "test_solution.py": "import unittest\nfrom solution import powmod\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(powmod(2, 10, 1000), 24)\n def test_1(self):\n self.a...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def powmod(a,b,m): return pow(a,b,m)
def powmod(a,b,m): return pow(a,b,m)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 3.3000000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-ceil-div-67918f67e89c
coding
code_generation
intermediate
Implement `ceil_div`: Ceiling of a/b for positive b. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def ceil_div(a,b):\n return -(-a//b)\n", "test_solution.py": "import unittest\nfrom solution import ceil_div\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(ceil_div(10, 3), 4)\n def test_1(self):\n self.assert...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def ceil_div(a,b): return -(-a//b)
def ceil_div(a,b): return -(-a//b)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.125, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 4.5}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-bit-rev8-189524cf3190
coding
code_generation
beginner
Implement `bit_rev8`: Reverse the low 8 bits of n (ignore higher bits). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def bit_rev8(n):\n x=n & 255\n y=0\n for _ in range(8):\n y=(y<<1)|(x&1)\n x>>=1\n return y\n", "test_solution.py": "import unittest\nfrom solution import bit_rev8\nclass Test(unittest.TestCase):\n def test_0(self):\n se...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def bit_rev8(n): x=n & 255 y=0 for _ in range(8): y=(y<<1)|(x&1) x>>=1 return y
def bit_rev8(n): x=n & 255 y=0 for _ in range(8): y=(y<<1)|(x&1) x>>=1 return y
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 7}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.65, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 3.7}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_bi...
or-coding-py-micro-sgn-6d4a8e19d5e2
coding
code_generation
beginner
Implement `sgn`: Return -1, 0, or 1 as the sign of n. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def sgn(n):\n return (n>0)-(n<0)\n", "test_solution.py": "import unittest\nfrom solution import sgn\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(sgn(-3), -1)\n def test_1(self):\n self.assertEqual(sgn(-2), -...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def sgn(n): return (n>0)-(n<0)
def sgn(n): return (n>0)-(n<0)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 7}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:05Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.525, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 3.95}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-vowels-8f84c53f5d9d
coding
code_generation
beginner
Implement `vowels`: Count vowels aeiou in s, case-insensitive. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def vowels(s):\n return sum(ch.lower() in 'aeiou' for ch in s)\n", "test_solution.py": "import unittest\nfrom solution import vowels\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(vowels(''), 0)\n def test_1(self):\n...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def vowels(s): return sum(ch.lower() in 'aeiou' for ch in s)
def vowels(s): return sum(ch.lower() in 'aeiou' for ch in s)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.125, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.5}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-snake-497aac12f27b
coding
code_generation
intermediate
Implement `snake`: Convert CamelCase or spaces to snake_case keeping alphanumerics. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "import re\ndef snake(s):\n s=re.sub(r'([a-z])([A-Z])', r'\\1_\\2', s)\n s=re.sub(r'[^A-Za-z0-9]+', '_', s)\n return re.sub(r'_+', '_', s).strip('_').lower()\n", "test_solution.py": "import unittest\nfrom solution import snake\nclass Test(unittest....
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
import re def snake(s): s=re.sub(r'([a-z])([A-Z])', r'\1_\2', s) s=re.sub(r'[^A-Za-z0-9]+', '_', s) return re.sub(r'_+', '_', s).strip('_').lower()
import re def snake(s): s=re.sub(r'([a-z])([A-Z])', r'\1_\2', s) s=re.sub(r'[^A-Za-z0-9]+', '_', s) return re.sub(r'_+', '_', s).strip('_').lower()
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.45, "constraints": 1.4, "keywords": 0.0, "math_ops": 2.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.4, "tests": 0.0, "total": 5.45}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_sn...
or-coding-py-micro-runlen-7441c90c0d8f
coding
code_generation
beginner
Implement `runlen`: Run-length encode a string as list of (char, count) pairs. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def runlen(s):\n if not s:\n return []\n out=[]; last=s[0]; n=1\n for ch in s[1:]:\n if ch==last:\n n+=1\n else:\n out.append((last,n)); last=ch; n=1\n out.append((last,n))\n return out\n", "test_so...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def runlen(s): if not s: return [] out=[]; last=s[0]; n=1 for ch in s[1:]: if ch==last: n+=1 else: out.append((last,n)); last=ch; n=1 out.append((last,n)) return out
def runlen(s): if not s: return [] out=[]; last=s[0]; n=1 for ch in s[1:]: if ch==last: n+=1 else: out.append((last,n)); last=ch; n=1 out.append((last,n)) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.6, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 4.025}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-is-anagram-4c6ccdee2702
coding
code_generation
beginner
Implement `is_anagram`: True iff a and b are anagrams ignoring spaces and case. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def is_anagram(a,b):\n def n(x): return sorted(ch.lower() for ch in x if not ch.isspace())\n return n(a)==n(b)\n", "test_solution.py": "import unittest\nfrom solution import is_anagram\nclass Test(unittest.TestCase):\n def test_0(self):\n s...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def is_anagram(a,b): def n(x): return sorted(ch.lower() for ch in x if not ch.isspace()) return n(a)==n(b)
def is_anagram(a,b): def n(x): return sorted(ch.lower() for ch in x if not ch.isspace()) return n(a)==n(b)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 3.475}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_...
or-coding-py-micro-titlecase-min-f3b5aec7d594
coding
code_generation
beginner
Implement `titlecase_min`: Title-case words, leaving words of length 1-2 lower except the first. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def titlecase_min(s):\n parts=s.split(' ')\n out=[]\n for i,w in enumerate(parts):\n if not w:\n out.append(w); continue\n if i>0 and len(w)<=2:\n out.append(w.lower())\n else:\n out.append(w[:...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def titlecase_min(s): parts=s.split(' ') out=[] for i,w in enumerate(parts): if not w: out.append(w); continue if i>0 and len(w)<=2: out.append(w.lower()) else: out.append(w[:1].upper()+w[1:].lower()) return ' '.join(out)
def titlecase_min(s): parts=s.split(' ') out=[] for i,w in enumerate(parts): if not w: out.append(w); continue if i>0 and len(w)<=2: out.append(w.lower()) else: out.append(w[:1].upper()+w[1:].lower()) return ' '.join(out)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.55, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 4.125}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-strip-html-5c0600ed5fb1
coding
code_generation
beginner
Implement `strip_html`: Remove <...> tags; do not parse attributes specially. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def strip_html(s):\n out=[]; i=0\n while i<len(s):\n if s[i]=='<':\n j=s.find('>', i)\n if j==-1:\n break\n i=j+1\n else:\n out.append(s[i]); i+=1\n return ''.join(out)\n", "...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def strip_html(s): out=[]; i=0 while i<len(s): if s[i]=='<': j=s.find('>', i) if j==-1: break i=j+1 else: out.append(s[i]); i+=1 return ''.join(out)
def strip_html(s): out=[]; i=0 while i<len(s): if s[i]=='<': j=s.find('>', i) if j==-1: break i=j+1 else: out.append(s[i]); i+=1 return ''.join(out)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.55, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.75, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.4, "tests": 0.0, "total": 4.3}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_st...
or-coding-py-micro-csv-escape-a5bdff54c3bf
coding
code_generation
beginner
Implement `csv_escape`: Escape a field for CSV: wrap in quotes if it contains comma, quote, or newline; double quotes. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def csv_escape(s):\n if any(ch in s for ch in ',\\n\"'):\n return '\"'+s.replace('\"','\"\"')+'\"'\n return s\n", "test_solution.py": "import unittest\nfrom solution import csv_escape\nclass Test(unittest.TestCase):\n def test_0(self):\n ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def csv_escape(s): if any(ch in s for ch in ',\n"'): return '"'+s.replace('"','""')+'"' return s
def csv_escape(s): if any(ch in s for ch in ',\n"'): return '"'+s.replace('"','""')+'"' return s
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.625, "tests": 0.0, "total": 4.15}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-prefix-fun-584f3471efc1
coding
code_generation
beginner
Implement `prefix_fun`: Longest common prefix of a list of strings; '' if empty list. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def prefix_fun(xs):\n if not xs:\n return ''\n p=xs[0]\n for s in xs[1:]:\n i=0\n while i<len(p) and i<len(s) and p[i]==s[i]:\n i+=1\n p=p[:i]\n if not p:\n return ''\n return p\n", "test...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def prefix_fun(xs): if not xs: return '' p=xs[0] for s in xs[1:]: i=0 while i<len(p) and i<len(s) and p[i]==s[i]: i+=1 p=p[:i] if not p: return '' return p
def prefix_fun(xs): if not xs: return '' p=xs[0] for s in xs[1:]: i=0 while i<len(p) and i<len(s) and p[i]==s[i]: i+=1 p=p[:i] if not p: return '' return p
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.loops
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.625, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.5, "tests": 0.0, "total": 3.975}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-wrap-at-57bf7a6c83b5
coding
code_generation
intermediate
Implement `wrap_at`: Word-wrap s at width w without breaking words; words longer than w stay on their own line. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def wrap_at(s,w):\n words=s.split()\n lines=[]; cur=''\n for word in words:\n if not cur:\n cur=word\n elif len(cur)+1+len(word)<=w:\n cur+=' '+word\n else:\n lines.append(cur); cur=word\n i...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def wrap_at(s,w): words=s.split() lines=[]; cur='' for word in words: if not cur: cur=word elif len(cur)+1+len(word)<=w: cur+=' '+word else: lines.append(cur); cur=word if cur: lines.append(cur) return lines
def wrap_at(s,w): words=s.split() lines=[]; cur='' for word in words: if not cur: cur=word elif len(cur)+1+len(word)<=w: cur+=' '+word else: lines.append(cur); cur=word if cur: lines.append(cur) return lines
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.6, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.125, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.625, "tests": 0.0, "total": 4.95}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-kebab-be55c2bbcda4
coding
code_generation
intermediate
Implement `kebab`: Lowercase kebab-case from a phrase. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "import re\ndef kebab(s):\n s=re.sub(r'[^A-Za-z0-9]+','-',s)\n return s.strip('-').lower()\n", "test_solution.py": "import unittest\nfrom solution import kebab\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(kebab('Ope...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
import re def kebab(s): s=re.sub(r'[^A-Za-z0-9]+','-',s) return s.strip('-').lower()
import re def kebab(s): s=re.sub(r'[^A-Za-z0-9]+','-',s) return s.strip('-').lower()
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.875, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 5.175000000000001}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0",...
or-coding-py-micro-moving-avg-8dbbb0841d42
coding
code_generation
intermediate
Implement `moving_avg`: Simple moving average of window k; skip if k<1. Return list of floats. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def moving_avg(xs,k):\n if k<1:\n raise ValueError('k')\n return [sum(xs[i:i+k])/k for i in range(0, len(xs)-k+1)]\n", "test_solution.py": "import unittest\nfrom solution import moving_avg\nclass Test(unittest.TestCase):\n def test_0(self):...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def moving_avg(xs,k): if k<1: raise ValueError('k') return [sum(xs[i:i+k])/k for i in range(0, len(xs)-k+1)]
def moving_avg(xs,k): if k<1: raise ValueError('k') return [sum(xs[i:i+k])/k for i in range(0, len(xs)-k+1)]
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.525, "tests": 0.0, "total": 4.5}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_...
or-coding-py-micro-dedupe-keep-7f88f8ffae72
coding
code_generation
beginner
Implement `dedupe_keep`: Dedupe a list keeping first occurrence. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def dedupe_keep(xs):\n seen=set(); out=[]\n for x in xs:\n if x in seen:\n continue\n seen.add(x); out.append(x)\n return out\n", "test_solution.py": "import unittest\nfrom solution import dedupe_keep\nclass Test(unittest....
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def dedupe_keep(xs): seen=set(); out=[] for x in xs: if x in seen: continue seen.add(x); out.append(x) return out
def dedupe_keep(xs): seen=set(); out=[] for x in xs: if x in seen: continue seen.add(x); out.append(x) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.45, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.4000000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "s...
or-coding-py-micro-chunk2-527768418ca2
coding
code_generation
beginner
Implement `chunk2`: Pairs of consecutive items; drop a trailing leftover. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def chunk2(xs):\n return [(xs[i],xs[i+1]) for i in range(0,len(xs)-1,2)]\n", "test_solution.py": "import unittest\nfrom solution import chunk2\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(chunk2([1, 2, 3, 4]), [(1, 2)...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def chunk2(xs): return [(xs[i],xs[i+1]) for i in range(0,len(xs)-1,2)]
def chunk2(xs): return [(xs[i],xs[i+1]) for i in range(0,len(xs)-1,2)]
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.4, "tests": 0.0, "total": 3.825}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_...
or-coding-py-micro-argmin-38140fa56385
coding
code_generation
beginner
Implement `argmin`: Index of the first minimum, or -1 if empty. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def argmin(xs):\n if not xs:\n return -1\n m=min(xs)\n return xs.index(m)\n", "test_solution.py": "import unittest\nfrom solution import argmin\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(argmin([3, 1, 1...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def argmin(xs): if not xs: return -1 m=min(xs) return xs.index(m)
def argmin(xs): if not xs: return -1 m=min(xs) return xs.index(m)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.45, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 3.85}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-prefix-sums-2d43b8899c2b
coding
code_generation
beginner
Implement `prefix_sums`: Inclusive prefix sums. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def prefix_sums(xs):\n out=[]; t=0\n for x in xs:\n t+=x; out.append(t)\n return out\n", "test_solution.py": "import unittest\nfrom solution import prefix_sums\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def prefix_sums(xs): out=[]; t=0 for x in xs: t+=x; out.append(t) return out
def prefix_sums(xs): out=[]; t=0 for x in xs: t+=x; out.append(t) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.275, "tests": 0.0, "total": 3.525}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-rotate-left-ffc4f1b18f42
coding
code_generation
beginner
Implement `rotate_left`: Rotate list xs left by k (k may exceed len). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def rotate_left(xs,k):\n if not xs:\n return []\n k%=len(xs)\n return xs[k:]+xs[:k]\n", "test_solution.py": "import unittest\nfrom solution import rotate_left\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def rotate_left(xs,k): if not xs: return [] k%=len(xs) return xs[k:]+xs[:k]
def rotate_left(xs,k): if not xs: return [] k%=len(xs) return xs[k:]+xs[:k]
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.45, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 3.7500000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "...
or-coding-py-micro-matrix-trace-9a10cd642634
coding
code_generation
beginner
Implement `matrix_trace`: Trace of a square list-of-lists; raise ValueError if not square. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def matrix_trace(m):\n n=len(m)\n if any(len(row)!=n for row in m):\n raise ValueError('shape')\n return sum(m[i][i] for i in range(n))\n", "test_solution.py": "import unittest\nfrom solution import matrix_trace\nclass Test(unittest.TestCas...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def matrix_trace(m): n=len(m) if any(len(row)!=n for row in m): raise ValueError('shape') return sum(m[i][i] for i in range(n))
def matrix_trace(m): n=len(m) if any(len(row)!=n for row in m): raise ValueError('shape') return sum(m[i][i] for i in range(n))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:06Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.625, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 4.075}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-flatten1-efc7ec425c49
coding
code_generation
beginner
Implement `flatten1`: Flatten one level of lists. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def flatten1(xs):\n out=[]\n for x in xs:\n if isinstance(x,list):\n out.extend(x)\n else:\n out.append(x)\n return out\n", "test_solution.py": "import unittest\nfrom solution import flatten1\nclass Test(unittes...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def flatten1(xs): out=[] for x in xs: if isinstance(x,list): out.extend(x) else: out.append(x) return out
def flatten1(xs): out=[] for x in xs: if isinstance(x,list): out.extend(x) else: out.append(x) return out
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.475, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 3.4000000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-count-ranges-3f976b03d520
coding
code_generation
beginner
Implement `count_ranges`: Count how many numbers in xs lie in [lo, hi] inclusive. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def count_ranges(xs,lo,hi):\n return sum(lo<=x<=hi for x in xs)\n", "test_solution.py": "import unittest\nfrom solution import count_ranges\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(count_ranges([1, 2, 3, 10], 2, 9...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def count_ranges(xs,lo,hi): return sum(lo<=x<=hi for x in xs)
def count_ranges(xs,lo,hi): return sum(lo<=x<=hi for x in xs)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 3.4000000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-is-sorted-ad3a9050dba1
coding
code_generation
beginner
Implement `is_sorted`: Non-decreasing check. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def is_sorted(xs):\n return all(xs[i]<=xs[i+1] for i in range(len(xs)-1))\n", "test_solution.py": "import unittest\nfrom solution import is_sorted\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(is_sorted([1, 2, 2, 3]), ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def is_sorted(xs): return all(xs[i]<=xs[i+1] for i in range(len(xs)-1))
def is_sorted(xs): return all(xs[i]<=xs[i+1] for i in range(len(xs)-1))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.625, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.25, "tests": 0.0, "total": 3.85}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-fib-9ad76b773076
coding
code_generation
beginner
Implement `fib`: nth Fibonacci with F(0)=0, F(1)=1. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def fib(n):\n a,b=0,1\n for _ in range(n):\n a,b=b,a+b\n return a\n", "test_solution.py": "import unittest\nfrom solution import fib\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(fib(0), 0)\n def test_1...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def fib(n): a,b=0,1 for _ in range(n): a,b=b,a+b return a
def fib(n): a,b=0,1 for _ in range(n): a,b=b,a+b return a
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 12}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.85, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 4.025}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-fact-d07b10a70df0
coding
code_generation
beginner
Implement `fact`: n! for n>=0. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def fact(n):\n r=1\n for i in range(2,n+1):\n r*=i\n return r\n", "test_solution.py": "import unittest\nfrom solution import fact\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(fact(0), 1)\n def test_1(s...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def fact(n): r=1 for i in range(2,n+1): r*=i return r
def fact(n): r=1 for i in range(2,n+1): r*=i return r
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 9}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.7, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.275, "tests": 0.0, "total": 4.075}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_...
or-coding-py-micro-is-prime-bdf982c6369c
coding
code_generation
intermediate
Implement `is_prime`: True iff n is prime. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def is_prime(n):\n if n<2: return False\n d=2\n while d*d<=n:\n if n%d==0: return False\n d+=1\n return True\n", "test_solution.py": "import unittest\nfrom solution import is_prime\nclass Test(unittest.TestCase):\n def test_0(s...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def is_prime(n): if n<2: return False d=2 while d*d<=n: if n%d==0: return False d+=1 return True
def is_prime(n): if n<2: return False d=2 while d*d<=n: if n%d==0: return False d+=1 return True
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 20}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 1.3, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 4.7250000000000005}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "s...
or-coding-py-debug-micro-is-prime-987bf64405d6
coding
debugging
expert
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `is_prime`: True iff n is prime. Use only the Python standard library. --- solution.py (buggy) --- def is_prime(n): if n<2: return False d=2 while d*d<=n: if n%d==0: return False d+=1 re...
{"failure": {"command": "python harness.py", "output": "est_19) ... FAIL\ntest_2 (test_solution.Test.test_2) ... FAIL\ntest_3 (test_solution.Test.test_3) ... FAIL\ntest_4 (test_solution.Test.test_4) ... ok\ntest_5 (test_solution.Test.test_5) ... FAIL\ntest_6 (test_solution.Test.test_6) ... ok\ntest_7 (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def is_prime(n): if n<2: return False d=2 while d*d<=n: if n%d==0: return False d+=1 return True
def is_prime(n): if n<2: return False d=2 while d*d<=n: if n%d==0: return False d+=1 return True
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 20}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 1.3, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 11.6}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"err...
or-coding-py-micro-n-primes-2ddac0083192
coding
code_generation
beginner
Implement `n_primes`: Count primes in 1..n inclusive. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def n_primes(n):\n def p(x):\n if x<2: return False\n d=2\n while d*d<=x:\n if x%d==0: return False\n d+=1\n return True\n return sum(p(i) for i in range(1,n+1))\n", "test_solution.py": "import unitte...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def n_primes(n): def p(x): if x<2: return False d=2 while d*d<=x: if x%d==0: return False d+=1 return True return sum(p(i) for i in range(1,n+1))
def n_primes(n): def p(x): if x<2: return False d=2 while d*d<=x: if x%d==0: return False d+=1 return True return sum(p(i) for i in range(1,n+1))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 6}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.loops
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.65, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.75, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 4.325}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-debug-micro-n-primes-fb2b33ea4a28
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `n_primes`: Count primes in 1..n inclusive. Use only the Python standard library. --- solution.py (buggy) --- def n_primes(n): def p(x): if x<2: return False d=2 while d*d<=x: if x%d==0: ...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 6, \"failures\": 4, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_0 (test_solution.Test.test_0) ... ok\ntest_1 (test_solution.Test.test_1) ... ok\ntest_2 (test_solution.Test.test_2) ... FAIL\ntest_3 (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def n_primes(n): def p(x): if x<2: return False d=2 while d*d<=x: if x%d==0: return False d+=1 return True return sum(p(i) for i in range(1,n+1))
def n_primes(n): def p(x): if x<2: return False d=2 while d*d<=x: if x%d==0: return False d+=1 return True return sum(p(i) for i in range(1,n+1))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 6}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.65, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 10.95}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"e...
or-coding-py-micro-base-conv-d0ef598945ab
coding
code_generation
beginner
Implement `base_conv`: Convert non-negative int n to base b (2..16) as a lowercase string without prefix. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def base_conv(n,b):\n digits='0123456789abcdef'\n if n==0: return '0'\n out=[]\n while n:\n out.append(digits[n%b]); n//=b\n return ''.join(reversed(out))\n", "test_solution.py": "import unittest\nfrom solution import base_conv\nclass...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def base_conv(n,b): digits='0123456789abcdef' if n==0: return '0' out=[] while n: out.append(digits[n%b]); n//=b return ''.join(reversed(out))
def base_conv(n,b): digits='0123456789abcdef' if n==0: return '0' out=[] while n: out.append(digits[n%b]); n//=b return ''.join(reversed(out))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.55, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.625, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.55, "tests": 0.0, "total": 4.325}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-parse-int-base-128d8dd8dad2
coding
code_generation
beginner
Implement `parse_int_base`: Parse s in base b (2..16). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def parse_int_base(s,b):\n return int(s,b)\n", "test_solution.py": "import unittest\nfrom solution import parse_int_base\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(parse_int_base('1010', 2), 10)\n def test_1(self...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def parse_int_base(s,b): return int(s,b)
def parse_int_base(s,b): return int(s,b)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.325}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-hamming-a3f2e9a99dd4
coding
code_generation
beginner
Implement `hamming`: Hamming distance of two equal-length strings; ValueError if lengths differ. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def hamming(a,b):\n if len(a)!=len(b): raise ValueError('len')\n return sum(x!=y for x,y in zip(a,b))\n", "test_solution.py": "import unittest\nfrom solution import hamming\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEq...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def hamming(a,b): if len(a)!=len(b): raise ValueError('len') return sum(x!=y for x,y in zip(a,b))
def hamming(a,b): if len(a)!=len(b): raise ValueError('len') return sum(x!=y for x,y in zip(a,b))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.35, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.125, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 3.5250000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-lev-one-39be00e33470
coding
code_generation
intermediate
Implement `lev_one`: True iff Levenshtein distance of a,b is at most 1. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def lev_one(a,b):\n if abs(len(a)-len(b))>1: return False\n if len(a)==len(b):\n return sum(x!=y for x,y in zip(a,b))<=1\n if len(a)>len(b): a,b=b,a\n i=j=diff=0\n while i<len(a) and j<len(b):\n if a[i]==b[j]:\n i+=1...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def lev_one(a,b): if abs(len(a)-len(b))>1: return False if len(a)==len(b): return sum(x!=y for x,y in zip(a,b))<=1 if len(a)>len(b): a,b=b,a i=j=diff=0 while i<len(a) and j<len(b): if a[i]==b[j]: i+=1; j+=1 else: diff+=1; j+=1 if diff>1: return False return True
def lev_one(a,b): if abs(len(a)-len(b))>1: return False if len(a)==len(b): return sum(x!=y for x,y in zip(a,b))<=1 if len(a)>len(b): a,b=b,a i=j=diff=0 while i<len(a) and j<len(b): if a[i]==b[j]: i+=1; j+=1 else: diff+=1; j+=1 if diff>1: return False return True
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.7, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 5.0}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_le...
or-coding-py-debug-micro-lev-one-b93f43220e70
coding
debugging
expert
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `lev_one`: True iff Levenshtein distance of a,b is at most 1. Use only the Python standard library. --- solution.py (buggy) --- def lev_one(a,b): if abs(len(a)-len(b))>1: return False if len...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 5, \"failures\": 2, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_0 (test_solution.Test.test_0) ... ok\ntest_1 (test_solution.Test.test_1) ... FAIL\ntest_2 (test_solution.Test.test_2) ... ok\ntest_3 (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def lev_one(a,b): if abs(len(a)-len(b))>1: return False if len(a)==len(b): return sum(x!=y for x,y in zip(a,b))<=1 if len(a)>len(b): a,b=b,a i=j=diff=0 while i<len(a) and j<len(b): if a[i]==b[j]: i+=1; j+=1 else: diff+=1; j+=1 if diff>1: return False return True
def lev_one(a,b): if abs(len(a)-len(b))>1: return False if len(a)==len(b): return sum(x!=y for x,y in zip(a,b))<=1 if len(a)>len(b): a,b=b,a i=j=diff=0 while i<len(a) and j<len(b): if a[i]==b[j]: i+=1; j+=1 else: diff+=1; j+=1 if diff>1: return False return True
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.7, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 11.0}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"err...
or-coding-py-micro-balanced-html-60efbcecda66
coding
code_generation
intermediate
Implement `balanced_html`: True iff every <tag> is closed by </tag> with a stack, tags [a-z]+ only, no attributes. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "import re\ndef balanced_html(s):\n stack=[]; i=0\n while i<len(s):\n if s.startswith('</',i):\n m=re.match(r'</([a-z]+)>', s[i:])\n if not m or not stack or stack[-1]!=m.group(1): return False\n stack.pop(); i+...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
import re def balanced_html(s): stack=[]; i=0 while i<len(s): if s.startswith('</',i): m=re.match(r'</([a-z]+)>', s[i:]) if not m or not stack or stack[-1]!=m.group(1): return False stack.pop(); i+=m.end() elif s[i]=='<': m=re.match(r'<([a-z]+)>', s[i:]) if not m: return False stack.append(m.group(1)); i+=m.e...
import re def balanced_html(s): stack=[]; i=0 while i<len(s): if s.startswith('</',i): m=re.match(r'</([a-z]+)>', s[i:]) if not m or not stack or stack[-1]!=m.group(1): return False stack.pop(); i+=m.end() elif s[i]=='<': m=re.match(r'<([a-z]+)>', s[i:]) if not m: return False stack.append(m.group(1)); i+=m.e...
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.75, "constraints": 1.4, "keywords": 0.0, "math_ops": 2.875, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.6, "tests": 0.0, "total": 6.825}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-debug-micro-balanced-html-5fd17ecaf8c0
coding
debugging
expert
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `balanced_html`: True iff every <tag> is closed by </tag> with a stack, tags [a-z]+ only, no attributes. Use only the Python standard library. --- solution.py (buggy) --- import re def balance...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 5, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_0 (test_solution.Test.test_0) ... ok\ntest_1 (test_solution.Test.test_1) ... ok\ntest_2 (test_solution.Test.test_2) ... FAIL\ntest_3 (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
import re def balanced_html(s): stack=[]; i=0 while i<len(s): if s.startswith('</',i): m=re.match(r'</([a-z]+)>', s[i:]) if not m or not stack or stack[-1]!=m.group(1): return False stack.pop(); i+=m.end() elif s[i]=='<': m=re.match(r'<([a-z]+)>', s[i:]) if not m: return False stack.append(m.group(1)); i+=m.e...
import re def balanced_html(s): stack=[]; i=0 while i<len(s): if s.startswith('</',i): m=re.match(r'</([a-z]+)>', s[i:]) if not m or not stack or stack[-1]!=m.group(1): return False stack.pop(); i+=m.end() elif s[i]=='<': m=re.match(r'<([a-z]+)>', s[i:]) if not m: return False stack.append(m.group(1)); i+=m.e...
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:07Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.75, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 11.05}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {"e...
or-coding-py-micro-path-join-83e6dd97f607
coding
code_generation
intermediate
Implement `path_join`: Join POSIX-like fragments, collapsing duplicate slashes but not resolving '..' . Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def path_join(parts):\n s='/'.join(parts)\n while '//' in s:\n s=s.replace('//','/')\n return s\n", "test_solution.py": "import unittest\nfrom solution import path_join\nclass Test(unittest.TestCase):\n def test_0(self):\n self.as...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def path_join(parts): s='/'.join(parts) while '//' in s: s=s.replace('//','/') return s
def path_join(parts): s='/'.join(parts) while '//' in s: s=s.replace('//','/') return s
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.625, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 5.1}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_...
or-coding-py-micro-ext-of-2df52f5bef1c
coding
code_generation
beginner
Implement `ext_of`: File extension including the dot, or '' if none. Basename only. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def ext_of(name):\n i=name.rfind('.')\n if i<=0: return ''\n return name[i:]\n", "test_solution.py": "import unittest\nfrom solution import ext_of\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(ext_of('a.py'), '.p...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def ext_of(name): i=name.rfind('.') if i<=0: return '' return name[i:]
def ext_of(name): i=name.rfind('.') if i<=0: return '' return name[i:]
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.475, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 3.5500000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-relpath-dots-befbe1d038d2
coding
code_generation
beginner
Implement `relpath_dots`: Count leading '../' segments in a relative path string. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def relpath_dots(p):\n n=0\n while p.startswith('../'):\n n+=1; p=p[3:]\n return n\n", "test_solution.py": "import unittest\nfrom solution import relpath_dots\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def relpath_dots(p): n=0 while p.startswith('../'): n+=1; p=p[3:] return n
def relpath_dots(p): n=0 while p.startswith('../'): n+=1; p=p[3:] return n
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.45, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.625, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 4.1}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-semver-major-9110b9a9d494
coding
code_generation
beginner
Implement `semver_major`: Integer major version from 'X.Y.Z' (digits). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def semver_major(s):\n return int(s.split('.')[0])\n", "test_solution.py": "import unittest\nfrom solution import semver_major\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(semver_major('1.2.3'), 1)\n def test_1(sel...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def semver_major(s): return int(s.split('.')[0])
def semver_major(s): return int(s.split('.')[0])
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.2750000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "...
or-coding-py-micro-iso-week-simple-9c9071e03a05
coding
code_generation
beginner
Implement `iso_week_simple`: Map YYYY-MM-DD to (year, month, day) ints without validation. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def iso_week_simple(s):\n y,m,d=s.split('-')\n return int(y),int(m),int(d)\n", "test_solution.py": "import unittest\nfrom solution import iso_week_simple\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(iso_week_simple...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def iso_week_simple(s): y,m,d=s.split('-') return int(y),int(m),int(d)
def iso_week_simple(s): y,m,d=s.split('-') return int(y),int(m),int(d)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 2}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.3, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 3.8249999999999997}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "s...
or-coding-py-micro-bytes-human-73057e6e1ac3
coding
code_generation
intermediate
Implement `bytes_human`: Format n bytes as integer unit: B, KiB, MiB, GiB using 1024, one decimal if unit!=B. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def bytes_human(n):\n units=['B','KiB','MiB','GiB']\n f=float(n); i=0\n while f>=1024 and i<len(units)-1:\n f/=1024; i+=1\n if i==0: return f'{int(f)}B'\n return f'{f:.1f}{units[i]}'\n", "test_solution.py": "import unittest\nfrom solu...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def bytes_human(n): units=['B','KiB','MiB','GiB'] f=float(n); i=0 while f>=1024 and i<len(units)-1: f/=1024; i+=1 if i==0: return f'{int(f)}B' return f'{f:.1f}{units[i]}'
def bytes_human(n): units=['B','KiB','MiB','GiB'] f=float(n); i=0 while f>=1024 and i<len(units)-1: f/=1024; i+=1 if i==0: return f'{int(f)}B' return f'{f:.1f}{units[i]}'
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 5}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.loops
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.55, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.75, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.6, "tests": 0.0, "total": 4.5}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_by...
or-coding-py-micro-slug-n-299b58f8299e
coding
code_generation
intermediate
Implement `slug_n`: Keep [a-z0-9]+ lowercase tokens joined by hyphen. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "import re\ndef slug_n(s):\n toks=re.findall(r'[a-z0-9]+', s.lower())\n return '-'.join(toks)\n", "test_solution.py": "import unittest\nfrom solution import slug_n\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(slug_n...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
import re def slug_n(s): toks=re.findall(r'[a-z0-9]+', s.lower()) return '-'.join(toks)
import re def slug_n(s): toks=re.findall(r'[a-z0-9]+', s.lower()) return '-'.join(toks)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.375, "tests": 0.0, "total": 4.725}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "mi...
or-coding-py-micro-mask-email-0fb993d50fa2
coding
code_generation
intermediate
Implement `mask_email`: Replace local part of an email with first char + '***' + domain; if no @ return s. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def mask_email(s):\n if '@' not in s: return s\n local,dom=s.split('@',1)\n if not local: return s\n return local[0]+'***@'+dom\n", "test_solution.py": "import unittest\nfrom solution import mask_email\nclass Test(unittest.TestCase):\n def t...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def mask_email(s): if '@' not in s: return s local,dom=s.split('@',1) if not local: return s return local[0]+'***@'+dom
def mask_email(s): if '@' not in s: return s local,dom=s.split('@',1) if not local: return s return local[0]+'***@'+dom
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.875, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.65, "tests": 0.0, "total": 5.525}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-score-bowling-frame-c6db2ff84c9f
coding
code_generation
beginner
Implement `score_bowling_frame`: Score one bowling frame given two rolls 0-10; if first is 10 ignore second and return 10. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def score_bowling_frame(a,b):\n if a==10: return 10\n return a+b\n", "test_solution.py": "import unittest\nfrom solution import score_bowling_frame\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(score_bowling_frame(1...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def score_bowling_frame(a,b): if a==10: return 10 return a+b
def score_bowling_frame(a,b): if a==10: return 10 return a+b
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.4, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.625, "tests": 0.0, "total": 4.0}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro_...
or-coding-py-micro-grade-pct-47881c884cec
coding
code_generation
beginner
Implement `grade_pct`: Letter from percent: A>=90, B>=80, C>=70, D>=60 else F. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def grade_pct(p):\n if p>=90: return 'A'\n if p>=80: return 'B'\n if p>=70: return 'C'\n if p>=60: return 'D'\n return 'F'\n", "test_solution.py": "import unittest\nfrom solution import grade_pct\nclass Test(unittest.TestCase):\n def test...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def grade_pct(p): if p>=90: return 'A' if p>=80: return 'B' if p>=70: return 'C' if p>=60: return 'D' return 'F'
def grade_pct(p): if p>=90: return 'A' if p>=80: return 'B' if p>=70: return 'C' if p>=60: return 'D' return 'F'
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 7}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.625, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 3.65}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-rle-decode-1d74c7da02e9
coding
code_generation
beginner
Implement `rle_decode`: Decode list of (char,count) to string. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def rle_decode(pairs):\n return ''.join(ch*n for ch,n in pairs)\n", "test_solution.py": "import unittest\nfrom solution import rle_decode\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(rle_decode([('a', 3), ('b', 1)]), ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def rle_decode(pairs): return ''.join(ch*n for ch,n in pairs)
def rle_decode(pairs): return ''.join(ch*n for ch,n in pairs)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.5250000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-set-bits-below-543bbdf502ea
coding
code_generation
beginner
Implement `set_bits_below`: Value with the lowest n bits set, n in 0..16. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def set_bits_below(n):\n return (1<<n)-1\n", "test_solution.py": "import unittest\nfrom solution import set_bits_below\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(set_bits_below(0), 0)\n def test_1(self):\n ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def set_bits_below(n): return (1<<n)-1
def set_bits_below(n): return (1<<n)-1
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 9}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.625, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.45, "tests": 0.0, "total": 3.9250000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-align-up-ecc9bdb6ba8b
coding
code_generation
beginner
Implement `align_up`: Smallest multiple of `align` >= n, align>0. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def align_up(n,align):\n return n if n%align==0 else n+(align-n%align)\n", "test_solution.py": "import unittest\nfrom solution import align_up\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(align_up(0, 8), 0)\n def t...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def align_up(n,align): return n if n%align==0 else n+(align-n%align)
def align_up(n,align): return n if n%align==0 else n+(align-n%align)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.375, "tests": 0.0, "total": 3.85}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-gray-encode-61fa9bfa302b
coding
code_generation
beginner
Implement `gray_encode`: Binary-reflected Gray code of n: n xor (n>>1). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def gray_encode(n):\n return n ^ (n>>1)\n", "test_solution.py": "import unittest\nfrom solution import gray_encode\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(gray_encode(0), 0)\n def test_1(self):\n self.a...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def gray_encode(n): return n ^ (n>>1)
def gray_encode(n): return n ^ (n>>1)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 12}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.775, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.4, "tests": 0.0, "total": 4.15}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-is-pow2-13409319046f
coding
code_generation
beginner
Implement `is_pow2`: True iff n is a power of two (n>0). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def is_pow2(n):\n return n>0 and (n & (n-1))==0\n", "test_solution.py": "import unittest\nfrom solution import is_pow2\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(is_pow2(-1), False)\n def test_1(self):\n s...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def is_pow2(n): return n>0 and (n & (n-1))==0
def is_pow2(n): return n>0 and (n & (n-1))==0
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 18}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_versio...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 1.075, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 4.35}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-clamp-list-b61b8397e69b
coding
code_generation
beginner
Implement `clamp_list`: Clamp each value of xs into [lo,hi]. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def clamp_list(xs,lo,hi):\n return [lo if x<lo else hi if x>hi else x for x in xs]\n", "test_solution.py": "import unittest\nfrom solution import clamp_list\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(clamp_list([0, ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def clamp_list(xs,lo,hi): return [lo if x<lo else hi if x>hi else x for x in xs]
def clamp_list(xs,lo,hi): return [lo if x<lo else hi if x>hi else x for x in xs]
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.375, "tests": 0.0, "total": 3.3000000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-dot-fef839381979
coding
code_generation
beginner
Implement `dot`: Dot product of equal-length lists; ValueError otherwise. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def dot(a,b):\n if len(a)!=len(b): raise ValueError('len')\n return sum(x*y for x,y in zip(a,b))\n", "test_solution.py": "import unittest\nfrom solution import dot\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(dot([...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def dot(a,b): if len(a)!=len(b): raise ValueError('len') return sum(x*y for x,y in zip(a,b))
def dot(a,b): if len(a)!=len(b): raise ValueError('len') return sum(x*y for x,y in zip(a,b))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:08Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.35, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.375, "tests": 0.0, "total": 3.7}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-softmax-argmax-81bb03c4e7ed
coding
code_generation
beginner
Implement `softmax_argmax`: Index of max in xs (first on ties); -1 if empty. (No actual softmax.) Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def softmax_argmax(xs):\n if not xs: return -1\n return max(range(len(xs)), key=lambda i: xs[i])\n", "test_solution.py": "import unittest\nfrom solution import softmax_argmax\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assert...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def softmax_argmax(xs): if not xs: return -1 return max(range(len(xs)), key=lambda i: xs[i])
def softmax_argmax(xs): if not xs: return -1 return max(range(len(xs)), key=lambda i: xs[i])
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.35, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.375, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.55, "tests": 0.0, "total": 3.8750000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-tokenize-ws-a7844a347835
coding
code_generation
beginner
Implement `tokenize_ws`: Split on whitespace and drop empties. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def tokenize_ws(s):\n return s.split()\n", "test_solution.py": "import unittest\nfrom solution import tokenize_ws\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(tokenize_ws('a b\\\\tc'), ['a', 'b\\\\tc'])\n def test...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def tokenize_ws(s): return s.split()
def tokenize_ws(s): return s.split()
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.2750000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "...
or-coding-py-micro-camel-from-snake-2e76ef366cc1
coding
code_generation
beginner
Implement `camel_from_snake`: snake_case to camelCase (first token lower). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def camel_from_snake(s):\n parts=[p for p in s.split('_') if p]\n if not parts: return ''\n return parts[0].lower()+''.join(p[:1].upper()+p[1:] for p in parts[1:])\n", "test_solution.py": "import unittest\nfrom solution import camel_from_snake\ncl...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def camel_from_snake(s): parts=[p for p in s.split('_') if p] if not parts: return '' return parts[0].lower()+''.join(p[:1].upper()+p[1:] for p in parts[1:])
def camel_from_snake(s): parts=[p for p in s.split('_') if p] if not parts: return '' return parts[0].lower()+''.join(p[:1].upper()+p[1:] for p in parts[1:])
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.425, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.35, "tests": 0.0, "total": 3.875}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-micro-unique-sorted-51a882b2ffbb
coding
code_generation
beginner
Implement `unique_sorted`: Sorted unique values of xs. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def unique_sorted(xs):\n return sorted(set(xs))\n", "test_solution.py": "import unittest\nfrom solution import unique_sorted\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(unique_sorted([3, 1, 2, 1]), [1, 2, 3])\n de...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def unique_sorted(xs): return sorted(set(xs))
def unique_sorted(xs): return sorted(set(xs))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.325, "tests": 0.0, "total": 3.2500000000000004}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", ...
or-coding-py-micro-window-product-1691af9e12e6
coding
code_generation
beginner
Implement `window_product`: Maximum product of any contiguous pair; None if len<2. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def window_product(xs):\n if len(xs)<2: return None\n return max(xs[i]*xs[i+1] for i in range(len(xs)-1))\n", "test_solution.py": "import unittest\nfrom solution import window_product\nclass Test(unittest.TestCase):\n def test_0(self):\n se...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def window_product(xs): if len(xs)<2: return None return max(xs[i]*xs[i+1] for i in range(len(xs)-1))
def window_product(xs): if len(xs)<2: return None return max(xs[i]*xs[i+1] for i in range(len(xs)-1))
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.35, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.75, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 4.125}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micr...
or-coding-py-micro-binsearch-exists-838bf9e862b5
coding
code_generation
intermediate
Implement `binsearch_exists`: True iff target is in sorted xs (binary search). Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def binsearch_exists(xs,target):\n lo,hi=0,len(xs)-1\n while lo<=hi:\n mid=(lo+hi)//2\n if xs[mid]==target: return True\n if xs[mid]<target: lo=mid+1\n else: hi=mid-1\n return False\n", "test_solution.py": "import unitt...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def binsearch_exists(xs,target): lo,hi=0,len(xs)-1 while lo<=hi: mid=(lo+hi)//2 if xs[mid]==target: return True if xs[mid]<target: lo=mid+1 else: hi=mid-1 return False
def binsearch_exists(xs,target): lo,hi=0,len(xs)-1 while lo<=hi: mid=(lo+hi)//2 if xs[mid]==target: return True if xs[mid]<target: lo=mid+1 else: hi=mid-1 return False
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.525, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.425, "tests": 0.0, "total": 5.05}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-debug-micro-binsearch-exists-286cba965f55
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `binsearch_exists`: True iff target is in sorted xs (binary search). Use only the Python standard library. --- solution.py (buggy) --- def binsearch_exists(xs,target): lo,hi=0,len(xs)-1 whil...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 4, \"failures\": 2, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_0 (test_solution.Test.test_0) ... FAIL\ntest_1 (test_solution.Test.test_1) ... ok\ntest_2 (test_solution.Test.test_2) ... ok\ntest_3 (test_solution.Tes...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def binsearch_exists(xs,target): lo,hi=0,len(xs)-1 while lo<=hi: mid=(lo+hi)//2 if xs[mid]==target: return True if xs[mid]<target: lo=mid+1 else: hi=mid-1 return False
def binsearch_exists(xs,target): lo,hi=0,len(xs)-1 while lo<=hi: mid=(lo+hi)//2 if xs[mid]==target: return True if xs[mid]<target: lo=mid+1 else: hi=mid-1 return False
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.525, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 10.825}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {...
or-coding-py-micro-queue-ttl-ready-6e406222728a
coding
code_generation
beginner
Implement `queue_ttl_ready`: From list of (t,item) already sorted by t, return items with t<=now. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def queue_ttl_ready(events,now):\n return [item for t,item in events if t<=now]\n", "test_solution.py": "import unittest\nfrom solution import queue_ttl_ready\nclass Test(unittest.TestCase):\n def test_0(self):\n self.assertEqual(queue_ttl_rea...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def queue_ttl_ready(events,now): return [item for t,item in events if t<=now]
def queue_ttl_ready(events,now): return [item for t,item in events if t<=now]
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.325, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.5, "tests": 0.0, "total": 3.4250000000000003}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "s...
or-coding-py-micro-majority-vote-0b16b2110183
coding
code_generation
intermediate
Implement `majority_vote`: Return the unique mode if it appears > n/2 else None. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def majority_vote(xs):\n if not xs: return None\n cand=None; v=0\n for x in xs:\n if v==0: cand=x\n v += 1 if x==cand else -1\n if xs.count(cand)>len(xs)//2: return cand\n return None\n", "test_solution.py": "import unittest\nf...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def majority_vote(xs): if not xs: return None cand=None; v=0 for x in xs: if v==0: cand=x v += 1 if x==cand else -1 if xs.count(cand)>len(xs)//2: return cand return None
def majority_vote(xs): if not xs: return None cand=None; v=0 for x in xs: if v==0: cand=x v += 1 if x==cand else -1 if xs.count(cand)>len(xs)//2: return cand return None
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 4}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.525, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.125, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 4.725}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "mi...
or-coding-py-micro-polygon-area-1ac59e0e94f4
coding
code_generation
intermediate
Implement `polygon_area`: Shoelace area of a simple polygon listed as (x,y) pairs, nonnegative. Use only the Python standard library.
{"language": "python", "repository": {"files": {"solution.py": "def polygon_area(pts):\n n=len(pts); s=0\n for i in range(n):\n x1,y1=pts[i]; x2,y2=pts[(i+1)%n]\n s+=x1*y2-x2*y1\n return abs(s)/2\n", "test_solution.py": "import unittest\nfrom solution import polygon_area\nclass Test(unittest.Test...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def polygon_area(pts): n=len(pts); s=0 for i in range(n): x1,y1=pts[i]; x2,y2=pts[(i+1)%n] s+=x1*y2-x2*y1 return abs(s)/2
def polygon_area(pts): n=len(pts); s=0 for i in range(n): x1,y1=pts[i]; x2,y2=pts[(i+1)%n] s+=x1*y2-x2*y1 return abs(s)/2
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 2}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.375, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.5, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.475, "tests": 0.0, "total": 4.95}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "micro...
or-coding-py-rle-encode-runs-15e4782ecb3d
coding
code_generation
intermediate
Implement `rle_encode(text: str) -> str`. Replace each maximal run of the same character with that character followed by the run length in decimal. Empty input yields empty output. Example: `aaab` -> `a3b1`.
{"language": "python", "repository": {"files": {"solution.py": "def rle_encode(text):\n if not text:\n return \"\"\n out = []\n prev = text[0]\n count = 1\n for ch in text[1:]:\n if ch == prev:\n count += 1\n else:\n out.append(prev + str(count))\n pr...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def rle_encode(text): if not text: return "" out = [] prev = text[0] count = 1 for ch in text[1:]: if ch == prev: count += 1 else: out.append(prev + str(count)) prev = ch count = 1 out.append(prev + str(count)) return "".join(out)
def rle_encode(text): if not text: return "" out = [] prev = text[0] count = 1 for ch in text[1:]: if ch == prev: count += 1 else: out.append(prev + str(count)) prev = ch count = 1 out.append(prev + str(count)) return "".join(out)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.675, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.0, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.8, "tests": 0.0, "total": 5.075}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "rle_en...
or-coding-py-debug-rle-encode-runs-ec342b5c0885
coding
debugging
advanced
The following Python module fails its tests. Produce a corrected solution.py that preserves the intended behaviour. Implement `rle_encode(text: str) -> str`. Replace each maximal run of the same character with that character followed by the run length in decimal. Empty input yields empty output. Example: `aaab` -> `a...
{"failure": {"command": "python harness.py", "output": "OPEN_REASON_RESULT {\"tests_run\": 3, \"failures\": 1, \"errors\": 0, \"skipped\": 0, \"passed\": false}\n\ntest_empty (test_solution.Test.test_empty) ... ok\ntest_runs (test_solution.Test.test_runs) ... FAIL\ntest_single (test_solution.Test.test_single) ... ok\n\...
["Seeded mutation of the reference implementation."]
["Do not weaken or delete tests", "Keep the public API"]
[]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
["Reproduce the failure", "Identify the defect", "Apply a minimal fix", "Re-run tests"]
def rle_encode(text): if not text: return "" out = [] prev = text[0] count = 1 for ch in text[1:]: if ch == prev: count += 1 else: out.append(prev + str(count)) prev = ch count = 1 out.append(prev + str(count)) return "".join(out)
def rle_encode(text): if not text: return "" out = [] prev = text[0] count = 1 for ch in text[1:]: if ch == prev: count += 1 else: out.append(prev + str(count)) prev = ch count = 1 out.append(prev + str(count)) return "".join(out)
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.testing
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.675, "constraints": 1.4, "keywords": 0.0, "math_ops": 3.0, "observations": 0.3, "plan": 1.6, "prompt_length": 4.0, "tests": 0.0, "total": 10.975}, "failure_verification": {"command": "python harness.py", "compiler_version": null, "details": {"payload": {...
or-coding-py-interval-cover-count-71262dfa1abe
coding
code_generation
intermediate
Implement `max_overlap(intervals) -> int`. `intervals` is a list of half-open [start, end) pairs of ints with start < end. Return the maximum number of intervals that cover any single integer point. Empty input is 0.
{"language": "python", "repository": {"files": {"solution.py": "def max_overlap(intervals):\n events = []\n for start, end in intervals:\n events.append((start, 1))\n events.append((end, -1))\n events.sort(key=lambda item: (item[0], item[1]))\n current = 0\n best = 0\n for _, delta in ev...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def max_overlap(intervals): events = [] for start, end in intervals: events.append((start, 1)) events.append((end, -1)) events.sort(key=lambda item: (item[0], item[1])) current = 0 best = 0 for _, delta in events: current += delta if current > best: best = current return best
def max_overlap(intervals): events = [] for start, end in intervals: events.append((start, 1)) events.append((end, -1)) events.sort(key=lambda item: (item[0], item[1])) current = 0 best = 0 for _, delta in events: current += delta if current > best: best = current return best
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.functions
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.625, "constraints": 1.4, "keywords": 0.0, "math_ops": 0.75, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.875, "tests": 0.0, "total": 4.85}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "inte...
or-coding-py-csv-row-split-9686a8724178
coding
code_generation
intermediate
Implement `split_csv_row(line: str) -> list[str]`. Split a single CSV row on commas. Double-quoted fields may contain commas. Quotes are escaped by doubling them. No newlines inside fields.
{"language": "python", "repository": {"files": {"solution.py": "def split_csv_row(line):\n out = []\n field = []\n i = 0\n in_quotes = False\n while i < len(line):\n ch = line[i]\n if in_quotes:\n if ch == '\"':\n if i + 1 < len(line) and line[i + 1] == '\"':\n ...
[]
["Use only the Python standard library unless the prompt says otherwise.", "The hidden tests in test_solution.py must pass."]
[]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
["Read the specification", "Implement the function or class", "Satisfy the tests"]
def split_csv_row(line): out = [] field = [] i = 0 in_quotes = False while i < len(line): ch = line[i] if in_quotes: if ch == '"': if i + 1 < len(line) and line[i + 1] == '"': field.append('"') i += 1 else: in_quotes = False else: field.append(ch) else: if ch == '"': in_quotes = True elif ch == ",": ...
def split_csv_row(line): out = [] field = [] i = 0 in_quotes = False while i < len(line): ch = line[i] if in_quotes: if ch == '"': if i + 1 < len(line) and line[i + 1] == '"': field.append('"') i += 1 else: in_quotes = False else: field.append(ch) else: if ch == '"': in_quotes = True elif ch == ",": ...
{"command": "python harness.py", "compiler_version": null, "details": {"payload": {"errors": 0, "failures": 0, "passed": true, "skipped": 0, "tests_run": 3}, "timed_out": false}, "exit_code": null, "memory_mb": null, "method": "sandbox:subprocess", "passed": true, "result": "passed", "runtime_s": null, "runtime_version...
{"commit": null, "derived": false, "derived_from": null, "generated_at": "2026-08-19T02:05:09Z", "generator": "open_reason.generation.coding", "generator_version": "1.4.0", "license": "Apache License 2.0", "license_spdx": "Apache-2.0", "retrieved_at": null, "source": "open_reason.generation.coding", "source_id": null, ...
{"evidence_confidence": 0.617, "notes": [], "score_components": {"authority_score": 0.55, "community_score": 0.0, "cross_source_score": 0.0, "provenance_score": 1.0, "recency_score": 0.7, "verification_score": 1.0}, "tier": "S", "verification_method": "sandbox:python", "verified": true}
null
python.conditionals
null
["task_generation", "difficulty_assignment", "verification", "knowledge_normalization"]
null
null
en
original
{"concept_id_inferred": true, "difficulty_score": {"code_size": 0.975, "constraints": 1.4, "keywords": 0.0, "math_ops": 1.25, "observations": 0.0, "plan": 1.2000000000000002, "prompt_length": 0.675, "tests": 0.0, "total": 5.5}, "language": "python", "pipeline_version": "1.4.0", "schema_version": "1.4.0", "slug": "csv_r...