Files
multi-agent-mux/.agents/reports/planner-reviewer-codex-01/report-40dda79c.md
T

3.4 KiB

PR #62 / Issue #60 Linux follow-up review

Scope. Reviewed base 1d7b7dab58a10fe86fd747b7290d47674ca93230 through head 6a4e385a78c8a561d5cf3644336de6a352ea9271 in the assigned review-only worktree. HEAD and tree matched the brief; the worktree was clean. No source files, branches, services, or user data were changed.

NOT PASS findings

  1. auth_ok() accepts a non-executable home install. At .agents/skills/lib_py/agents/adapters/opencode.py:317-321, the PATH candidate is checked by shutil.which, but the home candidate is accepted by os.path.exists alone. Reproduction: with a temporary HOME containing .opencode/bin/opencode mode 0644, an empty PATH, and no XDG variables, adapter.auth_ok() returned True. create_session.sh now relies on this result as its preflight, so it can report the installation as functional and proceed although the CLI cannot be executed. Check that the home candidate is a regular executable file (e.g. os.path.isfile and os.access(..., os.X_OK)), and cover a non-executable file and directory in the auth tests.

  2. The placeholder regex can discard a real draft. .agents/skills/lib_py/agents/adapters/opencode.py:76-79 makes the example suffix optional, so the pattern matches the exact user text Ask anything…. Replaced the captured prompt line in the 2.x home fixture with that text and extract_input_region() returned ''. Thus the existing input-empty signal loses this exact draft and can treat a non-empty prompt as idle. The observed 2.x placeholder fixtures include an opening quote and example, including the truncated narrow capture; constrain the pattern to that observed shape and add the exact-short-text draft as a regression case. Other tested similar strings are retained.

  3. Five newly added Mac tests fail before exercising _ro_connect. In tests/test_issue60_linux_fixes.py:153-155, the clean fixture closes a WAL-mode connection and assumes macOS SQLite removes both sidecars. On this Mac the files remain after close, so make("clean") returns opencode.db, opencode.db-shm, and opencode.db-wal and the assertion at :181 fails before the query runs. This affects the five _descendants, _has_session, discover, residual_artifacts, and verify_artifact parameterizations. Normalize the fixture to a genuine no-WAL state after closing/checkpointing the writer (or construct the clean database in rollback-journal mode) before asserting the directory contents.

Validation. On macOS / Python 3.9.6, ran the focused suite with temporary HOME/TMPDIR, XDG variables unset, the required environment scrub, PYTHONDONTWRITEBYTECODE=1, -p no:cacheprovider, and an external temporary basetemp:

tests/test_issue60_linux_fixes.py tests/test_a4_adapter_contract.py tests/test_issue31_purge_residual.py tests/test_issue50_dispatch.py

Result: 189 passed, 5 failed (136.27s). All five failures share the clean-fixture setup issue above; the other WAL states and remaining focused tests passed. A separate no-WAL temporary DB probe exercised verify_artifact, discover, _has_session, _descendants, and residual_artifacts; each returned the expected result and left only opencode.db. The non-executable-file probe reproduced finding 1; the captured-pane probe reproduced finding 2. git diff --check and bash -n on the changed create/stop scripts passed. No actual OpenCode service or real data was accessed. Linux was not independently rerun in this turn.

[VERDICT: NOT PASS]