Repository navigation
Match enrolled nodes exactly, check their Core address and serve artifacts only from the console - #144
Merged
Conversation
…e address - POST /core/v1/sandbox/enrollment-tokens returns a non-secret enrollment_id. Registration copies it to the node, and the node list and detail report it (null for nodes enrolled before Core recorded it). Migration 000077. - POST /api/v1/sandbox-node/enroll requires core_url, the origin the node stores. A missing value gets 400 (param core_url); an address other than the public URL gets 409 sandbox_node_address_mismatch before the token is consumed. The node records the address it sent. parsar-sandbox-node sends it. - Node services keep retrying while Core is unreachable (RestartSec=5s, no start limit). parsar-sandbox-node exits 78 when Core rejects its credential, as after removal, and RestartPreventExitStatus=78 ends the restarts. - Nodes and self-hosted executors download artifacts only from their console, never from a release URL the build recorded. /console/config reports the providers whose node assets the console holds (node_artifacts). - The node installer explains Core's registration answer (address changed, command expired) with fixed text.
…retryable - Artifact and metadata downloads refuse every redirect. The console never redirects, and following one could fetch verified names from another origin. This covers the self-hosted installer's SHA256SUMS and manifest.json. - After a 409 sandbox_node_address_mismatch, the node installer removes the unregistered files that name the old address (installation.json, provider.json, state/node), so a new command registers the same host. Core never recorded the node and the token was not used. A command whose Core address changed before registration now says the public URL changed. - Only Core's 401 stops the node for good (exit 78); a 403 from a proxy or firewall stays retryable. - CONTRIBUTING describes only what main does: sudo mode is planned for phase 2b, and Web's exact enrollment_id match lands with the Web follow-up. - Tests: exit codes of parsar-sandbox-node, redirect refusal, state cleanup and a node_artifacts list that is [] without a node payload.
# Conflicts: # docs/api/web-management.md # services/core-console/node_installation.go
…load now requires
This was referenced Sep 25, 2026
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.
Summary
Phase 2a of the new-user install work is the Core side of adding a node with one command. The installer's sudo mode (2b) follows separately.
enrollment_id:POST /core/v1/sandbox/enrollment-tokensreturns a non-secretenrollment_id, a random UUID that is not derived from the token. A node records it at registration, and the/core/v1/sandbox/nodeslist and detail return it (null for older nodes). With it, Web can match the node a command registered exactly. Migration000077_node_enrollment_id.POST /api/v1/sandbox-node/enrollnow requirescore_url.sandbox_node_address_mismatch. That is checked before the token is consumed, so a retry with the right address works until the token expires.parsar-sandbox-nodesends the address.parsar-sandbox-nodeexit 78, which systemd does not restart./console/configaddsnode_artifacts, the providers whose node files the console holds. It is checked on every request and is always an array. The config keeps all five fields.sandbox-deployment.mdand the machine OpenAPI are updated.Behaviour change: a local node installed from a thin bundle now needs the release assets placed in
<bundle>/artifacts/, because the GitHub fallback is gone. The install guide says so.Review
82e20013: 409 cleanup, 403 no longer permanent, CONTRIBUTING wording, exit-code table test, test placement, andnode_artifactsas an array. These were verified by tests and the gate, per the small-fix rule.Verification
b2e05a27, the exact head, which includes main97a617d7(Give deployment default model providers one home and close the self-hosted model gap #140, Park rejected self-hosted executors and replace their credential in place #142): passed.Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.