Skip to content

test(sessionservice): pin the --host default/env/flag behavior for local runners#265

Merged
dkrattiger merged 3 commits into
mainfrom
panopticon/fix-local-runner-host-default
Jul 14, 2026
Merged

test(sessionservice): pin the --host default/env/flag behavior for local runners#265
dkrattiger merged 3 commits into
mainfrom
panopticon/fix-local-runner-host-default

Conversation

@dkrattiger

Copy link
Copy Markdown
Contributor

Summary

  • Investigated "local runners pass in a host machine which breaks sessions" — traced to host.py's --host CLI default falling back to socket.gethostname(), which the terminal supervisor's attach_command() treats as "remote" and wraps in ssh -t <host>, breaking local tmux attach.
  • The root-cause fix already landed on main in fix(sessionservice): default --host to "" so local runner doesn't SSH-wrap attaches #257 (default --host to "" instead of the local hostname) — that PR shipped with no regression test for the default itself.
  • This PR adds that missing coverage: extracts build_arg_parser() out of main() (which is # pragma: no cover, endless-loop wiring) so the parser can be built and inspected without running the daemon, then pins three cases — no env/flag set → host == "", PANOPTICON_RUNNER_HOST set → used, and --host flag overrides the env var.

Full root-cause writeup is in the plan artifact (plan.md) on this task.

🤖 Generated with Claude Code

dkrattiger and others added 2 commits July 9, 2026 21:28
The host daemon's --host default fell back to socket.gethostname() when
neither --host nor PANOPTICON_RUNNER_HOST was set, so every runner --
including a purely local one -- registered a truthy host. The terminal
supervisor treats any truthy runner_host as remote and wraps tmux attach
in `ssh -t <host>`, which breaks attach for local-only setups. Default to
None instead, matching the None-is-local contract the rest of the chain
(attach_command, the dashboard, the switch-file) already expects.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…runner-host-default

# Conflicts:
#	src/panopticon/sessionservice/host.py
@dkrattiger
dkrattiger marked this pull request as ready for review July 9, 2026 21:39
…runner-host-default

# Conflicts:
#	src/panopticon/sessionservice/host.py
@dkrattiger
dkrattiger merged commit ebee999 into main Jul 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants