--- language: - it - en license: apache-2.0 task_categories: - other tags: - rl-environment - reinforcement-learning - harbor - agent - shell-agent - tool-calling - italian size_categories: - 1K # 🗂️ Scrivania Harbor [![Harbor Visualiser](https://img.shields.io/badge/%F0%9F%A4%97%20Harbor%20Visualiser-Browse%20tasks-FFD21E?style=for-the-badge&labelColor=1a1a1a)](https://huggingface.co/spaces/HuggingFaceH4/harbor-visualiser?dataset=efederici%2Fscrivania-harbor) > **3,360 everyday computer-use tasks for shell agents, Italian and English, 2–5 tool calls each, graded on the final state and on collateral damage.** Ready for RL with [palingenesis](https://github.com/mii-llm/palingenesis): `pgs harbor check` validates every task and `pgs harbor rows` converts them into training rows (see [Train with palingenesis](#train-with-palingenesis)). *Scrivania* is Italian for "desk". Each task puts an agent in a container with a small home folder (Documents, Downloads, Photos, a project, some logs, a running service or two) and a short request: resize a photo, archive a folder without the logs, kill the process on port 8080, commit only one file, delete the `.tmp` files but not the `.tmp.keep` ones. The agent works in the shell; hidden tests decide the reward deterministically, with no LLM in the reward path. The tasks sit a rung below harder agentic suites such as [efederici/agent-harbor-tasks](https://huggingface.co/datasets/efederici/agent-harbor-tasks): short, everyday jobs with a clear, verifiable end state. - **40 families × 3 levels**, 84 tasks per family, built by deterministic generators. - **Level 1**: names are explicit, about 2 calls. **Level 2**: a search or a constraint. **Level 3**: 4–5 calls and/or error recovery (a missing folder, a script without the execute bit, the wrong case in a path, a `.tar.gz` named `.zip`). - **Three kinds of task**: 2,856 *act* (change the files), 420 *answer* (change nothing; the final message must hold the value) and 84 *ask* (the request is ambiguous; the agent must ask instead of acting). - `min_tool_calls` (oracle path): 2 calls on 1,400 tasks, 3 on 1,148, 4 on 784, 5 on 28. ## Families | group | families (84 tasks each) | what they ask | |---|---|---| | images | `img_resize`, `img_crop`, `img_convert`, `img_thumbnail`, **`img_strip_exif`** | ImageMagick / Pillow; exact size, pixel-exact crops on coordinate-coded PNGs, EXIF removed | | find & act | `find_name_delete`, `find_content_move`, `find_size_rename`, `find_date_copy` | find by name, content, size or mtime, then act on exactly that set | | careful bulk | `bulk_delete`, `bulk_move_ext` | the exact matching set next to near-matches (`.tmpl`, `.tmp.keep`, subfolders, old vs new mtimes) | | processes / ports | `proc_kill_name`, `proc_kill_port`, **`proc_kill_cpu`**, `port_who`, `proc_info` | kill one service and leave the look-alikes running; who listens on a port; count / PID / most RAM | | disk | `du_report`, `du_answer` | folder sizes to a file or in the reply | | archives | `archive_create`, `archive_extract` | tar.gz / zip with exclusions and the right top-level layout; extraction, including a misnamed archive | | text / data | `csv_filter_sort`, `csv_aggregate`, `json_extract`, `log_extract`, `log_answer`, `uniq_count` | filter and sort CSVs, totals, `jq`, log lines across `.gz` rotations | | permissions | `chmod_task`, `chown_task` | exact modes and owners on named paths only | | structure | `mkdir_structure` | an exact folder tree | | git | `git_commit`, `git_branch`, `git_restore`, **`git_revert`** | commit only the named file or on a new branch, restore a file, revert a commit; history preserved | | config | `env_edit`, **`cron_edit`** | edit one `.env` value; add or change a crontab line | | error recovery | `recover_noexec`, `recover_wrong_case` | the first attempt fails (no execute bit, missing output folder, required argument, wrong case) and the agent must recover | | ask vs act | `ask_process`, `ask_file_action` | half ambiguous (two candidates: ask, naming both), half clear (one match: act), same phrasing | | read & answer | `read_answer_file` | an INI value, a CSV lookup or a git author; 25% "not present" | Families in **bold** are held out (`test_ood`). Example instructions: - *Crea Backup/sito.zip con il contenuto di Progetti/sito, escludendo tutti i file .log. I file originali non vanno toccati.* (`archive_create`, level 2) - *Ciao! Quante righe con livello ERROR del 2026-10-05 ci sono in log/app.log e log/app.log.1 messi insieme?, per favore. Attenzione, la parola error compare anche in altri messaggi. Non modificare niente.* (`log_answer`, level 2) - *Create the archive website.tar.gz (tar.gz) in the top folder with the whole content of Projects/website. The original folder must stay.* (`archive_create`, level 1) Instructions vary in register (imperative, a question, first person, a greeting, some informal), and the starting files are realistic and full of near-matches. ## Languages and splits **2,052 Italian, 1,308 English** (61% / 39%), in every split. | split | tasks | it / en | rule | |---|---|---|---| | `train` | 2,285 | 1,385 / 900 | | | `test_seed` | 253 | 154 / 99 | about 10% of the train-variant tasks (seeded hash): unseen seeds, seen variants | | `test_variant` | 486 | 303 / 183 | 1 of the 6 variants (skins) of every in-distribution family, never in `train` | | `test_ood` | 336 | 210 / 126 | the 4 held-out families: `img_strip_exif`, `proc_kill_cpu`, `git_revert`, `cron_edit` | The split of each task is in `task.toml [metadata] split` and in `manifest.parquet`. ## How a task is laid out The `main` branch uses Harbor's native single-step layout, so the tasks run under the stock Harbor CLI (checked with `harbor==0.24.0`). The palingenesis-native layout (`environment/workdir/` + `environment/setup.sh`, `[verifier] capture`, image `harbor3-base:1`) is kept unchanged on the branch [`palingenesis-native`](https://huggingface.co/datasets/efederici/scrivania-harbor/tree/palingenesis-native). ``` tasks// task.toml # name = "efederici-scrivania/"; [metadata] family, level, language, split, min_tool_calls, # kind; [environment] docker_image = "harbor3-base:2"; [[steps]] name = "main" instruction.md # a copy of the request for task viewers (Harbor reads the step's) environment/ # Dockerfile: "FROM harbor3-base:2" (marks the prebuilt image; Harbor needs environment/) steps/main/ instruction.md # the request the agent sees workdir/ # the starting files; Harbor copies them into /workdir and runs workdir/setup.sh there # (deletes itself, makes /workdir root's, renames dot_git/ to .git, modes, mtimes, services) solution/ # solve.sh (reference solution, never shown to the agent) + final_message.{md,sh} (the oracle's # reply; solve.sh also writes it to the answer file) + policies.json (shortcut policies) tests/ # test.sh + spec.json: the hidden tests, run by /opt/h3/verify.py from the image registry.json # Harbor registry: dataset "efederici-scrivania", version 1.1, every task by path manifest.parquet # one row per task: task_id, family, level, language, split, min_tool_calls, kind, instruction, # variant, seed, answer_file base_image/ # Dockerfile + h3/ (capture.py, verify.py, daemon.py) of the shared image; test_verify.py generators/ # gen/: the deterministic generators (build.py), the Docker self-test (selftest.py); selftest/: raw rows # export_vanilla.py: the palingenesis-native -> Harbor-layout exporter that built main SELFTEST.md # self-test report ``` The Hub does not store paths named `.git`, so the starting git repositories of the 364 git-based tasks (`git_*` and some `read_answer_file`) ship as `steps/main/workdir/**/dot_git/`; `setup.sh` renames them back to `.git` before anything else, so the agent sees ordinary repositories. A runner that skips `setup.sh` must do the same rename. Example: [task.toml](https://huggingface.co/datasets/efederici/scrivania-harbor/blob/main/tasks/scr_archive_create_l2_it_0037/task.toml) · [instruction](https://huggingface.co/datasets/efederici/scrivania-harbor/blob/main/tasks/scr_archive_create_l2_it_0037/steps/main/instruction.md) · [tests](https://huggingface.co/datasets/efederici/scrivania-harbor/blob/main/tasks/scr_archive_create_l2_it_0037/steps/main/tests/spec.json). ## Verified by tests, hardened by attacks The verifier is all-or-nothing. Reward 1 only if every check holds: 1. **Collateral.** Every starting path the task does not name keeps its type, sha256 and mode (and owner in `chown` tasks); no new path appears except the named outputs. So `rm -rf`, `chmod -R 777`, deleting near-matches, copy-instead-of-move and scratch files left in `/workdir` all fail. 2. **Targets.** absent / sha / text / lines / CSV (numeric columns with tolerance) / JSON / single value / mode / owner / image (format, exact size, EXIF, pixels) / archive members / exact folder tree / crontab (field-normalised). 3. **Processes.** The services that must die are gone and every other task service still runs (`kill -9 -1` stops the container and scores 0; `pkill -f name` kills the look-alikes and scores 0). 4. **Git.** HEAD branch, parent = previous HEAD (no amend or reset), subject, exact HEAD tree, refs, preserved history. 5. **Answer and ask tasks.** Nothing may change. Answers: the final message (≤ 300–600 characters) holds every gold value and no distractor value, so listing everything fails. Asks: a question that names every candidate. Under the Harbor CLI the reply is read from `/workdir/answer.txt` / `question.txt` (see below). **Live state through `[verifier] capture`.** Processes, listening ports, owners and git internals do not survive a copy of `/workdir`, so each task sets `capture = "python3 -I /opt/h3/capture.py /workdir"`: the command runs as root in the **agent's** container just before verification, and its stdout reaches the tests as `/logs/agent/capture.json`. This is the palingenesis-native layout (branch `palingenesis-native`, palingenesis ≥ `0616c0f`). On `main` the key is dropped: the Harbor CLI runs the tests in the agent's container and `test.sh` captures the state itself. **Self-test (Docker, `harbor3-base:1`).** A stratified sample of 3 tasks per family × level (360 tasks) was run with the oracle (must score 1), doing nothing (must score 0) and every shortcut policy (must score 0): generic ones (`rm -rf /workdir/*`, `kill -9 -1`, a claim of success, a generic question) plus per-family attacks (blind answers, copy instead of move, `pkill -f`, `killall python3`, global `sed`, `git add -A` / `--amend` / `reset --hard` / `stash`, acting on the first candidate, distractor values, listing dumps, `chmod -R`, too-broad `find`, …). **2,972 episodes, 0 failures**, and a full oracle run over all **3,360 tasks scores 1 on 3,360**. Per family: [SELFTEST.md](SELFTEST.md); raw rows in `generators/selftest/`. **Harbor CLI check (`main`, `harbor==0.24.0`, Docker, CPU).** A stratified sample of 84 tasks (2 per family at different levels; the ask families 2 ask + 2 clear tasks) through `harbor run`: **oracle = 1 on 84/84, nop = 0 on 84/84**, all 40 families, the seven reply-graded families graded through the answer file. Ten direct Docker checks of the answer-file tests (a value spray, a blind number, a scratch file next to the answer, a generic question, acting on an ambiguous request, a question on a clear task, the palingenesis final message with and without the file) all score as expected. Per family: [SELFTEST.md](SELFTEST.md). ## Train with palingenesis [palingenesis](https://github.com/mii-llm/palingenesis) runs these tasks natively: Docker containers per episode, the hidden tests as the reward, and emulated agent harnesses (opencode, pi, OpenHands, mini-swe-agent, …) so a policy learns more than one tool dialect. Install it ([installation guide](https://mii-llm.github.io/palingenesis/getting-started/install/)), validate the tasks and convert them into RL rows: ```bash git clone https://github.com/mii-llm/palingenesis.git && cd palingenesis uv sync # CPU is enough to check tasks and build rows; add --extra train for RL on a GPU source .venv/bin/activate hf download efederici/scrivania-harbor --repo-type dataset --revision palingenesis-native --local-dir scrivania-native pgs harbor check scrivania-native/tasks # every oracle must pass, doing nothing must fail pgs harbor rows scrivania-native/tasks rows.jsonl # convert the tasks into RL rows (task_dir + prompt) pgs rl --config configs/rl_harbor.yaml # multi-turn RL; env palingenesis.rl.envs.harbor:HarborEnv ``` palingenesis reads the layout of the `palingenesis-native` branch (same tasks, ids and tests as `main`). Guides: [Harbor environments](https://mii-llm.github.io/palingenesis/guides/harbor/) · [Harness profiles](https://mii-llm.github.io/palingenesis/guides/harness-profiles/). ## Run Every task uses the shared image `harbor3-base:2` (`[environment] docker_image`): Debian bookworm-slim with coreutils, findutils, procps, lsof, psmisc, iproute2, ImageMagick, Python 3 + Pillow, jq, git and the archive tools, users `mario` / `giulia` / `luca`, and `/opt/h3` (capture, verifier, background service). **464 MB on disk, 114 MB compressed.** The agent runs as root, 1 CPU, 1 GB, no network. The image is not on a registry: build it once, with `base_image/` as the build context (`:2` = `:1` plus a verifier fix: a missing target is a reasoned 0, not a verifier error): ```bash hf download efederici/scrivania-harbor --repo-type dataset --local-dir scrivania-harbor docker build -t harbor3-base:2 scrivania-harbor/base_image ``` **Harbor CLI** (`main` branch; Docker, CPU only): ```bash # the oracle must score 1 and doing nothing 0 uv run --with harbor==0.24.0 harbor run -p scrivania-harbor/tasks -a oracle -n 8 uv run --with harbor==0.24.0 harbor run -p scrivania-harbor/tasks -a nop -n 8 # a real agent on a subset (glob on task names; most installed agents also need internet inside the container # and a path to the model endpoint, e.g. --allow-agent-host ) uv run --with harbor==0.24.0 harbor run -p scrivania-harbor/tasks -i 'scr_proc_*' -a -m ``` The `[metadata]` table (family, level, language, split, kind) and `manifest.parquet` select subsets; Harbor's `-i/-x` take globs on the task id. **palingenesis** (branch `palingenesis-native`, ≥ `0616c0f` for `[verifier] capture`; image `harbor3-base:1`, built from that branch's `base_image/`): ```bash hf download efederici/scrivania-harbor --repo-type dataset --revision palingenesis-native --local-dir scrivania-native docker build -t harbor3-base:1 scrivania-native/base_image pgs harbor check scrivania-native/tasks # oracle must pass, doing nothing must fail pgs harbor rows scrivania-native/tasks rows.jsonl # RL rows (task_dir + prompt) # RL: env.type = palingenesis.rl.envs.harbor:HarborEnv (tools bash, read_file, write_file, str_replace, submit) ``` palingenesis does not read the `[[steps]]` layout of `main`; the two branches hold the same tasks (same ids, files, tests and splits), apart from the answer-file convention below (the instruction, test.sh and solve.sh of 588 tasks). Filter by split, family, level, kind or language through `manifest.parquet`: ```python from datasets import load_dataset m = load_dataset("efederici/scrivania-harbor", split="tasks") train_it = m.filter(lambda r: r["split"] == "train" and r["language"] == "it") ``` Rebuild (deterministic; needs Pillow, pyarrow, git): `python3 generators/gen/build.py OUT --per-family 84` writes the palingenesis-native layout; `python3 generators/export_vanilla.py OUT/tasks scrivania VANILLA --manifest manifest.parquet` turns it into the layout of `main`. The Docker self-test (`generators/gen/selftest.py`) expects palingenesis importable, the palingenesis-native tasks and the `harbor3-base:1` image. ## Harbor CLI vs palingenesis: the answer-file convention and fidelity Stock Harbor never hands the agent's last reply to the verifier, so on `main` the 588 tasks of the seven reply-graded families (`du_answer`, `log_answer`, `port_who`, `proc_info`, `read_answer_file`: answer; `ask_process`, `ask_file_action`: ask) end their instruction with one extra sentence, in the task's language: - answer families: *Also write your answer to /workdir/answer.txt (the only file you may create).* / *Scrivi la risposta anche nel file /workdir/answer.txt (è l'unico file che puoi creare).* - ask families (both the ambiguous and the clear half, same sentence): *If you need to ask me something before acting, write your question to /workdir/question.txt and stop.* / *Se prima di agire devi chiedermi qualcosa, scrivi la domanda nel file /workdir/question.txt e fermati.* `tests/test.sh` grades `/logs/agent/final_message.md` when it exists and is non-empty (palingenesis writes it), else the file. The file is taken out of the captured state before grading on answer tasks and on the ambiguous ask tasks, so it is not "collateral"; everything else is graded exactly as before (nothing else may change, every gold value, no distractor, a question naming every candidate). On the clear ask-family tasks a `question.txt` is a new path and scores 0, as asking does there under palingenesis. These tasks carry the keyword `answer-file` in `task.toml` and the file name in the `answer_file` column of `manifest.parquet`; `instruction` holds the exported text. Full fidelity needs palingenesis (branch `palingenesis-native`): - **the seven reply-graded families**: under the CLI they grade a file the agent writes, not its reply, and the instruction says so; for the original behaviour (the answer or question in the final message, no hint) use palingenesis, which writes `/logs/agent/final_message.md`; - **every family, for isolation**: palingenesis runs `[verifier] capture` in the agent's container and the tests in a clean container holding only a copy of `/workdir`. The CLI runs the tests in the agent's container (`test.sh` then captures the state itself), so the result is the same for an honest agent, but an agent running as root there could tamper with `/opt/h3` or leave processes behind. Live state (processes and ports for `proc_*`, `port_who`, `ask_process`; owners for `chown_task`; git refs) is read correctly either way. ## Measured difficulty Pass rates per family and level will be added here; the tasks are not filtered for difficulty yet. ## Changelog - **2026-10-17.** Verifier (`base_image/h3/verify.py`, answer tasks): a distractor value counts only when it is named before the required value; numbers named after the answer are context (line numbers, PIDs, sizes: "7 lines (lines 4, 8, 17)" was wrongly failed because 8 is a distractor count), and at most one other candidate name may follow it. All oracle replies still pass and every message attack (value spray, listing dump, blind number, constant guess, "I don't know") still fails. Rebuild the image (`docker build -t harbor3-base:N base_image`) to pick it up. ## License and provenance Apache-2.0. The tasks, generators and verifiers were written with Claude agents and are built procedurally: no personal data, no scraped content; file names, users, values and images are synthetic. Companion set: [efederici/bisturi-harbor](https://huggingface.co/datasets/efederici/bisturi-harbor) (precise file edits, same image and layout).