- **Restore 82 completed tasks** from tasks/complete/ back to tasks/ top level (all <7 days old per the cleanup policy; premature bulk archive was fixed). - **Dashboard: fix scroll-reset on auto-refresh** — renderBoard rebuilds the board via innerHTML every 2s, destroying each column-body's scrollTop. Now snapshots column-body scrollTop + board.scrollLeft + view.scrollTop before rebuild and restores after (matched by PHASE_GROUPS index). - **Dashboard UI additions** (pre-existing unstaged work): approval section cards, transition buttons, inline artifact editor (textarea for writing missing SPEC/VERDICT/etc from the detail modal). - **Bind ornith as Implement model** — config.md: Model explicit to omlx/Ornith-1.0-35B-4bit-mlx, context window 32768. Interactive autopilot already used ornith via opencode default; now explicit. - **Fix cleanup stub** — automaton-cleanup.sh had a stale --project arg pointing at a pytest temp dir (test isolation leak). Rewired to point at ~/.automaton. - **Fix plist-isolation test** — test asserted host plist doesn't exist, but a real install creates it. Now snapshots mtime before run, asserts unchanged after (only a write during the test counts as bleed). - **New Playwright smoke test** (tests/test_dashboard_ui.py) — 2 tests: board renders tasks, column scroll survives auto-refresh tick. Verified the test fails without the scroll fix (scrollTop resets to 0). Skipped via importorskip when playwright is absent (main CI stays green). - **Clarify SI loop scope in README** — new-project onboarding section documents the framework-scoped self-improvement loop and options (leave/pause/create project loop). - **CHANGELOG** documents all changes including the known model-divergence gap (mde tasks marked complete but per-role model binding was never implemented).
4.9 KiB
SPEC — runnable-test-suite
Goal
Make python3 -m pytest tests/ -v pass from a clean checkout of ~/.automaton, with deterministic Python deps pinned in the repo and documentation that reflects the actual interpreter that ships on the user's machine.
The prime symptom that proves nothing at all runs today: a fresh clone executes python (per AGENTS.md) and silently fails because macOS only ships python3, and even with the right interpreter the suite fails on No module named pytest.
Requirements (numbered)
- Add
requirements.txtat the repo root pinningpytest(lowest version that supports the syntax used intests/, which is plain fixtures andtmp_path— pytest ≥ 7.0). No other third-party deps may be added. - Provide a venv-based install path: a one-line install in
scripts/install.sh(or a new snippet) that creates.venv/andpip install -r requirements.txt. Must not require sudo and must not pollute the system Python. - Make
python3 -m pytest tests/ -vexit 0 from a clean checkout afterpip install -r requirements.txt(no venv required — systempip3 install -r requirements.txtmust also work). - Fix every Python file under the repo that fails
python3 -m py_compile(currently clean, but must stay clean). - Replace every bare
pythoninvocation in documentation and prompts withpython3so the documented commands actually run on a stock macOS without a shim.AGENTS.mdlines 58, 61, 64, 70README.mdlines 203, 206, 209, 212, 213, 216, 219, 222, 225, 228, 229, 230, 242, 245, 324, 338, 353automaton/dashboard/README.mdlines 11, 18, 21, 24prompts/orchestrate.mdlines 28, 29, 30, 36- Any other
python(bare) reference found byrgAFTER the first pass
- Do NOT change
pythonreferences inside shell scripts that already invoke#!/usr/bin/env python3shebangs or that explicitly resolve viacommand -v. Only fix barepythoncommands that shell out (none expected in scripts/ after audit, but verify). - Add a CI step note to
CHANGELOG.mdunder[unreleased]documenting the newrequirements.txtand thepython3requirement. - Update
AGENTS.md"Build & Test Commands" section to referencerequirements.txtand usepython3consistently.
Acceptance criteria
Each must pass from a fresh clone with only stock macOS CommandLineTools + pip3:
pip3 install -r requirements.txtsucceeds.python3 -m pytest tests/ -vexits 0 withN passed(N ≥ 1) and zeroerrorlines.python3 -m py_compile automaton/**/*.py automaton/dashboard/**/*.py scripts/*.pyexits 0.bash -n scripts/*.shexits 0.rg -n "^python |\"python " AGENTS.md README.md automaton/dashboard/README.md prompts/orchestrate.mdreturns zero matches for a barepythoncommand.- Following the install instructions in
AGENTS.mdverbatim, a new contributor can run the test suite within 60 seconds of clone.
Success contract (streak)
Per the goal mode this task derives from, "done" requires 10 consecutive clean python3 -m pytest tests/ -v runs in a row without any edit between runs. A single failure resets the counter. The cap on attempts is 5; on hitting the cap, stop and report.
Constraints / non-goals
- No new dependencies beyond
pytest. Do not addpytest-cov,pytest-mock,tox, etc. - No virtualenv vendoring. The user creates
.venvthemselves if they want isolation; systempip3 install -r requirements.txtmust also work. - No changes to existing test logic. If a test is genuinely broken (not just import-failing because pytest is missing), STOP and report — do not patch the test to make it pass. That is the anti-spin rule from #9 in the source article.
- Do not touch any file under
tasks/(per-framework tasks are state, not source). - Do not modify
status.py,vram_detect.py, or any other runtime script's behavior. Only documentation and config files change. - No Docker, no conda, no
pyenvrequirements. Stockpython3+pip3only. - VRAM-aware scoping: this task fits in ONE sub-task (~9k peak context budget on this 32GB-RAM / no-GPU machine with
Model: auto). Do not decompose further. Sub-tasks would exceed the budget on overhead alone.
Recommended implementation approach (high-level)
- Create
requirements.txtwithpytest==7.4.4(last 7.x; works on Python 3.9+). pip3 install -r requirements.txtlocally and run the suite; capture every failure.- For each failure, decide: import/install issue (fix dep) vs. real code bug (report, do not patch test).
- Sweep
python→python3in docs/prompts witheditbatching. - Add install snippet to
scripts/install.sh(idempotent; only if.venvdoesn't exist). - Add a one-line test smoke-check at the end of
install.sh:python3 -m pytest tests/ -q || echo "tests deferred". - Update
CHANGELOG.md[unreleased]. - Run the streak verifier: 10×
python3 -m pytest tests/ -v; stop at first clean streak or 5 attempts.