Skip to main content

Module backpressure_notice

Module backpressure_notice 

Source
Expand description

BackoffNoticePayload - typed wire payload for the backpressure protocol per docs/internal/superpowers/specs/2026-06-23-backpressure-runtime.md §2.

The framework synthesizes one of these whenever BackpressureTracker::observe_overload returns super::BackpressureDecision::EmitNotice. The payload is serialized with bincode (matches the universal SlotValue wire encoding at bb-ir/src/slot_value.rs:194-196), stamped with a stable type_hash discriminator, packed into a single crate::envelope::SlotFill inside a crate::envelope::WireEnvelope addressed to the originating sender, and pushed onto the receiver’s OutboundQueue.

Receivers detect the notice by matching the per-fill type_hash against backoff_notice_type_hash in their inbound envelope routing - the framework intercepts BackoffNotice envelopes before data-plane / control-plane dispatch so user Components never see them. Sender-side handling updates the sender’s crate::framework::BackoffTable so the existing BackoffGateTx consultation gates the next outbound send to that peer.

Structs§

BackoffNoticePayload
Wire-encoded BackoffNotice payload.

Enums§

BackoffCauseWire
Wire-stable encoding of BackoffCause. Serialized as a u8 so the on-wire representation never bit-shifts when the framework enum evolves. Always derived from the framework enum at the send site + mapped back at the receive site.

Constants§

BACKPRESSURE_DOMAIN
Domain string the framework uses to namespace the backpressure protocol per bb-runtime/src/bus.rs:155 reserved framework prefix. Surfaced for cross-referencing in docs + tests; the actual routing key is the per-fill type_hash from backoff_notice_type_hash.

Functions§

backoff_notice_type_hash
Stable u64 discriminator for BackoffNoticePayload. Matches the canonical SlotFill.type_hash the framework stamps at send time and consults at receive time per bb-ir/src/slot_value.rs:203-210.
build_backoff_notice_envelope
Build a BackoffNotice wire envelope addressed to sender.