Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-controller/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas e2da5509ae swarm-ci-runner: run the forge CI runner as a swarm service
The CI runner was a hive deploy module: hive-ci.nix ran it beside the
forge, and hive-c0re registered it through the forge's admin API with
the `core` token, writing the registration token through hive-priv. It
could only run on the forge's host, and it kept an admin-scoped forge
token on a hive.

Now the runner is a swarm service:

- swarm-ci-runner.nix runs it in a `swarm-ci-runner` container on the
  host that sets deploy.ci-runner.enable, reaching the forge by name.
  It needs neither the forge nor a hive there.
- swarm-controller reads the forge's runner registration token with its
  own admin token and writes it to swarm/services/ci-runner/
  registration-token whenever it differs from what it last wrote. Its
  grant on that path is create/update only.
- The runner's own leaf (CN swarm-ci-runner, role and policy of the same
  name) reads that one path. swarm-bao-ci-runner.service fetches it into
  the runner's EnvironmentFile and restarts the runner on a change.
- A pre-start step removes .runner when the daemon's journal since its
  last start holds Forgejo's "unregistered runner" refusal (the daemon
  exits 1 when its startup Declare gets it), or when .runner names
  another forge address; upstream's pre-start step then registers again.

Removed from the hive side: hive-ci.nix and deploy.forgejo.ci.*,
forge/ci_runner.rs, PrivRequest::RegisterCiRunner and its handler and
ReadWritePaths entry, InfraContainer::Ci with hivectl's --ci and the
dashboard's hive-ci journal entry, HYPERHIVE_FORGE_CI_ENABLED, and
read:admin,write:admin from CORE_TOKEN_SCOPES: nothing else in hive-c0re
calls /api/v1/admin/*. The old ci options, under both swarm.forge.ci and
deploy.forgejo.ci, now fail evaluation naming deploy.ci-runner.

The forge's half of the old ci.enable, the actions/checkout mirror and
DEFAULT_ACTIONS_URL = self, is deploy.forgejo.actionsFromSelf.

Closes #4954
2026-10-05 13:55:37 +02:00
..
forge swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
matrix_account swarm-controller: revoke matrix admin from former operators 2026-10-05 12:39:02 +02:00
agent_icon.rs swarm: let an agent publish its own icon 2026-09-28 13:47:37 +02:00
agent_identity.rs swarm-secret-client: agents may list their own subtree; controller rewrites agent policies 2026-10-01 17:43:28 +02:00
agent_input.rs swarm UI: send a message to an agent, without its hive 2026-10-04 03:02:14 +02:00
agent_renewal.rs swarm-controller: first credential-renewal pass waits for the queue connection 2026-09-30 15:46:56 +02:00
agent_state_stream.rs swarm-controller: the term and state stream 404/500 text describes a per-agent stream 2026-10-04 22:24:51 +02:00
agent_status.rs swarm-ui: add agent start/stop, backed by the wanted-state route 2026-09-02 19:57:04 +02:00
auth.rs swarm options: no swarm.* value depends on a deploy option or this host's hive 2026-10-04 18:13:47 +02:00
config_pr.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
forge.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
forge_account.rs use a neutral forge name in link-form placeholders, schema examples and tests 2026-10-04 15:51:20 +02:00
github_account.rs swarm-controller: inject the account store so link-route tests use the fake 2026-10-04 08:43:24 +02:00
issue_report.rs swarm-controller: answer 404, not 503, for an issue-report on a nonexistent repo 2026-09-24 16:38:47 +02:00
linked_accounts.rs use a neutral forge name in link-form placeholders, schema examples and tests 2026-10-04 15:51:20 +02:00
main.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
matrix_account.rs swarm-controller: make authelia's operators matrix homeserver admins 2026-10-04 16:45:08 +02:00
otel_http_client.rs swarm-queue-client: request the bearer-authz scope when minting an agent token 2026-09-17 09:51:44 +02:00
queue_identity.rs swarm-controller: read the queue client secret from the store, drop the file 2026-09-28 19:01:05 +02:00
read_policy.rs swarm-secret-client: agents may list their own subtree; controller rewrites agent policies 2026-10-01 17:43:28 +02:00
schedules.rs swarm: named scheduled prompts for one or more agents, fired in each agent 2026-10-04 17:24:57 +02:00
status.rs swarm-controller: make status::render/row pub(crate) so agent_status.rs's doc links resolve 2026-09-02 10:20:29 +02:00
store.rs fix doc-comment pointers broken by the module-eval split 2026-09-20 04:31:08 +02:00
subagent_term.rs swarm-controller: drop the relay subscription to the refused hive-scoped agent subject 2026-10-04 22:24:51 +02:00
term_stream.rs swarm-controller: the term and state stream 404/500 text describes a per-agent stream 2026-10-04 22:24:51 +02:00
vcs_metrics.rs swarm-controller: read the queue client secret from the store, drop the file 2026-09-28 19:01:05 +02:00
wanted.rs swarm-controller: first credential-renewal pass waits for the queue connection 2026-09-30 15:46:56 +02:00
webhook.rs config PRs: remove the hive's config-PR webhook, poll and core merge 2026-10-02 23:13:03 +02:00