fix: handle plugin base URL for host binding#512
Conversation
Use the listener binding metadata to choose the plugin fetch/SSE base URL so concrete non-loopback --host values receive a reachable server URL instead of always using 127.0.0.1. Preserve loopback behavior for default, localhost, wildcard, and mixed listener setups, and add listener selection coverage. Make the existing git clone destination test portable so the server test suite runs without skipped tests.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/26679740183 Artifacts expire in 7 days.
|
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Gatekeeper review for latest PR state. Assumption: the requested scope is review/validation only, not code changes. Findings: No blocking code-quality or regression findings from static review of the PR diff. The listener-base-url change is tightly scoped, preserves the old loopback preference for local/default and mixed HTTP/HTTPS setups, and correctly avoids advertising Non-blocking quality notes:
Validation attempted:
I did not mutate dependencies to repair the local worktree. Based on static review, I do not see a reason to block this PR, but I cannot claim independent local test/typecheck success from this run. -- |
|
Hey @omercnet Thanks for the PR |
|
I noticed an error in opencode logs, seems that when host is customized (in my case to a tailscale ip) it's not load via file but defaults to https://127.0.0.1:9898 |
|
Can you confirm what url the codenomad sets in the inline opencode variable for loading codenomad plugin from packages/codenomad-plugin packages/server |
|
Confirmed from the current PR code. The inline OpenCode config variable is const opencodeConfigContent = buildOpencodeConfigContent(
resolveExistingOpencodeConfigContent(userEnvironment),
this.codeNomadPluginUrl,
)
For loading the CodeNomad OpenCode plugin, the URL/spec inserted into
So: plugin loading itself is not via The HTTP(S) URL from this PR is a different variable used by the loaded plugin to call back into CodeNomad: CODENOMAD_BASE_URL: serverBaseUrlThe plugin reads that in baseUrl: requireEnv("CODENOMAD_BASE_URL")Then it builds plugin API/SSE URLs as: ${CODENOMAD_BASE_URL}/workspaces/${CODENOMAD_INSTANCE_ID}/plugin/eventsThat means an OpenCode log mentioning This PR changes the value feeding -- |
Summary
Validation
Notes