Restore archived tasks, fix dashboard scroll-reset, bind ornith, add Playwright smoke test
- **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).
This commit is contained in:
@@ -0,0 +1 @@
|
||||
complete
|
||||
@@ -0,0 +1,2 @@
|
||||
research:approved|2026-06-22T13:56:13.904635+00:00|user
|
||||
code_review:approved|2026-06-22T14:06:37.059516+00:00|user
|
||||
@@ -0,0 +1,19 @@
|
||||
# Adversarial Bug Report: fix-can-edit-path-prefix
|
||||
|
||||
## Summary
|
||||
Adversarial review of the path prefix fix. No additional bugs found.
|
||||
|
||||
## Bugs Found
|
||||
No bugs found.
|
||||
|
||||
## Analysis
|
||||
- **Security — symlink bypass**: `Path(args.file).resolve()` resolves symlinks before comparison, so a symlink inside the project pointing outside would be resolved to the real path and correctly rejected. Good.
|
||||
- **Trailing slash**: The `== proj_str` clause handles the edge case where `file_path` is exactly the project directory. `Path.resolve()` strips trailing slashes, so this is robust.
|
||||
- **Case sensitivity**: On macOS (default filesystem is case-insensitive), `Path.resolve()` does not normalize case. A file at `/Users/user/Project/file.py` would not match project `/Users/user/project`. This is consistent with the original behavior and not a regression.
|
||||
- **Framework vs project**: The fix applies `os.sep` to both `proj_str` and `auto_str` checks — consistent across all 5 locations.
|
||||
- **Empty file path**: `args.file` is required by argparse for `--can-edit --file` and `--scope-check`, so empty paths are not reachable.
|
||||
|
||||
## Score
|
||||
0
|
||||
|
||||
ADVERSARIAL_BUG_FIND_COMPLETE
|
||||
@@ -0,0 +1,16 @@
|
||||
# Bug Report: fix-can-edit-path-prefix
|
||||
|
||||
## Summary
|
||||
The fix correctly prevents sibling-directory bypass at all 5 locations in status.py.
|
||||
|
||||
## Bugs Found
|
||||
No bugs found.
|
||||
|
||||
## Verification
|
||||
- `str(file_path).startswith(proj_str + os.sep) or str(file_path) == proj_str` correctly handles both files inside the directory and the directory itself.
|
||||
- All 5 locations use the same consistent pattern.
|
||||
- `Path.resolve()` is called on `file_path`, so symlinks are resolved before comparison.
|
||||
- 3 tests pass: sibling-rejection, subdirectory-acceptance, can-edit-task.
|
||||
|
||||
## Score
|
||||
0
|
||||
@@ -0,0 +1,15 @@
|
||||
# Code Review: fix-can-edit-path-prefix
|
||||
|
||||
## Summary
|
||||
Fixes path prefix matching at 5 locations to prevent sibling-directory bypass.
|
||||
|
||||
## Findings
|
||||
- **Correctness**: `str(file_path).startswith(proj_str + os.sep) or str(file_path) == proj_str` correctly handles both files inside the directory and the directory itself. The `os.sep` ensures the boundary is a path separator, preventing `/home/user/project-evil` from matching `/home/user/project`.
|
||||
- **Consistency**: All 5 locations use the same pattern — good.
|
||||
- **Edge cases**:
|
||||
- A file exactly at `proj_str` (the project root itself) is handled by the `== proj_str` clause.
|
||||
- Symlinks: `Path.resolve()` is called on `file_path`, so symlinks are resolved before comparison. This is correct.
|
||||
- **Tests**: 3 tests cover the sibling-rejection, subdirectory-acceptance, and can-edit-task scenarios.
|
||||
|
||||
## Verdict
|
||||
APPROVED — no issues found.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Doc Review: fix-can-edit-path-prefix
|
||||
|
||||
## Summary
|
||||
No documentation updates needed. The `--can-edit` and `--scope-check` commands' external behavior is unchanged — only the internal path comparison logic was fixed.
|
||||
|
||||
## Findings
|
||||
- README.md, AGENTS.md, and contracts/harness-integration.md document `--can-edit` and `--scope-check` usage but not the internal path comparison implementation.
|
||||
- The fix does not change any command-line interface, output format, or exit code.
|
||||
- No user-facing behavior change for valid use cases (only invalid sibling-directory bypass is now correctly rejected).
|
||||
|
||||
## Verdict
|
||||
No doc changes required.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Implementation: fix-can-edit-path-prefix
|
||||
|
||||
## Changes
|
||||
- **scripts/status.py** `cmd_can_edit()` (5 locations): Replaced `str(file_path).startswith(proj_str)` with `str(file_path).startswith(proj_str + os.sep) or str(file_path) == proj_str` to prevent sibling-directory bypass. Same fix applied to `auto_str` (framework directory) checks.
|
||||
- Line ~986: `--can-edit --project --file` scope check
|
||||
- Line ~1039: `--can-edit --task --file` framework case
|
||||
- Line ~1045: `--can-edit --task --file` regular project case
|
||||
- Line ~1082: `--scope-check` project check
|
||||
- Line ~1087: `--scope-check` framework check
|
||||
|
||||
## Test
|
||||
- `tests/test_status.py::TestCanEditPathPrefix` — 3 tests: sibling directory rejected by scope-check, subdirectory accepted by scope-check, sibling directory rejected by can-edit --task --file.
|
||||
@@ -0,0 +1,30 @@
|
||||
# Spec: fix-can-edit-path-prefix
|
||||
|
||||
## Problem
|
||||
`--can-edit` and `--scope-check` in `scripts/status.py` use `str(file_path).startswith(proj_str)` to verify a file is within the project directory. String `startswith` matches sibling directories: `/home/user/project-evil/file.py` matches prefix `/home/user/project`. This allows editing files outside the project boundary.
|
||||
|
||||
Affected locations:
|
||||
- `scripts/status.py:951` (`--can-edit --project --file`)
|
||||
- `scripts/status.py:1004` (`--can-edit --task --file`, framework case)
|
||||
- `scripts/status.py:1010` (`--can-edit --task --file`, regular project case)
|
||||
- `scripts/status.py:1047` (`--scope-check`)
|
||||
- `scripts/status.py:1052` (`--scope-check`, framework check)
|
||||
|
||||
## Fix
|
||||
Append a trailing path separator to the prefix before comparison:
|
||||
```python
|
||||
str(file_path).startswith(proj_str + os.sep)
|
||||
```
|
||||
Or use `Path.relative_to()` which correctly resolves path boundaries:
|
||||
```python
|
||||
try:
|
||||
file_path.relative_to(project_dir.resolve())
|
||||
except ValueError:
|
||||
# out of scope
|
||||
```
|
||||
|
||||
## Acceptance Criteria
|
||||
- A file in `/home/user/project-evil/` is correctly rejected as out-of-scope when project is `/home/user/project`
|
||||
- A file in `/home/user/project/subdir/` is correctly accepted as in-scope
|
||||
- Both framework and regular project cases work
|
||||
- Add a test in `tests/test_status.py` covering the sibling-directory edge case
|
||||
@@ -0,0 +1,27 @@
|
||||
# Verdict: fix-can-edit-path-prefix
|
||||
|
||||
## Status: PASS
|
||||
**Completion Date**: 2026-06-22
|
||||
|
||||
## Summary
|
||||
The fix correctly prevents sibling-directory bypass at all 5 locations in status.py. All tests pass.
|
||||
|
||||
## Findings
|
||||
- `str(file_path).startswith(proj_str + os.sep) or str(file_path) == proj_str` correctly handles path boundaries.
|
||||
- All 5 affected locations use the same consistent pattern.
|
||||
- Bug Finder found no bugs. Adversarial Bug Finder confirmed no issues with symlinks, trailing slashes, or case sensitivity.
|
||||
- No contradictions between the two reports.
|
||||
- Test coverage added: `TestCanEditPathPrefix` (3 tests covering sibling rejection, subdirectory acceptance, and can-edit-task).
|
||||
- All 242 tests pass.
|
||||
|
||||
## Tasks for Review / Tie-Breaks
|
||||
None.
|
||||
|
||||
## Remaining Issues
|
||||
None.
|
||||
|
||||
## Score
|
||||
+10 (PASS)
|
||||
|
||||
## Reviewer Comments
|
||||
|
||||
Reference in New Issue
Block a user