hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 35c3f724f1 glue-matrix-bao-token: retry a failed login, keep degrading on an empty read
The unit treats every failure as permanent: it prints why and `exit 0`s,
with no `Restart=`, so one bad moment costs the whole boot. Two of its
failure modes deserve that and one does not.

`bao login` fails when the store is unreachable, sealed, or has not been
given this host's cert-auth role yet. All three are transient. Measured
on this morning's rebuild:

  11:24:05  Started Container 'swarm-bao'
  11:24:06  could not log in to swarm-bao with this host's certificate
  11:24:07  Success! Data written to: auth/cert/certs/swarm-secret-publisher

It lost by one second, and stayed degraded for the boot. The publisher
next to it hit the same race and recovered on its first retry, because it
has `Restart=on-failure`.

`bao kv get` returning nothing is the opposite: the store answered, and
holds no token at that path. A retry cannot improve it, so that branch
keeps `exit 0` and the local token.

The bound is sized for this race, not for an unseal.
`swarm-bao-controller-policy` waits 2880 x 30s because a shamir unseal is
a human action and that unit blocks nothing. This one is `Before=` the
homeserver's container, so every retry is time the homeserver may spend
waiting -- 4 x 15s covers a container-start race with margin, and a store
still sealed after it degrades exactly as it does today.

`StartLimit*` are `[Unit]` settings and are ignored under `[Service]`, so
they are top-level attrs here. The module-eval case asserts the window
outlasts `RestartSec x burst`, since a burst that cannot be reached is a
unit that looks like it retries and does not.

Refs #4303
2026-09-12 16:10:45 +02:00
..
agent-modules docs, mcp.nix: an overridable default is not unconditional, and there are four subagent tools 2026-09-11 16:58:12 +02:00
docs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
host-modules glue-matrix-bao-token: retry a failed login, keep degrading on an empty read 2026-09-12 16:10:45 +02:00
packages swarm-ui: make it installable as a PWA 2026-09-12 11:30:20 +02:00
templates refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
checks.nix hive-forge: add markdown-docs generator and CI freshness check 2026-09-02 19:38:34 +02:00
devshell.nix types: let nix own the reserved-name blacklist 2026-08-27 16:36:42 +02:00
module-eval.nix glue-matrix-bao-token: retry a failed login, keep degrading on an empty read 2026-09-12 16:10:45 +02:00
reserved-hive-fragments.nix swarm: extract the name guards, so the module just says what is forbidden 2026-08-31 18:50:15 +02:00
reserved-names.nix swarm: refuse hive names that CONTAIN a word identifiers are composed from 2026-08-31 18:50:15 +02:00
rust.nix docs(rust): the dep-cache comment no longer describes two consumers 2026-08-11 22:29:56 +02:00
sources.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
treefmt.nix treefmt: format the web files with prettier 2026-09-02 15:25:07 +02:00