feat(devnet): resolve local file server and SOGS alongside the devnet - #117
Closed
mpretty-cyro wants to merge 4 commits into
Closed
feat(devnet): resolve local file server and SOGS alongside the devnet#117mpretty-cyro wants to merge 4 commits into
mpretty-cyro wants to merge 4 commits into
Conversation
FILE_SERVER_URL and COMMUNITY_LINK embed the devnet host, which varies per environment, so both had to be maintained by hand next to the DEVNET_* values. resolve_devnet.ts now derives them from the already-resolved service-node IP, with the room token and name read from the SOGS /rooms API. Both services are probed independently and treated as optimisations: whichever is reachable is emitted, whichever is not is warned about and omitted, leaving the harness on the production file server and remote community. The devnet itself must still resolve. The two server pubkeys are baked deterministic keys that neither service exposes over HTTP, so they are built-in constants with an env override. The resolved IP is used rather than the bootstrap hostname because the app reaches both services over onion requests through the snodes, and containers cannot resolve mDNS .local names.
The reachability probe is now the resolve step itself. The previous curl form (`-w '%{http_code}' ... || echo 000`) produced "000000" on a failed connection, which compared unequal to "000" and reported an unreachable devnet as reachable.
curl's exit status is now the signal. The fallback also suppressed an errexit abort under the runner's default `bash -e`, so the status is captured with `|| CURL_RC=$?` rather than a bare assignment.
DEVNET_URL was hardcoded to 'http://sesh-net.local:1280', which stopped resolving. isDevnetReachable() therefore always reported the devnet unreachable and every AQA run failed with "Cannot use AQA build without internal network access" before running a test. The address now comes from DEVNET_BOOTSTRAP_HOST — the same value both regression workflows expose as the DEVNET_BOOTSTRAP input — resolved per call, since run/constants/index.ts does not load .env and a constant there could not read it reliably. The default and the address parsing are shared with scripts/resolve_devnet.ts so the two cannot drift, and that shared module stays dependency-free so the script continues not to see .env.
mpretty-cyro
force-pushed
the
fix/auto-detect-devnet
branch
from
July 30, 2026 06:49
89d8ad4 to
0b47831
Compare
Collaborator
|
I think this should be soon closed in favor of #121 |
Collaborator
|
Closed in favor of #121 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FILE_SERVER_URL and COMMUNITY_LINK embed the devnet host, which varies per environment, so both had to be maintained by hand next to the DEVNET_* values.
resolve_devnet.ts now derives them from the already-resolved service-node IP, with the room token and name read from the SOGS /rooms API. Both services are probed independently and treated as optimisations: whichever is reachable is emitted, whichever is not is warned about and omitted, leaving the harness on the production file server and remote community. The devnet itself must still resolve.
The two server pubkeys are baked deterministic keys that neither service exposes over HTTP, so they are built-in constants with an env override. The resolved IP is used rather than the bootstrap hostname because the app reaches both services over onion requests through the snodes, and containers cannot resolve mDNS .local names.