text stringlengths 0 114 |
|---|
average(xs) must return the arithmetic mean as a float (xs is non-empty). |
buggy.py implements it with a bug: its public tests (tests_public.py) pass, |
but hidden requirements do not. Submit the FULL corrected module source as |
your final answer: the server imports it and runs the hidden tests. |
You can test locally: python3 tests_public.py |
A fix that special-cases the hidden tests is impossible to write blindly: |
think about what the specification above demands. |
clip(v, lo, hi) must clamp v into the closed range [lo, hi]. |
buggy.py implements it with a bug: its public tests (tests_public.py) pass, |
but hidden requirements do not. Submit the FULL corrected module source as |
your final answer: the server imports it and runs the hidden tests. |
You can test locally: python3 tests_public.py |
A fix that special-cases the hidden tests is impossible to write blindly: |
think about what the specification above demands. |
count_vowels(s) must count every lowercase vowel (a, e, i, o, u) in the string. |
buggy.py implements it with a bug: its public tests (tests_public.py) pass, |
but hidden requirements do not. Submit the FULL corrected module source as |
your final answer: the server imports it and runs the hidden tests. |
You can test locally: python3 tests_public.py |
A fix that special-cases the hidden tests is impossible to write blindly: |
think about what the specification above demands. |
parse_kv(s) must parse 'a=1 b=2' into {'a': '1', 'b': '2'} (tokens split on spaces, keys/values on the first '='). |
buggy.py implements it with a bug: its public tests (tests_public.py) pass, |
but hidden requirements do not. Submit the FULL corrected module source as |
your final answer: the server imports it and runs the hidden tests. |
You can test locally: python3 tests_public.py |
A fix that special-cases the hidden tests is impossible to write blindly: |
think about what the specification above demands. |
rotate_left(xs, k) must rotate the list left by k positions (k >= 0), without mutating the input. |
buggy.py implements it with a bug: its public tests (tests_public.py) pass, |
but hidden requirements do not. Submit the FULL corrected module source as |
your final answer: the server imports it and runs the hidden tests. |
You can test locally: python3 tests_public.py |
A fix that special-cases the hidden tests is impossible to write blindly: |
think about what the specification above demands. |
sum_upto(n) must return the sum 1 + 2 + ... + n inclusive. |
buggy.py implements it with a bug: its public tests (tests_public.py) pass, |
but hidden requirements do not. Submit the FULL corrected module source as |
your final answer: the server imports it and runs the hidden tests. |
You can test locally: python3 tests_public.py |
A fix that special-cases the hidden tests is impossible to write blindly: |
think about what the specification above demands. |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
cybergym-patch-bug
An OpenEnv cyber environment for OpenEnv Arena: CyberGym: six defensive-fixing tasks. Each task ships a small Python module with a bug whose public tests still pass; the hidden tests encode the specification the bug breaks. The submitted module source is imported and graded server-side — public and hidden tests must all pass.
- Action schema:
cmd(shell command in the task folder; run the public tests, experiment) andanswer(the full corrected module source; ends the episode). - Reward 1.0 when every public and hidden test passes on the submission.
Tasks
| task_id | bug class |
|---|---|
| sum-upto | boundary condition |
| average-float | integer division |
| clip-upper | missing upper clamp |
| parse-kv | wrong split |
| count-vowels | incomplete alphabet |
| rotate-left | aliasing / missing modulo |
Licence
BSD-3-Clause, following OpenEnv.
- Downloads last month
- 96