Repository navigation
brain port: the review's fixes for #477 (#490) - #491
Open
teaspoonai wants to merge 1 commit into
Open
teaspoonai wants to merge 1 commit into
teaspoonai wants to merge 1 commit into
Conversation
desktop-ed's independent review of #490, after its merge: - install.sh: a GATEWAY_TOKEN that is empty once read as the brain reads it (GATEWAY_TOKEN="", '' or blanks) is no token. resolve_gateway_token reused it, wrote the quotes into the plugin's and the bridge's configs, and the brain, which read it as unset, refused to start, so the installer's restart failed: the repair the troubleshooting page names. One reader, env_value (the last line wins, blanks and one pair of quotes dropped), for resolve_gateway_token and wait_for_idle; an empty result mints a new token. - /settings/health, which the LAN reaches through the front door, wants the owner's Settings session or the operator's token, as /settings/api/config does (the user's call). It named the key's credit, the agent's key state and the update channel. /health on the brain's own port, which listens on the device alone, stays open for the CLI and the installer. The page sends the token on its health fetch too. - BRAIN_LISTEN: a wildcard beside another address of its family (0.0.0.0,127.0.0.1) never binds both: refused at start (exit 78), not a restart loop (exit 3). One address in two spellings is one. - The package's postinst seeds BRAIN_LISTEN=127.0.0.1,172.18.0.1 on a NemoClaw device without the line, before the restart, as install.sh --only brain does: a plain apt install no longer cuts the sandbox off. - Docs: on NemoClaw the bridge address answers machines on the LAN that route it via the device (the token still guards it); architecture's port table, brain/README and plugin/index.js no longer say ws://<host>:7861; troubleshooting names an empty token. - test_brain_port: the plain-bind check is skipped where ip_nonlocal_bind is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Follow-up to #490 (#477): the fixes from desktop-ed's independent review of #490, which reached main before the review did. rc8 is tagged after this.
Must fix: an empty token in brain.env
GATEWAY_TOKEN="",''or blanks is no token to the brain, which refuses to start (exit 78).resolve_gateway_tokenreused the text as it stood, quotes included, and wrote it into the plugin's and the bridge's configs. The installer's restart of the brain then failed underset -e. That broke the repair the troubleshooting page tells owners to run.env_value, reads an env file as systemd and the brain do: the last line wins, and surrounding blanks and one pair of quotes are dropped.resolve_gateway_tokenandwait_for_idleboth use it. An empty result mints a new token.Should fix
/settings/healthneeds a login (the owner's call). It's reachable from the LAN through the front door, and it showed the key's credit, the agent's key state and the update channel to anyone. It now wants the owner's Settings session or the operator's token, like/settings/api/config./healthon the brain's own port stays open. That port listens on the device alone, and the CLI and the installer read it.Minor fixes
BRAIN_LISTEN: a wildcard beside another address of its family, such as0.0.0.0,127.0.0.1, can never bind both. It's now refused at start (exit 78) instead of looping on restarts (exit 3). One address in two spellings counts as one.BRAIN_LISTEN=127.0.0.1,172.18.0.1before the restart on a NemoClaw device that has no such line, asinstall.sh --only braindoes. A plainapt installof the deb no longer cuts the sandbox off. A line that's already there stays.ws://<host>:7861, and they name the token;ip_nonlocal_bind=1.Tests
/settings/healthreturns 401 without a login, and 200 with a session or the operator's token, while/healthon the port stays open;env_value. They're fixed here and pass on their own.🤖 Generated with Claude Code