From d46d3c261b26404a2a2aadaef04c091ab5da68d7 Mon Sep 17 00:00:00 2001 From: damocles Date: Thu, 2 Jul 2026 21:41:53 +0200 Subject: [PATCH 1/6] recv mcp tool: default max to a small batch of 5 (wire default stays 1) --- docs/conventions.md | 10 +++++++--- docs/turn-loop.md | 2 +- hive-ag3nt/src/mcp.rs | 42 +++++++++++++++++++++++------------------- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/docs/conventions.md b/docs/conventions.md index 9bd03501..40d3b8f3 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -119,9 +119,13 @@ in `hive-c0re::dashboard_events::DashboardEvent`. `AgentRequest::Recv` is the only path that delivers messages to an agent. Always returns a list (`Messages { messages }`) — empty when -nothing's pending, single-pop when `max = None` (default 1, the -single-message behaviour), batched up to `max` when caller asks for -more (server-side cap is 32; values above clamp silently). +nothing's pending, single-pop when `max = None` (wire default 1), +batched up to `max` when the caller asks for more (server-side cap +is 32; values above clamp silently). The wire default MUST stay 1: +the harness turn loop sends `max: None` and consumes only the first +message, so a bigger server-side default would silently drop the +rest of a popped batch. The agent-facing `recv` MCP tool defaults to +`max = 5` at the tool layer instead (a small batch per call). `wait_seconds` long-polls for the first message; once one arrives — or one is already pending — the call drains up to `max` in total before returning, so a single `Recv` call coalesces a burst. diff --git a/docs/turn-loop.md b/docs/turn-loop.md index 7818e4cd..7909756e 100644 --- a/docs/turn-loop.md +++ b/docs/turn-loop.md @@ -519,7 +519,7 @@ ttl_seconds?, to?)`, `answer(id, answer)`, `ack_until(up_to)`. that carve-out is structural, keyed on parent relationship, not name). - `recv` — drain inbox. Without `wait_seconds` (or `0`) returns immediately. Positive value parks the turn up to that many seconds - (cap 180) — incoming messages wake instantly. `max` (default 1, cap + (cap 180) — incoming messages wake instantly. `max` (tool default 5, cap 32) drains up to N rows; `wait_seconds` applies to the first, then drains up to `max` total. Each returned row is prefixed with `[msg #]` (broker row id; note the highest id seen, then pass diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs index 8061e906..fea639de 100644 --- a/hive-ag3nt/src/mcp.rs +++ b/hive-ag3nt/src/mcp.rs @@ -611,13 +611,12 @@ pub struct RecvArgs { #[serde(default)] pub wait_seconds: Option, /// Maximum number of messages to pop in this round-trip. Default - /// (None) is 1 (single-message behaviour — exactly what you want - /// when you're called to drive a turn off the first wake). Pass - /// a higher value (capped at 32 server-side) when you've been - /// told the inbox has more queued (the wake prompt mentions - /// pending count) and want to drain everything in one tool call. - /// Once the long-poll wakes up, the call drains up to `max` in - /// total before returning — no extra round-trip needed. + /// (None) is 5 — a small batch, so a burst of related messages + /// lands in one call without an extra round-trip. Pass `max: 1` + /// for strict single-message behaviour, or a higher value (capped + /// at 32 server-side) when the wake prompt mentions a bigger + /// pending count. Once the long-poll wakes up, the call drains up + /// to `max` in total before returning. #[serde(default)] pub max: Option, } @@ -800,17 +799,18 @@ impl AgentServer { #[tool( description = "Pop messages from this agent's inbox. Returns one or more messages, or \ an empty marker if nothing is waiting. \n\n\ - **Single-message default**: with no args (or `max: 1`) you get the next message — \ - same behaviour the harness uses to drive a turn. Without `wait_seconds` (or with 0) \ - the call returns immediately — a cheap 'anything pending?' peek. Pass a positive \ - `wait_seconds` (capped at 180) to park the turn waiting for new work — incoming \ - messages wake you instantly, otherwise the call returns empty at the timeout. \ - That's strictly better than a fixed shell `sleep`. \n\n\ - **Batch drain**: pass `max: N` (capped at 32) to drain up to N messages in one \ - round-trip. Use this when the wake prompt told you the inbox has more queued, or \ - any time you expect a burst — one tool call beats N consecutive single recvs. \ - `wait_seconds` still applies to the FIRST message; once one arrives the call drains \ - up to `max` in total. Empty result reported the same way regardless of `max`. \n\n\ + **Small-batch default**: with no args you get up to 5 messages — a burst of \ + related messages lands in one call. Pass `max: 1` for strict single-message \ + behaviour. Without `wait_seconds` (or with 0) the call returns immediately — a \ + cheap 'anything pending?' peek. Pass a positive `wait_seconds` (capped at 180) to \ + park the turn waiting for new work — incoming messages wake you instantly, \ + otherwise the call returns empty at the timeout. That's strictly better than a \ + fixed shell `sleep`. \n\n\ + **Bigger drains**: pass `max: N` (capped at 32) when the wake prompt says the \ + inbox has more queued than the default batch — one tool call beats N consecutive \ + recvs. `wait_seconds` still applies to the FIRST message; once one arrives the \ + call drains up to `max` in total. Empty result reported the same way regardless \ + of `max`. \n\n\ Typical pattern: when you have nothing else useful to do, call \ `recv(wait_seconds: 180)` to park until something arrives." )] @@ -818,10 +818,14 @@ impl AgentServer { let log = format!("{args:?}"); run_tool_envelope("recv", log, async move { let waited = args.wait_seconds.is_some_and(|w| w > 0); + // Tool-layer default of a small batch (5). The wire default + // stays 1: the harness turn loop also sends `max: None` and + // consumes only the first message, so bumping the server-side + // default would silently drop the rest of a popped batch. let (resp, retries) = self .dispatch(hive_sh4re::Request::Recv { wait_seconds: args.wait_seconds, - max: args.max, + max: args.max.or(Some(5)), }) .await; annotate_retries(format_recv(resp, waited), retries) From ee45db6323397d24e4ca6e4142b8ff7de3d60250 Mon Sep 17 00:00:00 2001 From: damocles Date: Thu, 2 Jul 2026 22:09:51 +0200 Subject: [PATCH 2/6] Revert "recv mcp tool: default max to a small batch of 5 (wire default stays 1)" This reverts commit b8d608d4b6a7ed95faffdec8d8b3167ae8f3b39e. --- docs/conventions.md | 10 +++------- docs/turn-loop.md | 2 +- hive-ag3nt/src/mcp.rs | 42 +++++++++++++++++++----------------------- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/docs/conventions.md b/docs/conventions.md index 40d3b8f3..9bd03501 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -119,13 +119,9 @@ in `hive-c0re::dashboard_events::DashboardEvent`. `AgentRequest::Recv` is the only path that delivers messages to an agent. Always returns a list (`Messages { messages }`) — empty when -nothing's pending, single-pop when `max = None` (wire default 1), -batched up to `max` when the caller asks for more (server-side cap -is 32; values above clamp silently). The wire default MUST stay 1: -the harness turn loop sends `max: None` and consumes only the first -message, so a bigger server-side default would silently drop the -rest of a popped batch. The agent-facing `recv` MCP tool defaults to -`max = 5` at the tool layer instead (a small batch per call). +nothing's pending, single-pop when `max = None` (default 1, the +single-message behaviour), batched up to `max` when caller asks for +more (server-side cap is 32; values above clamp silently). `wait_seconds` long-polls for the first message; once one arrives — or one is already pending — the call drains up to `max` in total before returning, so a single `Recv` call coalesces a burst. diff --git a/docs/turn-loop.md b/docs/turn-loop.md index 7909756e..7818e4cd 100644 --- a/docs/turn-loop.md +++ b/docs/turn-loop.md @@ -519,7 +519,7 @@ ttl_seconds?, to?)`, `answer(id, answer)`, `ack_until(up_to)`. that carve-out is structural, keyed on parent relationship, not name). - `recv` — drain inbox. Without `wait_seconds` (or `0`) returns immediately. Positive value parks the turn up to that many seconds - (cap 180) — incoming messages wake instantly. `max` (tool default 5, cap + (cap 180) — incoming messages wake instantly. `max` (default 1, cap 32) drains up to N rows; `wait_seconds` applies to the first, then drains up to `max` total. Each returned row is prefixed with `[msg #]` (broker row id; note the highest id seen, then pass diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs index fea639de..8061e906 100644 --- a/hive-ag3nt/src/mcp.rs +++ b/hive-ag3nt/src/mcp.rs @@ -611,12 +611,13 @@ pub struct RecvArgs { #[serde(default)] pub wait_seconds: Option, /// Maximum number of messages to pop in this round-trip. Default - /// (None) is 5 — a small batch, so a burst of related messages - /// lands in one call without an extra round-trip. Pass `max: 1` - /// for strict single-message behaviour, or a higher value (capped - /// at 32 server-side) when the wake prompt mentions a bigger - /// pending count. Once the long-poll wakes up, the call drains up - /// to `max` in total before returning. + /// (None) is 1 (single-message behaviour — exactly what you want + /// when you're called to drive a turn off the first wake). Pass + /// a higher value (capped at 32 server-side) when you've been + /// told the inbox has more queued (the wake prompt mentions + /// pending count) and want to drain everything in one tool call. + /// Once the long-poll wakes up, the call drains up to `max` in + /// total before returning — no extra round-trip needed. #[serde(default)] pub max: Option, } @@ -799,18 +800,17 @@ impl AgentServer { #[tool( description = "Pop messages from this agent's inbox. Returns one or more messages, or \ an empty marker if nothing is waiting. \n\n\ - **Small-batch default**: with no args you get up to 5 messages — a burst of \ - related messages lands in one call. Pass `max: 1` for strict single-message \ - behaviour. Without `wait_seconds` (or with 0) the call returns immediately — a \ - cheap 'anything pending?' peek. Pass a positive `wait_seconds` (capped at 180) to \ - park the turn waiting for new work — incoming messages wake you instantly, \ - otherwise the call returns empty at the timeout. That's strictly better than a \ - fixed shell `sleep`. \n\n\ - **Bigger drains**: pass `max: N` (capped at 32) when the wake prompt says the \ - inbox has more queued than the default batch — one tool call beats N consecutive \ - recvs. `wait_seconds` still applies to the FIRST message; once one arrives the \ - call drains up to `max` in total. Empty result reported the same way regardless \ - of `max`. \n\n\ + **Single-message default**: with no args (or `max: 1`) you get the next message — \ + same behaviour the harness uses to drive a turn. Without `wait_seconds` (or with 0) \ + the call returns immediately — a cheap 'anything pending?' peek. Pass a positive \ + `wait_seconds` (capped at 180) to park the turn waiting for new work — incoming \ + messages wake you instantly, otherwise the call returns empty at the timeout. \ + That's strictly better than a fixed shell `sleep`. \n\n\ + **Batch drain**: pass `max: N` (capped at 32) to drain up to N messages in one \ + round-trip. Use this when the wake prompt told you the inbox has more queued, or \ + any time you expect a burst — one tool call beats N consecutive single recvs. \ + `wait_seconds` still applies to the FIRST message; once one arrives the call drains \ + up to `max` in total. Empty result reported the same way regardless of `max`. \n\n\ Typical pattern: when you have nothing else useful to do, call \ `recv(wait_seconds: 180)` to park until something arrives." )] @@ -818,14 +818,10 @@ impl AgentServer { let log = format!("{args:?}"); run_tool_envelope("recv", log, async move { let waited = args.wait_seconds.is_some_and(|w| w > 0); - // Tool-layer default of a small batch (5). The wire default - // stays 1: the harness turn loop also sends `max: None` and - // consumes only the first message, so bumping the server-side - // default would silently drop the rest of a popped batch. let (resp, retries) = self .dispatch(hive_sh4re::Request::Recv { wait_seconds: args.wait_seconds, - max: args.max.or(Some(5)), + max: args.max, }) .await; annotate_retries(format_recv(resp, waited), retries) From 78396c818957ad60a8b85bb2ecc68b3f57f7caef Mon Sep 17 00:00:00 2001 From: damocles Date: Thu, 2 Jul 2026 22:13:09 +0200 Subject: [PATCH 3/6] recv: cap batch size at 5, default stays 1 (#2150 clarified) --- docs/conventions.md | 2 +- docs/turn-loop.md | 2 +- hive-ag3nt/prompts/system.md | 2 +- hive-ag3nt/src/mcp.rs | 4 ++-- hive-ag3nt/src/serve_common.rs | 6 +++++- hive-c0re/src/socket_server.rs | 9 ++++----- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/conventions.md b/docs/conventions.md index 9bd03501..1a0d0283 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -121,7 +121,7 @@ in `hive-c0re::dashboard_events::DashboardEvent`. agent. Always returns a list (`Messages { messages }`) — empty when nothing's pending, single-pop when `max = None` (default 1, the single-message behaviour), batched up to `max` when caller asks for -more (server-side cap is 32; values above clamp silently). +more (server-side cap is 5; values above clamp silently). `wait_seconds` long-polls for the first message; once one arrives — or one is already pending — the call drains up to `max` in total before returning, so a single `Recv` call coalesces a burst. diff --git a/docs/turn-loop.md b/docs/turn-loop.md index 7818e4cd..e3a7db7f 100644 --- a/docs/turn-loop.md +++ b/docs/turn-loop.md @@ -520,7 +520,7 @@ ttl_seconds?, to?)`, `answer(id, answer)`, `ack_until(up_to)`. - `recv` — drain inbox. Without `wait_seconds` (or `0`) returns immediately. Positive value parks the turn up to that many seconds (cap 180) — incoming messages wake instantly. `max` (default 1, cap - 32) drains up to N rows; `wait_seconds` applies to the first, then + 5) drains up to N rows; `wait_seconds` applies to the first, then drains up to `max` total. Each returned row is prefixed with `[msg #]` (broker row id; note the highest id seen, then pass it to `ack_until` to bulk-triage the batch). **Graceful shutdown**: when the harness diff --git a/hive-ag3nt/prompts/system.md b/hive-ag3nt/prompts/system.md index 7f0a19db..df06b634 100644 --- a/hive-ag3nt/prompts/system.md +++ b/hive-ag3nt/prompts/system.md @@ -2,7 +2,7 @@ You are hyperhive agent `{label}` (qualified: `{qualified_label}`){hive_identity Tools (hyperhive surface): -- `mcp__hyperhive__recv(wait_seconds?, max?)` — drain inbox messages (returns `(empty)` if nothing pending). Without `wait_seconds` (or with `0`) it returns immediately — a cheap "anything pending?" peek you can sprinkle between tool calls. To **wait** for work when you have nothing else useful to do this turn, call with a long wait (e.g. `wait_seconds: 180`, the max) — incoming messages wake you instantly, otherwise the call returns empty at the timeout. That's strictly better than a fixed `sleep` shell command: lower latency on new work, no busy-loop. `max` (default 1, cap 32) drains several queued messages in one call — the wake prompt tells you the pending count. +- `mcp__hyperhive__recv(wait_seconds?, max?)` — drain inbox messages (returns `(empty)` if nothing pending). Without `wait_seconds` (or with `0`) it returns immediately — a cheap "anything pending?" peek you can sprinkle between tool calls. To **wait** for work when you have nothing else useful to do this turn, call with a long wait (e.g. `wait_seconds: 180`, the max) — incoming messages wake you instantly, otherwise the call returns empty at the timeout. That's strictly better than a fixed `sleep` shell command: lower latency on new work, no busy-loop. `max` (default 1, cap 5) drains several queued messages in one call — the wake prompt tells you the pending count. - `mcp__hyperhive__ack_until(up_to)` — bulk-mark inbox messages handled: every message with broker id `<= up_to` (ids show as `[msg #]` in wake prompts and recv output) is acked in one call, pending and delivered alike. Use it to clear a backlog you've already triaged — e.g. a redelivered flood after a container restart — instead of draining it one recv at a time: note the highest `[msg #N]` you've seen, then `ack_until(up_to: N)`. Acked messages never redeliver; messages newer than `up_to` stay queued. Only affects your own inbox. - `mcp__hyperhive__send(to, body, in_reply_to?)` — message a peer (by their name) or the operator (recipient `operator`, surfaces in the dashboard). Use `to: "*"` to broadcast to all agents (they receive a hint that it's a broadcast and may not need action). Use `to: ""` to address your structural parent without hardcoding their name — hive-c0re rewrites it at delivery time per `topology.json`, falling back to `operator` if you're a root agent. Use `to: ""` to fan-out to every direct child of yours per `topology.json` (no-op for leaf agents). Both sentinels let the operator reparent at runtime with zero change on your side. Optional `in_reply_to: ` threads this message under a prior one — the dashboard and per-agent inbox render it with a `↳ reply` link. Some agents have a per-agent allow-list (`hyperhive.allowedRecipients` in their `agent.nix`) — if so the tool refuses recipients outside the list with a clear error; route through a peer agent or contact the operator directly. - (some agents only) **extra MCP tools** surfaced as `mcp____` — these are agent-specific (matrix client, scraper, db connector, etc.) declared in your `agent.nix` under `hyperhive.extraMcpServers`. Treat them as first-class tools alongside the hyperhive surface; the operator already auto-approved them at deploy time. diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs index 8061e906..fc78cf90 100644 --- a/hive-ag3nt/src/mcp.rs +++ b/hive-ag3nt/src/mcp.rs @@ -613,7 +613,7 @@ pub struct RecvArgs { /// Maximum number of messages to pop in this round-trip. Default /// (None) is 1 (single-message behaviour — exactly what you want /// when you're called to drive a turn off the first wake). Pass - /// a higher value (capped at 32 server-side) when you've been + /// a higher value (capped at 5 server-side) when you've been /// told the inbox has more queued (the wake prompt mentions /// pending count) and want to drain everything in one tool call. /// Once the long-poll wakes up, the call drains up to `max` in @@ -806,7 +806,7 @@ impl AgentServer { `wait_seconds` (capped at 180) to park the turn waiting for new work — incoming \ messages wake you instantly, otherwise the call returns empty at the timeout. \ That's strictly better than a fixed shell `sleep`. \n\n\ - **Batch drain**: pass `max: N` (capped at 32) to drain up to N messages in one \ + **Batch drain**: pass `max: N` (capped at 5) to drain up to N messages in one \ round-trip. Use this when the wake prompt told you the inbox has more queued, or \ any time you expect a burst — one tool call beats N consecutive single recvs. \ `wait_seconds` still applies to the FIRST message; once one arrives the call drains \ diff --git a/hive-ag3nt/src/serve_common.rs b/hive-ag3nt/src/serve_common.rs index abc460f9..0e13b909 100644 --- a/hive-ag3nt/src/serve_common.rs +++ b/hive-ag3nt/src/serve_common.rs @@ -31,9 +31,13 @@ pub fn format_wake_prompt( let pending = if unread == 0 { String::new() } else { + // Suggested batch size is clamped to the server-side recv cap + // (see `RECV_BATCH_MAX` in hive-c0re) so the hint never asks + // for more than one round-trip can deliver. + let batch = unread.min(5); format!( "\n\n({unread} more message(s) pending in your inbox — call `mcp__hyperhive__recv` \ - with `max: {unread}` to drain them all in one round-trip before acting. If the \ + with `max: {batch}` to drain the next batch before acting. If the \ backlog is stale/already handled, `ack_until(up_to: )` \ clears everything up to that id in one call instead.)" ) diff --git a/hive-c0re/src/socket_server.rs b/hive-c0re/src/socket_server.rs index df590644..7f8aeb5c 100644 --- a/hive-c0re/src/socket_server.rs +++ b/hive-c0re/src/socket_server.rs @@ -152,11 +152,10 @@ pub(crate) const RECV_LONG_POLL_MAX: std::time::Duration = std::time::Duration:: /// Server-side hard cap on `Recv.max`. 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. 32 is comfortably above the burst sizes we've -/// seen in practice (post-rebuild rescue, multi-agent reply storms) -/// and well under the per-message `MESSAGE_MAX_BYTES` * N envelope -/// budget. -pub(crate) const RECV_BATCH_MAX: u32 = 32; +/// silently clamps. 5 keeps individual turns small — a big backlog +/// is drained over several recv calls instead of one giant pop +/// (#2150). +pub(crate) const RECV_BATCH_MAX: u32 = 5; pub(crate) fn recv_timeout(wait_seconds: Option) -> std::time::Duration { match wait_seconds { From be5b36911a404a046c6c28dcca3b0a971edb4502 Mon Sep 17 00:00:00 2001 From: damocles Date: Thu, 2 Jul 2026 22:22:03 +0200 Subject: [PATCH 4/6] recv: hoist RECV_BATCH_MAX into hive-sh4re, drop magic 5 in wake hint --- hive-ag3nt/src/serve_common.rs | 6 +++--- hive-c0re/src/socket_server.rs | 11 ++++------- hive-sh4re/src/lib.rs | 10 ++++++++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/hive-ag3nt/src/serve_common.rs b/hive-ag3nt/src/serve_common.rs index 0e13b909..bdff6cf7 100644 --- a/hive-ag3nt/src/serve_common.rs +++ b/hive-ag3nt/src/serve_common.rs @@ -32,9 +32,9 @@ pub fn format_wake_prompt( String::new() } else { // Suggested batch size is clamped to the server-side recv cap - // (see `RECV_BATCH_MAX` in hive-c0re) so the hint never asks - // for more than one round-trip can deliver. - let batch = unread.min(5); + // so the hint never asks for more than one round-trip can + // deliver. + let batch = unread.min(u64::from(hive_sh4re::RECV_BATCH_MAX)); format!( "\n\n({unread} more message(s) pending in your inbox — call `mcp__hyperhive__recv` \ with `max: {batch}` to drain the next batch before acting. If the \ diff --git a/hive-c0re/src/socket_server.rs b/hive-c0re/src/socket_server.rs index 7f8aeb5c..de8446ec 100644 --- a/hive-c0re/src/socket_server.rs +++ b/hive-c0re/src/socket_server.rs @@ -149,13 +149,10 @@ async fn serve(stream: UnixStream, agent: String, coord: Arc) -> Re /// positive `wait_seconds`. pub(crate) const RECV_LONG_POLL_MAX: std::time::Duration = std::time::Duration::from_mins(3); -/// Server-side hard cap on `Recv.max`. 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). -pub(crate) const RECV_BATCH_MAX: u32 = 5; +/// Server-side hard cap on `Recv.max` — canonical value lives in +/// `hive_sh4re::RECV_BATCH_MAX` so the harness's wake-prompt hint and +/// this enforcement site can't drift apart (#2150). +pub(crate) const RECV_BATCH_MAX: u32 = hive_sh4re::RECV_BATCH_MAX; pub(crate) fn recv_timeout(wait_seconds: Option) -> std::time::Duration { match wait_seconds { diff --git a/hive-sh4re/src/lib.rs b/hive-sh4re/src/lib.rs index 3913e120..3f422be3 100644 --- a/hive-sh4re/src/lib.rs +++ b/hive-sh4re/src/lib.rs @@ -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 // ----------------------------------------------------------------------------- From 0577c9e3fa927324592b5b3b9ba5b2bb515f96f5 Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 3 Jul 2026 00:09:57 +0200 Subject: [PATCH 5/6] drop tracker tags from rust doc comments (lint) --- hive-c0re/src/socket_server.rs | 2 +- hive-sh4re/src/lib.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hive-c0re/src/socket_server.rs b/hive-c0re/src/socket_server.rs index de8446ec..b21f60e3 100644 --- a/hive-c0re/src/socket_server.rs +++ b/hive-c0re/src/socket_server.rs @@ -151,7 +151,7 @@ pub(crate) const RECV_LONG_POLL_MAX: std::time::Duration = std::time::Duration:: /// Server-side hard cap on `Recv.max` — canonical value lives in /// `hive_sh4re::RECV_BATCH_MAX` so the harness's wake-prompt hint and -/// this enforcement site can't drift apart (#2150). +/// this enforcement site can't drift apart. pub(crate) const RECV_BATCH_MAX: u32 = hive_sh4re::RECV_BATCH_MAX; pub(crate) fn recv_timeout(wait_seconds: Option) -> std::time::Duration { diff --git a/hive-sh4re/src/lib.rs b/hive-sh4re/src/lib.rs index 3f422be3..b878affe 100644 --- a/hive-sh4re/src/lib.rs +++ b/hive-sh4re/src/lib.rs @@ -11,10 +11,10 @@ pub mod wire_time; /// 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. +/// backlog is drained over several recv calls instead of one giant pop. +/// 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; // ----------------------------------------------------------------------------- From 7def5147602f87769bf7d2fb82700662d5b05a37 Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 3 Jul 2026 00:55:53 +0200 Subject: [PATCH 6/6] clippy: backtick socket_server in doc comment --- hive-sh4re/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hive-sh4re/src/lib.rs b/hive-sh4re/src/lib.rs index b878affe..09931b0d 100644 --- a/hive-sh4re/src/lib.rs +++ b/hive-sh4re/src/lib.rs @@ -12,7 +12,7 @@ pub mod wire_time; /// 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. -/// Lives here so both the enforcing side (hive-c0re's socket_server) and +/// 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;