recv: hoist RECV_BATCH_MAX into hive-sh4re, drop magic 5 in wake hint

This commit is contained in:
damocles 2026-07-02 22:22:03 +02:00 committed by mara
commit be5b36911a
3 changed files with 17 additions and 10 deletions

View file

@ -7,6 +7,16 @@ pub mod paths;
pub mod priv_proto;
pub mod wire_time;
/// Server-side hard cap on `Recv.max` (see `AgentRequest::Recv`). Bounds
/// the size of a single round-trip so a confused caller can't drain the
/// entire inbox in one go and blow past wire-buffer sizes; everything
/// above the cap silently clamps. 5 keeps individual turns small — a big
/// backlog is drained over several recv calls instead of one giant pop
/// (#2150). Lives here so both the enforcing side (hive-c0re's
/// socket_server) and the hinting side (hive-ag3nt's wake prompt + tool
/// docs) reference one constant instead of a scattered magic value.
pub const RECV_BATCH_MAX: u32 = 5;
// -----------------------------------------------------------------------------
// Host admin socket — /run/hyperhive/host.sock
// -----------------------------------------------------------------------------