Repository navigation
feat(runners): pin aixle-runner 0.1.0 in config/settings.yml; gateway services take named parameters (task #220) - #689
Conversation
… request checks in the services (task #220) - The runner pins move from config/runner_release.yml into the runners.release block of config/settings.yml; the add_source! loader is gone, and Runners::Release still fails boot on an invalid block. - Pin runner-v0.1.0: the linux-amd64 and linux-arm64 SHA-256 from the release's checksums.txt, recommended_version 0.1.0, min_version null. - Runners::Release::Offer loses platform, which nothing read. - Runners::Registration.register! takes the request body and raises every refusal in PROTOCOL.md 5.1 order; Runners::Operations.record_result! checks op_result.request and builds the stored result. The controllers only call them, and invalid_result joins REFUSAL_STATUS. - docs: the rule in implementation-patterns.md Error Handling, releasing.md, DESIGN.md, PROTOCOL.md, docs/index.md, CHANGELOG. Signed-off-by: Alex <[email protected]>
…fore stubbing the config Signed-off-by: Alex <[email protected]>
There was a problem hiding this comment.
Requesting changes for one [Must]: .github/workflows/runner-release.yml still names config/runner_release.yml. Apply the patch attached to task #220 before merge. The other two comments are non-blocking recommendations. Everything else matches the task: the pins in settings.yml, digests that match checksums.txt, the refusal order kept, and controllers that check only transport.
…task #220) Signed-off-by: Alex <[email protected]>
… split the boot test (task #220) Signed-off-by: Alex <[email protected]>
There was a problem hiding this comment.
Round 2 at 3c6ff59c. All round-1 findings are resolved: the workflow no longer names the deleted file, Settings.reload! is restored, the service helpers are private, and the boot test is split. CI is green with 17/17 checks. I left one non-blocking [Recommendation] (update the stale PR description before merge) and one [Note] (comment wrap). Approving.
There was a problem hiding this comment.
Changing my verdict from approve to request changes. The second review's [Must] on docs/architecture/implementation-patterns.md:208 is correct, and I missed it in round 2. docs/design/agent-runtimes/DESIGN.md §6.1, the "Request schemas (task #209)" paragraph at lines 1161–1170, still says the controllers call Runners::ProtocolSchema.valid? and answer the refusal, and that new gateway endpoints in 8b/8c follow that pattern. That contradicts task item 6, the new Error Handling rule, and the code. This PR doesn't touch that paragraph. Please rewrite it so that the services check and normalize bodies and raise Runners::Credentials::Refused, and the controllers keep transport checks and status mapping. No other changes are needed. My [Recommendation] (stale PR description) and [Note] (comment wrap) remain non-blocking.
…s handle transport (task #220) Runners::Registration.register! and Runners::Operations.record_result! take named parameters and never the request body. The gateway controllers check the headers (the register version refusals sit next to check_protocol), the body's shape against the protocol schema, and map the body by the wire rules. register.request.json lets a body that asks for ephemeral through, so the refusal order of PROTOCOL.md 5.1 is unchanged. DESIGN.md 6.1 and the Error Handling rule describe the layering. Signed-off-by: Alex <[email protected]>
There was a problem hiding this comment.
Round 3 at fb24fc32: the layering matches Alex's decision. Services take named parameters, and the controllers handle headers, the schema check and the wire-rule mapping. The gateway request tests are unchanged from develop, the docs agree with the code, and CI is green. I left one non-blocking [Recommendation] on how the schema and the controller decide ephemeral, which differ for 0.0. There are no [Must] findings.
There was a problem hiding this comment.
Changing my verdict to request changes after the second review. It found the same ephemeral: 0.0 divergence independently and rated it [Must], because the acceptance criterion says the register answers don't change and Alex decided the schema would use the same truth values as the Boolean cast. I agree, so this blocks the merge.
A fix can't live in the schema alone. JSON Schema treats 0.0 as equal to 0, and 0.0 also matches "type": "integer". So the controller has to keep the decision about ephemeral (for example, by checking the cast before the schema check, as develop did), or Alex has to accept the 0.0 change. Either option revisits round 2's "the controller doesn't need to know about ephemeral", so Alex should choose.
…ict strings (task #220) Alex's code review round 3 decision: no Rails boolean cast. The schema is the only definition of asking for ephemeral (const true); any other non-boolean value, and an os or arch that is not a string, is invalid_registration. Signed-off-by: Alex <[email protected]>
There was a problem hiding this comment.
Round 4: the delta fc1546a6 matches Alex's round-3 decision (strict boolean ephemeral, strict string os/arch), and its tests and docs are consistent. One [Must] remains: the branch conflicts with develop in config/settings.yml after #677 merged. Both runners: blocks need to be kept under one key, and CI needs to pass on the merged tree.
…s-0-1-0 * origin/develop: feat(coder): clone GitLab, Bitbucket and Azure DevOps repos in coder_prepare_repo (#703) fix(agents): show each runtime's own logo everywhere (#704) feat(teams): assign cards to a team and run triggers as a team (#701) feat(agents): collect the Copilot CLI transcript as a session log (#700) fix(agents): keep Grok and Antigravity conversations in the terminal scrollback (#698) feat(billing): redesign the Billing tab around active and previous subscriptions (#646) feat(web): switch the UI, admin, public pages and emails to Inter (#699) chore(deps): weekly dependency batch — aws-sdk-core 3.267 retry fix, prism 2, Mantine 9.7.5, runner Go 1.27.4 (#697) fix(board): leave archived tasks out of agent board listings (#690) feat(agents): add GitHub Copilot CLI as an agent runtime (#684) feat(runners): the callback proxy — the proxy sidecar, the host runner relay and the gateway proxy route (task #216, 8b) (#677) Signed-off-by: Rozhnov Alexandr <[email protected]>
…st headers Signed-off-by: Alex <[email protected]>
|
Addressed in |
Conflicts were between staging's feature-branch merges of #677, #684 and an earlier head of #689 and develop's squash-merges of #677/#684 (plus #700, #704). Each hunk takes develop's side (the final, reviewed version), except config/settings.yml, which keeps the runners.release block of #689, and CHANGELOG.md, which keeps both sides' entries. Staging-only content (#494) merged without conflict and is kept.
What
Follow-up of #676 (board task #220). It pins the first runner release and layers the runner gateway: transport in the controllers, named parameters in the services.
config/settings.yml.runners.releaseblock sits under the existingrunners:key. It has plain values (no ENV, no ERB) and keeps the comments of the old file.config/runner_release.ymlis deleted, along with theadd_source!line that loaded it.config/initializers/_config_settings.rbstays and holds onlySettings.reload!. The reload is needed because the config gem loadsSettingsbeforeDotenv.loadruns indevelopment.rb/test.rb.Runners::Releaseandconfig/initializers/runner_release.rbstay, so an invalid block still fails boot.grep -rn "runner_release.yml"finds nothing, including in.github/workflows/runner-release.yml(header comment and release-notes text).0.1.0:recommended_version: "0.1.0",min_version: null. Underbinaries, thelinux-amd64andlinux-arm64SHA-256 come from thechecksums.txtof runner-v0.1.0, downloaded withgh release download runner-v0.1.0 -R AixleHQ/flow -p checksums.txt:[Unreleased]/ Changed.Runners::Release::Offer#platformis removed, since nothing read it.docs/index.md: theoperations/releasing.mdentry now names runner compatibility and releasing the runner.check_protocolchecks the protocol and the version's form.registeronly,check_registration_versionruns next to it, after the token. It refuses a version over 255 characters (invalid_registration) and a version belowmin_version(runner_version_unsupported).invalid_registration,invalid_result).osorarchisnil,factsdefaults to{},auto_updatedefaults totrue,ephemeralisbody["ephemeral"] == true, andexit_codebecomes an Integer.register.request.jsonlets a body withephemeral: truepass, whatever the rest of it holds (if/then,const: true). The service then refuses such a body withephemeral_not_supported, so the refusal order of PROTOCOL.md §5.1 is unchanged: version length,min_version,ephemeral, then the body.ephemeralis a JSON boolean: any other value ("true",1,0.0,null) isinvalid_registration, with no Rails boolean cast.osandarchare optional strings of at most 255 characters: any other value,nullincluded, isinvalid_registrationinstead of being ignored. Protocol 1 isn't released, so nothing is kept for compatibility. Unknown fields are still ignored.Runners::Registration.register!(credential, name:, os:, arch:, facts:, ephemeral:, auto_update:, runner_version:, protocol_version:)refusesephemeral, strips the name, and saves the machine. The machine's validations refuse a blank name or a value over its column withinvalid_registration.Runners::Operations.record_result!(operation, status:, exit_code: nil, stdout: nil, stderr: nil, data: nil, error: nil)stores the known fields, with anilone left out.Runners::Credentials::Refused, which the base controller'srescue_frommaps throughREFUSAL_STATUS. The controllers' own refusals use the same codes. Statuses and codes are unchanged; theinvalid_registrationmessage for the body now also namesephemeraland stringos/arch.after/waitparsing stays inOperationsController.docs/architecture/implementation-patterns.md("Error Handling") and in DESIGN.md §6.1 ("Request schemas").Every reference to the old file is updated:
releasing.md("Runner compatibility", and step 3 of "Releasing the runner");fixtures/README.md;Interaction with #677
#677 adds
runners: proxy:tosettings.yml. This PR addsrelease:under the samerunners:key. Whichever PR merges second keeps both blocks under that one key.How to test
bin/rails test test/services/runners/ test/integration/runner_gateway_test.rb test/integration/runner_gateway_operations_test.rb test/integration/runner_gateway_releases_test.rb test/integration/runner_protocol_conformance_test.rb.runner_gateway_operations_test.rbis unchanged and passes.runner_gateway_test.rbkeeps its existing tests, including anephemeral: truebody that would otherwise fail the schema, which is still answeredephemeral_not_supported. It gains tests for the strict types:ephemeral: "true",1and0.0areinvalid_registration(with a valid or an invalid body),falseor absent registers, a non-stringosorarchisinvalid_registration, and an absent one registers asnil.register/boundaries.jsonnow expects422 invalid_registrationfor a non-stringosorarch.runner_gateway_releases_test.rb,GET /runner/v1/releases/0.1.0/linux-{amd64,arm64}answers302to the release asset, with the released digest inX-Aixle-Runner-Sha256. The test reads the committed pins, with no stub.register!andrecord_result!with named parameters. They cover theephemeralrefusal before the machine's validations, those validations, the stripped name, and the stored result.protocol_schema_test.rbcovers the schema'sephemeral: trueexemption, the strict booleanephemeraland the strict stringos/arch.release_test.rbchecks the committed block against the released digests. It also checks that an invalid block makesRunners::Release.pinsraiseInvalidPins.