Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
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
-
auth_ok()accepts a non-executable home install. At.agents/skills/lib_py/agents/adapters/opencode.py:317-321, thePATHcandidate is checked byshutil.which, but the home candidate is accepted byos.path.existsalone. Reproduction: with a temporary HOME containing.opencode/bin/opencodemode0644, an empty PATH, and no XDG variables,adapter.auth_ok()returnedTrue.create_session.shnow 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.isfileandos.access(..., os.X_OK)), and cover a non-executable file and directory in the auth tests. -
The placeholder regex can discard a real draft.
.agents/skills/lib_py/agents/adapters/opencode.py:76-79makes the example suffix optional, so the pattern matches the exact user textAsk anything…. Replaced the captured prompt line in the 2.x home fixture with that text andextract_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. -
Five newly added Mac tests fail before exercising
_ro_connect. Intests/test_issue60_linux_fixes.py:153-155, thecleanfixture closes a WAL-mode connection and assumes macOS SQLite removes both sidecars. On this Mac the files remain after close, somake("clean")returnsopencode.db,opencode.db-shm, andopencode.db-waland the assertion at:181fails before the query runs. This affects the five_descendants,_has_session,discover,residual_artifacts, andverify_artifactparameterizations. 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]