- **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).
109 lines
3.5 KiB
Markdown
109 lines
3.5 KiB
Markdown
# SPEC: fix-install-update-flow
|
|
|
|
## Context
|
|
|
|
Five issues in the install/update flow need fixing: hardcoded git URL, `.venv` cwd bug, Windows venv path, hook copy-vs-symlink inconsistency, and missing `--version` smoke test.
|
|
|
|
## Non-Goals (deferred)
|
|
|
|
- Windows `schtasks` schedule installation testing -> v1.1 (needs Windows CI)
|
|
- `register-guards.sh` changes -> not in scope (guards work correctly)
|
|
- Automated update of copied hooks -> v1.1 (documented as "re-run install-hooks.sh")
|
|
|
|
## Requirements
|
|
|
|
### R1 -- User-supplied git URL (D11)
|
|
|
|
`install.sh` must accept the git URL as `$1` and refuse if absent:
|
|
|
|
```bash
|
|
GIT_URL="${1:-}"
|
|
if [ -z "$GIT_URL" ]; then
|
|
echo "ERROR: Git URL required."
|
|
echo "Usage: ./install.sh <git-url>"
|
|
echo "Example: ./install.sh https://github.com/user/automaton.git"
|
|
echo ""
|
|
echo "The framework is cloned to ~/.automaton. Choose your URL carefully"
|
|
echo "as it cannot be changed later without reinstalling."
|
|
exit 1
|
|
fi
|
|
git clone "$GIT_URL" "$FRAMEWORK_DIR"
|
|
```
|
|
|
|
Remove the hardcoded `http://10.37.0.86:3003/hermes/automaton` URL.
|
|
|
|
### R2 -- Fix `.venv` cwd bug
|
|
|
|
Move the venv setup inside the `else` block (after clone), using `$FRAMEWORK_DIR`:
|
|
```bash
|
|
# --- Python deps (idempotent, in framework dir) ---
|
|
if [ ! -d "$FRAMEWORK_DIR/.venv" ]; then
|
|
python3 -m venv "$FRAMEWORK_DIR/.venv"
|
|
fi
|
|
```
|
|
|
|
Use the venv's Python directly with `-m pip` (platform-aware path, see R3).
|
|
|
|
### R3 -- Windows venv path
|
|
|
|
Detect the venv Python path based on platform:
|
|
```bash
|
|
if [ -f "$FRAMEWORK_DIR/.venv/bin/python3" ]; then
|
|
VENV_PY="$FRAMEWORK_DIR/.venv/bin/python3"
|
|
elif [ -f "$FRAMEWORK_DIR/.venv/Scripts/python.exe" ]; then
|
|
VENV_PY="$FRAMEWORK_DIR/.venv/Scripts/python.exe"
|
|
else
|
|
VENV_PY="python3"
|
|
fi
|
|
"$VENV_PY" -m pip install --quiet --upgrade pip
|
|
"$VENV_PY" -m pip install --quiet -r "$FRAMEWORK_DIR/requirements.txt"
|
|
```
|
|
|
|
### R4 -- Hook copy-vs-symlink consistency
|
|
|
|
Change `update.sh` and `upgrade.sh` to use `cp` instead of `ln -sf`, matching `install-hooks.sh`:
|
|
|
|
In `update.sh`, replace:
|
|
```bash
|
|
ln -sf "$HOOK_SRC" "$HOOK_DST"
|
|
```
|
|
with:
|
|
```bash
|
|
cp "$HOOK_SRC" "$HOOK_DST"
|
|
chmod +x "$HOOK_DST"
|
|
```
|
|
|
|
In `upgrade.sh`, replace all `ln -sf` for hooks with `cp` + `chmod +x`.
|
|
|
|
### R5 -- `--version` smoke test
|
|
|
|
Add at the end of `install.sh` (inside the `else` block, after all setup):
|
|
```bash
|
|
# Verify framework is working
|
|
python3 "$FRAMEWORK_DIR/scripts/status.py" --version || echo "WARNING: status.py --version failed"
|
|
```
|
|
|
|
### R6 -- Tests
|
|
|
|
Write `tests/test_install_update_flow.py` with:
|
|
|
|
1. `test_install_sh_requires_git_url` -- verify install.sh checks for `$1` and refuses if empty
|
|
2. `test_install_sh_no_hardcoded_url` -- verify the hardcoded IP URL is gone
|
|
3. `test_install_sh_venv_in_framework_dir` -- verify `.venv` setup uses `$FRAMEWORK_DIR`
|
|
4. `test_install_sh_has_version_check` -- verify install.sh calls `status.py --version`
|
|
5. `test_install_sh_windows_venv_path` -- verify install.sh handles `.venv/Scripts/python.exe`
|
|
6. `test_update_sh_uses_cp_for_hooks` -- verify update.sh uses `cp` not `ln -sf`
|
|
7. `test_upgrade_sh_uses_cp_for_hooks` -- verify upgrade.sh uses `cp` not `ln -sf`
|
|
8. `test_install_hooks_sh_uses_cp` -- verify install-hooks.sh still uses `cp` (regression guard)
|
|
|
|
### R7 -- Documentation
|
|
|
|
- `CHANGELOG.md` under `[unreleased]`
|
|
- `README.md` -- update install instructions to show `./install.sh <git-url>`
|
|
|
|
## Verification
|
|
|
|
- `bash -n scripts/install.sh scripts/update.sh scripts/upgrade.sh` -- syntax check
|
|
- `python3 -m pytest tests/test_install_update_flow.py -v`
|
|
- `python3 -m pytest tests/ -q` -- full suite must remain green
|