Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/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
..
agent_config hive-c0re: fail on an unparseable resource-limits or topology file, write both atomically 2026-09-27 02:41:38 +02:00
dashboard swarm-ci-runner: run the forge CI runner as a swarm service 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
job_queue hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
lifecycle agents: shorten bind_child_agent_dirs doc under the comment-block limit 2026-10-05 13:24:36 +02:00
socket_server hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
stats agents: work/ in the disk-metric docs, holder never sees work/, chown guard comment 2026-10-05 13:23:39 +02:00
stores hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
workers hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
actions.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
container_view.rs hive-c0re: fail on a malformed agent name and on an unreadable container list 2026-09-27 05:13:21 +02:00
coordinator.rs agents: define the work dir name once and test its creation 2026-10-05 13:10:18 +02:00
dashboard_events.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
gateway_nginx.rs gateway: $connection_upgrade does not come from recommendedProxySettings 2026-09-02 09:04:24 +02:00
loose_ends.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
main.rs agents: work/ in the disk-metric docs, holder never sees work/, chown guard comment 2026-10-05 13:23:39 +02:00
matrix.rs matrix: drop the per-hive appservice and its unused token 2026-10-05 07:48:17 +02:00
meta.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
migrate.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
paths.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
priv_client.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
server.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
snapshot_push.rs refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
swarm_agent_status.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_notices.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_queue.rs swarm-queue-based lifecycle notices, replacing push_todo(MANAGER_AGENT) 2026-08-24 14:34:37 +02:00
swarm_status.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
test_env.rs test(hive-c0re): one crate-wide lock for env-mutating tests 2026-08-19 01:38:54 +02:00