CI / build (push) Has been cancelled
- Archive 79 completed framework-dev tasks from tasks/ -> tasks/complete/ - status.py: add --cleanup-done and --install-cleanup-schedule commands - Add scripts/automaton-cleanup.sh for periodic task archiving - Dashboard: rename 'Background' tab -> 'Agent', 'Cleanup' agent -> 'Completed Task Archiver', remove redundant group headers and pill badges, dim inactive agent placeholders - .rules.md: add Self-Documenting UI Names rule - New tests: test_cleanup_done.py, expanded test_app.py and test_task.py
5.5 KiB
5.5 KiB
SPEC — make-tests-runnable
Parent: runnable-test-suite (see PARENT_SPEC.md).
Scope
Establish the green-test baseline the other sub-tasks depend on. Pin pytest,
sweep docs/prompts for python → python3, add install snippet, verify the
streak contract.
Files this sub-task touches (and ONLY these)
requirements.txt(NEW) — pinpytest==7.4.4(last 7.x; supports Python 3.9+).AGENTS.md— Build & Test Commands section:python→python3, referencerequirements.txt.README.md— every barepython→python3in commands.automaton/dashboard/README.md— same sweep.prompts/orchestrate.md— same sweep onstatus.pyinvocations.scripts/install.sh— append idempotent venv snippet (only create.venvif it doesn't already exist; onlypip install -r requirements.txtinside .venv).CHANGELOG.md—[unreleased]entry noting newrequirements.txt,python3requirement, venv install path.automaton/dashboard/core/scope.py— addfrom __future__ import annotationsat top (after module docstring) so PEP 604 annotations become lazy strings (PEP 563) and the file imports on Python 3.9.automaton/dashboard/core/board.py— samefrom __future__ import annotationsfix.automaton/dashboard/ui/app.py— same fix (transitively imports scope/board).- Any other file under
automaton/dashboard/usingX | Yannotation syntax evaluated at definition time — samefrom __future__ import annotationsfix.
MUST NOT touch
scripts/vram_detect.py(subtask-2 owns it)tests/test_vram_detect.py(subtask-3 owns it)- Any other test file (
tests/*.py) scripts/status.py,scripts/autopilot.py, or other runtime scripts- Logic in the dashboard files — ONLY add the
from __future__ import annotationsimport line. Do NOT change function signatures, types, or behavior. The fix is purely a compatibility shim so annotations become strings (PEP 563).
Requirements (numbered)
- Create
requirements.txtat repo root with exactly:pytest==7.4.4 - In
AGENTS.md, change everypython -m py_compile,python -m pytest,python -m automaton.dashboardtopython3 -m .... Add a one-line note after the section title: "Install:pip3 install -r requirements.txt" - In
README.md, change everypython ~/.automaton/scripts/status.py ...andpython -m automaton.dashboardtopython3 .... - In
automaton/dashboard/README.md, change everypython -m automaton.dashboardtopython3 -m automaton.dashboard. - In
prompts/orchestrate.md, change everypython ~/.automaton/scripts/status.pytopython3 ~/.automaton/scripts/status.py. - In
scripts/install.sh, append a venv block:Must be# --- Python deps (idempotent) --- if [ ! -d ".venv" ]; then python3 -m venv .venv fi .venv/bin/pip install --quiet --upgrade pip .venv/bin/pip install --quiet -r requirements.txtset -e-safe and re-runnable without errors. - In
CHANGELOG.md, add under[unreleased]:- Added:
requirements.txtpinningpytest==7.4.4for reproducible test runs. - Changed: All documented
pythoninvocations now readpython3(stock macOS / Windows Python ship aspython3). - Added:
scripts/install.shnow creates.venv/and installs pytest into it.
- Added:
- After edits, run
rg -n "^python |\"python " AGENTS.md README.md automaton/dashboard/README.md prompts/orchestrate.md— expect ZERO matches for barepythoncommands. - Run
rg -l "^from __future__ import annotations" automaton/dashboard/and confirmscope.py,board.py, andui/app.py(and any other dashboard module using PEP 604X | Yannotations) are listed. If a dashboard module uses PEP 604 at definition time and lacks the future import, add it. Do NOT add it to modules that don't use PEP 604 — keep the change surgical. - Confirm on stock Python 3.9.6:
python3 -c "import automaton.dashboard.core.scope, automaton.dashboard.core.board, automaton.dashboard.ui.app"exits 0 withoutTypeError.
Acceptance criteria
pip3 install -r requirements.txtexits 0.python3 -m pytest tests/ -vexits 0 (N passed, 0 errors).python3 -m py_compile automaton/**/*.py automaton/dashboard/**/*.py scripts/*.pyexits 0.bash -n scripts/*.shexits 0.bash scripts/install.shexits 0 and creates.venv/containing pytest.rgsweep from requirement 8 returns zero matches.- Streak: 10 consecutive
python3 -m pytest tests/ -vruns all clean. Cap: 5 attempts. Reset on first failure.
Anti-spin rails
- If a test fails for a reason OTHER than missing pytest, STOP and report — do not edit the failing test. It is subtask-3's job to add/fix tests; subtask-1 only makes existing tests runnable.
- If
python3 -m pytest tests/ -vfails because of avram_detect.pyimport in test_vram_detect.py, STOP and report. That's a bug in subtask-2's scope. - Do NOT add
pytest-cov,pytest-mock,tox, or any other dep.
Recommended approach
- Write
requirements.txt. pip3 install -r requirements.txt.- Run
python3 -m pytest tests/ -v. If it fails on missing pytest for OTHER reasons, stop and report (do not patch tests). - Sweep docs/prompts with
edit(batch by file; usereplaceAll=truefor thepython→python3substitution within each file). - Append venv block to
scripts/install.sh. - Write CHANGELOG entry.
- Run streak verifier:
for i in $(seq 1 10); do python3 -m pytest tests/ -q || break; done. If all 10 pass, done. Otherwise reset up to 5 times.