hyperhive/swarm-controller/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 8cc7f90c98 log: send records natively to journald, keep stdout off-unit
A record written to stdout carries no priority, so journald files the
whole stream at one level and the swarm log store shows `info` whatever
level `tracing` gave it. Under a systemd unit the process's stdout
already *is* the journal, so the fix is to speak the journal protocol
directly and let each record carry its own severity.

New `hive-log` crate holds the one sink chooser, called by `hive-c0re`,
`hive-agent` and `swarm-controller`. It builds the same `EnvFilter`
those binaries always built, then installs exactly one layer — never
both, since a journald layer stacked on the `fmt` layer under a unit
stores every record twice.

The choice is an fstat compare, not a presence test: a child inherits
`$JOURNAL_STREAM` even when its own stdout was redirected elsewhere, so
the variable existing proves nothing. The crate parses `dev:inode` out
of it and compares both numbers against an fstat of stdout, the
descriptor the `fmt` layer writes to by default. No match, unset, or
unparseable takes the `fmt` branch. A journald layer that fails to
construct despite a match falls back to `fmt` and warns through it —
a process must never fail to start because of its logger.
2026-09-21 15:52:57 +02:00
..
agent_identity.rs swarm: mint, publish and login-verify an agent's store identity at create 2026-09-18 15:05:24 +02:00
agent_state_stream.rs swarm: publish each agent's turn-state header on its own subject 2026-09-14 15:12:23 +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-queue-client: request the bearer-authz scope when minting an agent token 2026-09-17 09:51:44 +02:00
config_pr.rs swarm-controller: fix stale route reference in snapshot's doc comment 2026-08-19 22:27:12 +02:00
forge.rs swarm-controller+swarm-ui: merge config-PR into GET /api/agents/status 2026-09-02 14:18:02 +02:00
issue_report.rs swarm-controller: fix broken intra-doc link in issue_report.rs 2026-08-31 18:50:38 +02:00
main.rs log: send records natively to journald, keep stdout off-unit 2026-09-21 15:52:57 +02:00
matrix_account.rs matrix: make the hive-internal main account an ordinary matrixAccounts entry 2026-09-18 09:34:44 +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
read_policy.rs swarm: say the read policy names the hive it is written for 2026-09-12 11:41:01 +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
term_stream.rs term_stream: drop hive from the URL, resolve it from agent_status 2026-09-13 18:08:33 +02:00
vcs_metrics.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
wanted.rs swarm-controller: trim oversized comments, drop a trivial wrapper fn 2026-09-18 22:59:29 +02:00
webhook.rs remove the two remaining as_str-style wrappers (DeliveryKind::parse, Wanted::parse) 2026-09-12 00:06:31 +02:00