Skip to content

feat(runners): a coder runner created from the console (runners 17d, #309) - #960

Merged
aixle-com[bot] merged 12 commits into
developfrom
feature/runners-17d-coder-runner
Dec 1, 2026
Merged

aixle-com[bot] merged 12 commits into
developfrom
feature/runners-17d-coder-runner

Conversation

@NOX73

@NOX73 NOX73 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

What

Row 17d of docs/design/agent-runtimes/runner-coder.md §14: the coder runner type end to end, behind the console. Sessions run on Coder workspaces that the platform provisions, installs aixle-runner on, and deletes after each session (fresh). Nobody can create the type from the UI yet (17e): Adapter::UNRELEASED_TYPES = %w[coder] refuses creation in Core::Management.save and keeps the type out of available_types.

  • Runners::Adapters::Coder < Provisioned and its seam Adapters::Coder::Workspaces (names only ::Coder::Interface, Holder, Errors). Hooks: provision/prepare (allocate(wait: false)), inject_bootstrap (VM, sudo and systemd checks, then the install over SSH with Settings.runners.install_timeout), teardown!, check_health (§7.3, Coder asked at most every 5 min), observe, launch_refusal, new_environment, listed_environments, machine_counts. Coder errors map as ExhaustedError to CapacityError, OperationError/QuotaError to ProvisionError.
  • coder in Adapter::REGISTRY and ConfigSchema without the template keys, on_release and the if/then rule.
  • Core::Allocation.reconcile! (+ Interface.reconcile!, RunnerHealth::ReconcileActivity scheduled after the health check): overdue build under a session that no longer retries, failed to tearing_down, tearing_down retried (longest-waiting first), sweep of the holds of gone environments (delete first, release on :gone). Settings.runners.max_teardowns_per_run caps its own retries and sweeps, not a session's own cleanup.
  • Integration removal: migration relaxing runners_coder_integration for deleted runners, has_many :runners counts only runners not deleted, removal nulls deleted runners' reference and is refused while one has an environment that is not gone.
  • Coder::Core::Commands.exec! gains stdin_data: (the install script is piped to sh); Interface delegates it unchanged.
  • docs/architecture/runtime-layers.md: guarantee 13, guarantee 11 for coder, "Adding a runtime or a runner type".

Design deviations

  • The reconciler reuses Adapter#advance! (now advance!(env, now:) on the base and manual) to fail an overdue environment, and Adapter#teardown! for the sweep of gone environments (window: one day), so no adapter method is added. Retries go to the environment attempted longest ago (touch per attempt), so a refused delete cannot starve the others.
  • No Go runner change was needed.

Checks of runner-coder.md §17

  • The worker image has the coder CLI: yes, the application image (Dockerfile, CODER_CLI_VERSION).
  • Staging: the Docker daemon, disk and pruning of the template, and the ten QA cases, are for the QA step.

Tests

Adapter (coder_test.rb), reconciler (reconcile_test.rb), sessions on a coder runner with Coder behind WebMock (runner_coder_session_test.rb), integration removal, registry. Run on a Coder workspace: the runner, coder, container-runtime, model, state-machine, temporal and db suites pass, with the layering tests. rubocop and brakeman are clean.

@aixle-com aixle-com Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review of head 95a8233: one [Must], two [Recommendation]. Details inline.

Comment thread app/services/runners/core/allocation.rb Resolved
Comment thread app/services/runners/core/allocation.rb Resolved
Comment thread app/services/runners/adapters/coder.rb Resolved
Comment thread app/models/integration.rb Resolved

@aixle-com aixle-com Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 7107c15: the four decisions of #126711 (Q1 to Q4) are implemented as decided, tests and all 17 checks pass. No remarks.

@aixle-com
aixle-com Bot merged commit afaa405 into develop Dec 1, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant