plannotator icon indicating copy to clipboard operation
plannotator copied to clipboard

Clarify PLANNOTATOR_REMOTE=false semantics or add explicit remote disable

Open foxytanuki opened this issue 7 months ago • 1 comments

TL;DR

PLANNOTATOR_REMOTE should probably be treated as a tri-state flag:

  • true / 1 => force remote mode
  • false / 0 => force local mode
  • unset => fall back to legacy SSH auto-detection

The current behavior only gives explicit meaning to the true side, which makes false look supported while still being ignored.

Summary

PLANNOTATOR_REMOTE=false currently does not explicitly disable remote mode. The code only treats 1 and true as explicit enable values, then still falls back to legacy SSH detection. That makes false look meaningful to users while not actually overriding SSH_TTY / SSH_CONNECTION.

This should be aligned one way or the other:

  • either document that false is ignored and only 1 / true matter
  • or make PLANNOTATOR_REMOTE=false explicitly force local mode and bypass SSH fallback

Current behavior

  • Bun runtime:
    • PLANNOTATOR_REMOTE === "1" || "true" => remote
    • otherwise, if SSH_TTY or SSH_CONNECTION is set => still remote
    • remote mode uses fixed port 19432 by default unless PLANNOTATOR_PORT is set
  • Pi runtime behaves the same way.
  • Bun has tests for 1, true, and SSH detection, but none for false.
  • Pi has the same runtime behavior, but main does not currently appear to have dedicated tests for this detection logic.

Acceptance criteria

  • Pick and document the intended semantics for PLANNOTATOR_REMOTE=false
  • Align Bun and Pi runtimes to that decision
  • Add test coverage for the chosen false behavior
  • Update env-var docs and any devcontainer or remote guidance accordingly

foxytanuki avatar Apr 04 '26 05:04 foxytanuki

Released in v0.17.0. PLANNOTATOR_REMOTE=0 / false now explicitly forces local mode.

backnotprop avatar Apr 06 '26 20:04 backnotprop