Skip to main content

Module fleet_forward

Module fleet_forward 

Source
Expand description

The receiving end of a Swarm broadcast forwarded between channels of one install, and the confirmation that decides how it is delivered.

A forward is the person’s own broadcast (the user-voice header, MessageOrigin::broadcast()) only when another instance on this machine confirms it sent that forward from the operator’s window. Any other forward is delivered as an ordinary agent message from swarm-forward, labelled self-declared. The sending instance keeps what it is about to forward in memory (vouch_for_forward, called only by fleet_broadcast_impl, which only the operator’s window reaches) and answers a confirmation once, for exactly that forward; a confirmation carries the body’s SHA-256, never the words. An answer counts only when the listener that gives it is an AgentMux instance: one held by a process inside an agent’s process tree, or one the system cannot identify, does not count and the forward is delivered as an ordinary agent message, with the audit saying which case it was.

Structs§

VouchedForward 🔒

Enums§

ForwardProof 🔒
What asking the other instances found, and so how the forward is delivered.
ForwardedAs 🔒
How a forwarded broadcast was delivered.
Standing 🔒
Who holds the listener that would answer a confirmation.

Constants§

VOUCH_FOR 🔒

Statics§

VOUCHED_FORWARDS 🔒
The broadcasts this instance has sent on to another channel and not yet had confirmed.

Functions§

ask_instance 🔒
Asks one instance whether it sent this forward. Its answer counts only when the listener that gives it is an AgentMux instance and not a process inside an agent’s process tree: that is checked before the question is sent, and again on the answer (the same processes must still hold the listener).
body_digest 🔒
The SHA-256 of a forwarded body, in hex: what a confirmation carries instead of the words themselves.
candidate_instances 🔒
The loopback address and key of every other instance on this machine that might have sent a forward: the shared agent registry’s entries and the shared instance registry’s live records, so a channel with no agent registered is asked too.
candidates_from 🔒
The addresses to ask, in the order found, each once: never this instance, and only loopback ones. An instance record is listed only while its srv lives; either source is a file any local process can write, so each address is looked at (who listens there) before it is asked.
confirm_forward 🔒
Whether this instance sent exactly this forward (the body given by its SHA-256): true once, and the entry is spent.
confirm_target 🔒
The base URL a confirmation is sent to: the IPv4 loopback address of url, as a literal address.
deliver_forward 🔒
deliver_forwarded_broadcast 🔒
The receiving end of forward_broadcast_to_channel. A forward that another instance of this machine confirms it sent (from the operator’s window) is delivered as the person’s broadcast: the header is built here, from the target’s own agent id, as any broadcast turn (MessageOrigin::broadcast()). Any other forward is delivered as an ordinary agent message from swarm-forward, labelled self-declared, never as the person. Audited on this side too, naming which of the two it was.
deliver_unconfirmed_forward 🔒
A forward nobody confirmed: an ordinary message to the agent from the sender name swarm-forward, through the same delivery as any unattributed one (labelled self-declared, never host-verified).
forward_confirmed_by_a_sender 🔒
Asks the other instances on this machine (never this one) whether one of them sent this forward. The channel that did answers yes, once.
listener_standing 🔒
The standing of the listener at url. It reads the process table, so it runs off the async threads.
listener_standing_now 🔒
loopback_addr 🔒
http://127.0.0.1:<port> (or localhost) as an address; anything else is not looked up.
standing_from 🔒
The standing of what was found listening. agent_holding(pid) names the agent whose process tree holds pid; agent_pids lists every process in every agent’s tree; descriptors(pid) says whether a process’s descriptors can be read.
vouch_for_forward 🔒
Records a forward this instance is about to send (called only for a real operator broadcast).
vouched 🔒