hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 772482a52a fix(#2898): carry hive/swarm display names as build-time options
The OTEL resource attributes are baked into every agent's
managed-settings.json at evaluation time, but claude-settings.nix read
the names from the container's environment.variables - where they are
never set. meta.rs forwards them as runtime env only, so the reader hit
its "unknown" fallback and every agent shipped

    service.name=hyperhive-agent,agent=<a>,hive=unknown,swarm=unknown

on every metric, while the same process's env held pr1ma/constellation.
Measured in this container's /etc/claude-code/managed-settings.json.

The map from forwarded env var to agent option already existed for the
service URLs, with a doc comment naming this exact hazard: "setting only
one leaves the other on its default". The names were simply never added
to it. They are now, and the constant is renamed FORWARDED_VAR_OPTIONS
since it no longer holds only URLs.

hyperhive.hiveName / hyperhive.swarmName follow the forge.url shape:
nullOr str defaulting to null, where null means the hive did not name
itself and "unknown" is an honest label rather than a guess baked at
eval time.

Also fixes, unasked: CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX reads the
same value, so remote-control sessions were named "unknown-<agent>".

Gated with nix, not just cargo - the blast radius here is module eval,
which fmt/clippy/test cannot see:

  agent-base assertions            -> [] (no failures)
  extendModules with both options  -> hive=pr1ma,swarm=constellation

Note the value is baked, so every agent needs a rebuild before the new
label appears on its metrics.
2026-08-01 12:35:50 +02:00
..
agent-modules fix(#2898): carry hive/swarm display names as build-time options 2026-08-01 12:35:50 +02:00
docs refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
host-modules refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
packages feat(#2642): a github.com notification poller alongside the forge one 2026-07-31 17:23:18 +02:00
templates refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
checks.nix fix(#2550): make pedantic clippy lints a hard error, fix stale checks.nix comment 2026-07-17 01:58:27 +02:00
devshell.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
rust.nix fix: select rust sources via filesets so new dirs keep the cargo cache 2026-07-13 21:16:29 +02:00
sources.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
treefmt.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00