- **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).
2.8 KiB
Verdict: fix-harness-command-template
Status: PASS
Summary
Fixed the non-functional default harness.command in scripts/loop-runner.py. The v1 default used --prompt-file and --cwd flags that do not exist in opencode run. Fix introduces a new {prompt_content} substitution token (single argv element under subprocess.run list mode; no shell expansion; safe for prompts with quotes/dollar signs/etc.) and changes the default to ["opencode", "run", "--dir", "{cwd}", "{prompt_content}"]. {prompt} and {cwd} tokens retained for backwards compatibility with custom harness commands.
SPEC compliance
| Requirement | Status |
|---|---|
R1 — {prompt_content} substitution token |
✓ |
R2 — New default ["opencode", "run", "--dir", "{cwd}", "{prompt_content}"] |
✓ |
R3 — No hardcoded --model in default |
✓ |
| R4 — No per-role harness command override (out of scope) | ✓ |
R5 — Test stub updates (4 _make_loop helpers) |
✓ |
| R6 — Design doc update (technical.md §8, §9) | ✓ |
R7 — Backwards compat ({prompt}, {cwd} retained) |
✓ |
| Harness agnosticism section added to SPEC | ✓ |
| Pi Dev example test case (test 8 in SPEC plan) | ✓ (implemented as test 7 in test_harness_command.py; SPEC numbering shifted, intent preserved) |
Bug reports
- BUG_REPORT: 5 observations, all non-blocking.
- ADVERSARIAL_BUG_REPORT: 7 attack vectors probed; one LOW bug found (A5: UnicodeDecodeError not caught) — fixed inline by broadening the
exceptclause to(OSError, UnicodeDecodeError). No blockers remaining.
Test results
python3 -m py_compile scripts/loop-runner.py✓python3 -m pytest tests/test_harness_command.py -v— 7 passedpython3 -m pytest tests/ -q— 440 passed (was 433; +7 new; no regressions)
D-items applied
- D-H1
{prompt_content}is a single argv element (no shell expansion) - D-H2
{prompt}retained for backwards compat - D-H3 no hardcoded
--modelin default - D-H4 no per-role override in this task
Harness-agnostic contract
Preserved and extended. The runner core has zero harness awareness. D8 (no model/provider inspection) intact. The new {prompt_content} token makes the framework MORE harness-agnostic than v1 by covering harnesses that prefer a message argument (Pi Dev, aider, any CLI taking a prompt as a positional). Non-opencode users override harness.command in loop.json.
Pipeline
research → research:awaiting_approval → research:approved → implement → code_review → code_review:awaiting_approval → code_review:approved → bug_find → adversarial_bug_find → doc_review → referee → complete
Pipeline driven end-to-end. Ready for --transition complete (which will relocate this task to tasks/complete/ per the move-completed-tasks-to-complete-folder feature).