Local EnsureProjectOpencode failure is logged at Debug, remote at Warn #531

Closed
opened 2026-08-20 02:55:13 +02:00 by dries · 1 comment
Owner

Found during review of PR #523 (fix: relaunch a killed opencode on local create).

In the create-session handler, a failed local ensure is logged at Debug while the equivalent remote-path failure logs Warn. A host that should be able to launch opencode but can't (e.g. tmux missing, port bind failure) fails silently under default log levels — the user just sees a session that never comes up, with nothing in the logs.

Fix: log local ensure failures at Warn to match the remote path (or justify the asymmetry with a comment). One-line change plus, if practical, a log-level assertion in the existing handler test.

Found during review of PR #523 (fix: relaunch a killed opencode on local create). In the create-session handler, a failed local ensure is logged at `Debug` while the equivalent remote-path failure logs `Warn`. A host that *should* be able to launch opencode but can't (e.g. tmux missing, port bind failure) fails silently under default log levels — the user just sees a session that never comes up, with nothing in the logs. Fix: log local ensure failures at `Warn` to match the remote path (or justify the asymmetry with a comment). One-line change plus, if practical, a log-level assertion in the existing handler test.
Author
Owner

Validated against main @ 2d661364: fixed / moot. The Debug-logging local pre-ensure no longer exists on main — handleCreateSession only pre-ensures on the remote path (internal/server/handlers.go:482), and that failure logs Warn (handlers.go:489-492). No Debug-level ensure-failure log remains anywhere. If PR #523 lands and reintroduces a local pre-ensure, re-check the log level in that review instead. Closing.

Validated against main @ 2d661364: **fixed / moot**. The Debug-logging local pre-ensure no longer exists on main — handleCreateSession only pre-ensures on the remote path (internal/server/handlers.go:482), and that failure logs Warn (handlers.go:489-492). No Debug-level ensure-failure log remains anywhere. If PR #523 lands and reintroduces a local pre-ensure, re-check the log level in that review instead. Closing.
dries closed this issue 2026-08-20 09:22:37 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#531
No description provided.