Files
leleka/scripts/e2e/codex/tasks/README.md
T

57 lines
3.3 KiB
Markdown

# Codex task set for the lossy-vs-lossless delta study
Task set of the study `claude/codex-lossy-delta` (runner: `scripts/e2e/codex/delta/`, plan: `docs/experiments/codex-lossy-delta.md`).
Every task is run by the real Codex CLI 0.163.0 against four stacks (vanilla Strata lossy / lossless, our port lossy / lossless).
The prompt, the seed workspace and the acceptance script are byte-identical for all four variants and are checked against `MANIFEST.sha256`
before every run (`scripts/e2e/codex/delta/verify_tasks.py`); a mismatch stops the runner.
## Layout of one task (`tasks/<id>/`)
```text
task.md exact prompt text between the two marker lines (see below), plus notes for the orchestrator (never sent to Codex)
seed/ the frozen seed workspace: copied byte for byte into an empty directory before every run (may be empty; files that are too
big or third-party are listed in task.md under "External seed files" with their sha256 and are copied by the runner)
accept.py objective acceptance: `python3 accept.py WORKSPACE` -> exit 0 = task done, any other exit = not done. Prints one
`PASS name` / `FAIL name :: detail` line per check. It never depends on the variant, never reads the network, finishes in < 120 s,
uses only the Python 3 standard library (must run on Python 3.9 and 3.14) and copies the workspace to a temporary directory
before running anything of it (it must not modify the workspace).
hidden/ files only the acceptance script uses (hidden tests, golden data). Never copied into the workspace.
reference/ `overlay/` = files that, copied over `seed/`, make `accept.py` pass. Used only by `selftest.py` (the acceptance must FAIL on the
bare seed and PASS on seed + overlay). Never given to Codex.
```
`task.md` format (the runner extracts the prompt with `delta/taskfile.py`):
```text
---
id: <id>
title: <one line>
kind: <bugfix | feature | refactor | debug | create | multifile>
expected_rounds: <low>-<high> (the author's estimate of model requests; not enforced)
---
# <title>
(any notes for the orchestrator, free text; not sent to Codex)
## Prompt
<!-- PROMPT BEGIN -->
the exact prompt text; Codex receives everything between the two marker lines, without the line breaks directly after BEGIN / before END
<!-- PROMPT END -->
## External seed files
(optional) `relative/path sha256 bytes` per line
```
Rules for the prompt: self-contained, English, ends with an instruction to reply with a short summary when done, does not mention the study,
the variants or the acceptance script by name. The workspace is the current directory of Codex; there is no network; the machine has Python 3
(standard library only, no pytest), `gcc` and `make`, no Rust, no Node.
## Selftest
`python3 scripts/e2e/codex/tasks/selftest.py [task-id ...]` checks, for each task, that the manifest matches, that `accept.py` fails on the bare seed and
passes on seed + `reference/overlay`, and that `accept.py` does not modify the workspace. Run it before `freeze.py`.
## Freeze
`python3 scripts/e2e/codex/tasks/freeze.py` rewrites `MANIFEST.sha256` (sha256 of every file under every task directory, plus one `TASK <id> <digest>` line
per task, plus the external files). The runner verifies the same list on the server copy (read-only, `chmod a-w`) before every cell.