# Skills Desk An [OpenEnv](https://github.com/meta-pytorch/OpenEnv) environment for the OpenEnv Arena that trains reliable problem solving with tools: understand the request, find the relevant information, compute or repair something, produce the required output, and check it. Forked from Science Desk and dnakhla's Terminal Desk v2 (Apache-2.0, see `NOTICE`). Each episode is a small workspace under `/app` with a short instruction. The agent runs commands (`exec`), writes files (`write_file`) and sends `evaluate`; a hidden grader checks the result and returns 1 or 0. The interface is Terminal Desk's copy of OpenEnv's upstream `tbench2_env` wrapper: the same action and observation schema, the instruction repeated in every observation, output not cut. The image includes Python 3.12 with numpy, scipy, pandas and astropy, plus `jq`, `bc` and `sqlite3`. ## Tasks `manifest/training_tasks.txt` lists the 40 training task ids, 8 per skill. Each id is one fixed problem (seeded from the id), so a GRPO group compares answers to the same question; `-i` names further fixed instances. | Skill | Training tasks | |---|---| | Find and combine evidence | backorders (L1, and L2 with deliveries and SKU renames), calibration windows, outstanding deliveries, badge access with inherited roles, duplicate customers, bank reconciliation, first release that fixed an issue | | Compute from data | channel statistics, rainfall (L1, and L2 with gauge scales and QC), meter registers that wrap, final grades, FIFO stock cost, rolling-median exceedances, loan schedule | | Transform structured data | messy contacts to typed JSON, log lines to JSON, XML to CSV, long to wide, Markdown table to JSON, JSONL sessions, fixed-width report, regional dates to ISO | | Repair and verify | toolkit module, broken report script, pagination, log-line parser, unit conversion, business days, deduplication script, sorted log merge | | Follow constraints | roster (L1 three days, L2 two days), correct a draft roster, complete a partly agreed roster, cargo choice, course selection, fewest disks, delivery days | The easier tasks are deliberate: they train delivering a valid result reliably, alongside tasks that need real search, computation or repair. ### v2 bank `manifest/training_tasks_v2.txt` (36 ids) is the v2 submission: the candidates (v1's 40 tasks plus 12 `ev_contracts` tasks on CC0 USAspending data, see `NOTICE`) screened 6 times each against untrained Qwen3.8-27B, keeping those solved 1 to 5 times, by the rule frozen beforehand in `manifest/v2-PREREGISTRATION.md` (`tools/select_v2.py`; counts in `manifest/v2-selection.json`). Ids shared with v1 serve their v1 instances (`tests/test_training_v2_frozen.py`). ## Reserved evaluation set `manifest/reserved_tasks.txt` lists 20 reserved tasks (`res_*`, four per skill: two fresh applications of a familiar skill and two combining skills). They are served by the same image so a trained checkpoint can be evaluated on them, but they are never trained on and never used to choose or tune training tasks: `tools/make_submission.py` refuses them, and they use their own instance salt. The set is frozen by `tests/fixtures/reserved_fingerprints.json`; changing it means a new, separately named version. ## Reward Binary, on `evaluate`: 1.0 when the output satisfies every requirement, else 0.0. Graders check content and structure together (valid JSON with wrong values fails; right values in a malformed file fail; a CSV row with extra or missing fields fails). Harmless representation differences pass: key order, CSV quoting, line endings, and either rounding of an exact half where a task does not state a rounding rule. Tasks with many correct answers (rosters, schedules, plans) are graded against their rules. Repair tasks run the repaired code as `nobody` on hidden input. `close` ends without a reward; after 32 calls the environment evaluates on its own. No partial credit, and nothing rewards a particular tool sequence. ## Isolation The server runs as root outside `/app`; `exec` and `write_file` run as `nobody` with CPU, memory, file-size and process limits and cannot read the server tree; every `nobody` process is killed after each action and before grading. Expected outputs live only in server memory; the grader refuses symlinks, FIFOs and oversized files. ## Build and test ```sh python3 -m venv .venv && .venv/bin/pip install vendor/openenv-0.6.1.dev0-py3-none-any.whl pytest websockets httpx numpy scipy tokenizers PYTHONPATH=. .venv/bin/pytest -q tests # oracle 1 / empty 0 / corrupted 0, reference agent scripts, # deliberate mistakes 0, strict structure, frozen fingerprints DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t ghcr.io/syndicate604/skills-desk:v1 . bash tools/pool.sh up ghcr.io/syndicate604/skills-desk:v1 1 .venv/bin/openenv validate --url http://localhost:18001 PYTHONPATH=. .venv/bin/python tools/replay_solvers.py http://localhost:18001 --set all # every reference in the image PYTHONPATH=. .venv/bin/python tools/check_package.py --url http://localhost:18001 --request ../submission.skills-v1.draft.json ``` `tools/calibrate.py` plays Qwen3.8-27B through OpenRouter (bf16 pinned) under the arena's budgets with a hard spend cap; it keeps every reply and saves each output file before grading. Screens have underestimated the arena-trained model, so treat them as sanity checks only.