hyperhive/swarm-queue-client/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 3b038425f2 fix(#3987): join the agent-status key with a dot so a hive's write grant can be scoped
A KV entry publishes to $KV.<bucket>.<key> and NATS wildcards match whole
.-delimited tokens, so a /-joined {hive}/{agent} key is a single token: the
only expressible write grants are one exact subject per agent (needs a roster
in the auth responder, which Policy::hive_name argues against) or a bucket-wide
wildcard that lets any hive overwrite any other hive's agents.

Joining with a dot puts the hive in its own token, so hive_subjects can grant
$KV.agent-status.<hive>.* — every agent of one hive and nothing else, the same
containment hive-status already has.

The grant lands with the bucket-open pair (STREAM.INFO + STREAM.CREATE):
open_or_create resolves the bucket before it writes, so alone the publish
subject is unreachable and the sweep fails one step later instead.

Verified the client accepts a dotted key rather than assuming it: async-nats
0.50.0 VALID_KEY_RE is \A[-/_=.a-zA-Z0-9]+\z and is_valid_key rejects only
empty / leading / trailing dot; the subject is prefix + key verbatim.
2026-09-02 20:30:30 +02:00
..
agent_status.rs fix(#3987): join the agent-status key with a dot so a hive's write grant can be scoped 2026-09-02 20:30:30 +02:00
lib.rs hive-c0re: publish each agent's status upward to the swarm queue (#3341 item 1) 2026-09-02 09:01:38 +02:00
notices.rs swarm-queue-client: drop notices::PREFIX, reuse STREAM 2026-08-24 14:34:37 +02:00
status.rs fix(#3297): reject a publish template that names no hive 2026-08-17 17:34:27 +02:00
wanted.rs feat(#3124): publish the agent set the swarm declares for each hive 2026-09-02 02:32:36 +02:00