swarm-queue-client: the wanted-state bucket, opposite in direction to status
The controller declares each hive's wanted agent set; the hive reads its own key. Deliberately not a mirror of `status`, which the module documents as a table: authored by the controller rather than the hive, DECLARED rather than observed, and — the row that decides how it must be built — unrecoverable if the store is lost, where status regenerates because every hive republishes what it is. Two open functions rather than one shared `open_or_create`. `status` shares its constructor because either end may legitimately arrive first on a fresh swarm; here the writer is single and known, so the hive gets a read-only open returning `Option` and holds no grant to create the bucket. Its absence is the ordinary pre-publication state, not an error a hive could fix. Absence is also not a deletion order, which the module says at the place an implementer will meet it: swarm-side lifecycle does not yet cover agents that predate it, so a hive finding no key has learned nothing about what it runs — converging to an empty set would tear those down. No consumer yet. This is the half that is invariant under the scope semantics and cadence still being decided.
This commit is contained in:
parent
a73cc83ee6
commit
1e80e52f3c
2 changed files with 87 additions and 0 deletions
|
|
@ -164,6 +164,13 @@ pub fn chain(error: &dyn std::error::Error) -> String {
|
|||
/// which is the disagreement this module exists to prevent.
|
||||
pub mod status;
|
||||
|
||||
/// The bucket the controller declares each hive's wanted agent set in — the
|
||||
/// opposite direction from [`status`], and deliberately not a mirror of it.
|
||||
/// Status is *observed* and republishes itself; this is *declared* and nothing
|
||||
/// recreates it, which is why the module documents its own durability and its
|
||||
/// "absence is not a deletion order" rule rather than inheriting either.
|
||||
pub mod wanted;
|
||||
|
||||
/// The subject the swarm controller publishes on when the hive-wide knowledge
|
||||
/// repository has changed. One writer, many readers — every hive subscribes.
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue