Repository navigation
feat(runners): the runner release lane, the platform's version pins and release endpoints, and self-update with an opt-out (task #217) - #676
Merged
Conversation
…-update (task #217) Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
… runner compatibility, DESIGN row 10 Signed-off-by: Alex <[email protected]>
…version is recommended Signed-off-by: Alex <[email protected]>
Contributor
There was a problem hiding this comment.
Reviewed at head 0147488 against DESIGN.md §14 / §15 row 10, the task's decisions 1 to 4, and the project conventions. No blocking issues. Four [Recommendation] and two [Note] comments are inline, one of them about the attached runner-release.yml patch.
…ease-lane-self-update # Conflicts: # db/schema.rb
- update.DownloadTimeout is 2 minutes; DESIGN.md 14.4 says a session assigned during an update starts after the restart (no reservation) - the release requests carry neither protocol header, and the Go conformance harness checks each header's presence or absence - a download_url template that format cannot fill in fails boot - a runner version over 255 characters is invalid_registration before the min_version refusal - the published image sets AIXLE_RUNNER_NO_SELF_UPDATE=1 - the parsed pins are memoized; a test sends real pins through the Config gem - renumber the auto_update migration, which collided with develop's Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
…ease-lane-self-update
- The release endpoints answer Cache-Control: no-store before validation,
so the 400 and 404 refusals carry it too (PROTOCOL.md §2).
- The update offer is {version, sha256}: the runner builds its release
requests from its own platform URL, so url is dropped.
- configure treats AIXLE_RUNNER_NO_SELF_UPDATE as --no-auto-update.
- The host runner computes its effective self-update flag once.
Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
Contributor
There was a problem hiding this comment.
Code review round 3 at 1c381927: approved. All Fix CR round 2 decisions are implemented, with tests and fixtures. I added 1 [Recommendation] (the PR description still documents update.url) and 1 [Note] (Offer#platform is unused in production). Neither blocks the merge.
Signed-off-by: Rozhnov Alexandr <[email protected]>
NOX73
force-pushed
the
feature/runner-release-lane-self-update
branch
from
November 10, 2026 15:38
42b3939 to
e39cae0
Compare
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.
Task #217 (Runners 10), DESIGN.md §14 and §15 row 10.
What changed
The platform's pins.
config/runner_release.ymlis loaded intoSettings.runners.releaseand read throughRunners::Release, which validates it at boot (an invalid file fails boot). It holdsprotocol_supported,min_version,recommended_version,download_url(the asset URL template) and the SHA-256 of each binary. As committed it pins protocol[1]and no minimum, no recommendation and no binary, becauserunner-v0.1.0is not tagged yet. A follow-up PR pins0.1.0and its digests.The gateway.
GET /runner/v1/releases/:version/:os-:archanswers302to the pinned asset, withX-Aixle-Runner-Sha256from the pins.GET /runner/v1/releases/:version/checksumsreturns the same digests as JSON. Both are public (no token, no protocol headers). Anything unpinned is404 not_found, and a malformed version or platform is400 invalid_request(schemas/v1/releases.params.json).registerrefuses a runner belowmin_versionwith400 runner_version_unsupported. The message names the minimum, and the registration token is not spent.X-Aixle-Runner-Protocolis checked againstprotocol_supported.X-Aixle-Runner-Versionmust now be strict SemVer 2.0 (Runners::Version, ordered by SemVer precedence), as PROTOCOL.md said it would once the skew policy was built.GET /runner/v1/opshas no ops to return, its answer carriesupdate: {version, sha256}(decision 2). The update is computed after the wait, and only when all of these hold: the machine is registered, it holds no session, the request's version is belowrecommended_version, and the binary for the machine's os/arch is pinned. It is never sent when the runner'sconfig.auto_updateis false or the machine registered withauto_update: false.runner_environments.auto_update(default true).registertakes an optional booleanauto_update.The runner (Go).
internal/update: self-update. It runs only while no session container exists, only towards a newer version, and never with the machine's opt-out. It reads the checksums and the redirect from its own platform URL, and requires the three digests (update, checksums, redirect) to agree. It downloads into the directory of the running binary and checks the file withupdate.Verify, the hook that checks only the digest until releases are signed. Only then does it rename the file over the binary atomically and exit with code4. A tampered download is deleted, the old binary keeps running, and the same version is retried at most once an hour.configure --no-auto-updatesendsauto_update: falseand keeps the opt-out in the credentials file.service installcreates/var/lib/aixle-runner/bin, owned by theaixle-runneruser, and installs the binary there instead of the root-owned/usr/local/bin(decision 3). The unit'sExecStartpoints there and the unit hasRestart=always.aixle-runner versioncommand, which the lane uses to check the stamped version.PollOpsreturnsPoll{Ops, Update}, and there are newChecksumsandReleasecalls (the302is not followed).runner_version_unsupportedis classified as "update aixle-runner".gatewayOnlylists it with a reason; the list is empty.The image and the lane.
docker/runner/Dockerfileis the published image. It copies in the binaries the lane built, so the image and the release asset are the same binary. It runs as a non-root user and runs nothing at build time..github/workflows/runner-release.ymlis not in this PR, because agents cannot push.github/workflows/. It is attached to task feat(llm-calls): inline LLM calls view (#371) #217 asrunner-release.patchfor Alex to apply. Arunner-v*tag runs vet and tests, builds both static binaries with the version stamped in, writeschecksums.txt, checks the binaries and the image, pushesghcr.io/aixlehq/aixle-runner:X.Y.Zand creates a GitHub Release (--latest=false). Run byworkflow_dispatch, it is a dry run that builds and checks but pushes and releases nothing (decision 4). Thev*filters ofimages.ymlandrelease.ymldo not matchrunner-v*, andrunner-v*does not matchv*.Docs.
PROTOCOL.md§1 (strict SemVer, pinned protocols), §3 (new refusal), §5.1 (auto_update, the minimum), §5.4 (update), the new §5.6 and §5.7, and §7 (skew policy).release_pinssetup step.releasing.mdgains "Runner compatibility" and "Releasing the runner".Fixtures
releases/redirect,releases/checksums,releases/not_pinned,register/below_min_version,register/no_auto_update,ops/update_offered.headers/invalid_runner_versionnow refuses01.2.3,1.2.3-01and1.2.3-...How to test
cd runner && gofmt -l . && go vet ./... && go test -race ./...bin/rails test test/services/runners test/integration/runner_gateway_releases_test.rb test/integration/runner_gateway_test.rb test/integration/runner_gateway_operations_test.rb test/integration/runner_protocol_conformance_test.rb test/integration/process_mode_routes_test.rb