From 5637d0e5fc37858a286e097013430ba6fa6e8630 Mon Sep 17 00:00:00 2001 From: Daniel Samson <12231216+daniel-samson@users.noreply.github.com> Date: Sun, 9 Aug 2026 23:26:12 +0100 Subject: [PATCH] device-manager: the entries-per-reply test asserts 7 (the current shape), not 10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A pre-existing stale assertion, surfaced by wiring volume-manager into the root test aggregate (its partition fixtures now run under `zig build test`). entries_per_reply is computed as (packet_maximum 256 - prefix 16) / sizeof ChildEntry 32 = 7; the test asserted 10, the value the old count-header layout carried. No behavior change — the enumerate producer and consumers already page by the real capacity; only the test documented an obsolete number. --- library/protocol/device-manager/device-manager-protocol.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/protocol/device-manager/device-manager-protocol.zig b/library/protocol/device-manager/device-manager-protocol.zig index 279513d..d0829aa 100644 --- a/library/protocol/device-manager/device-manager-protocol.zig +++ b/library/protocol/device-manager/device-manager-protocol.zig @@ -212,8 +212,9 @@ test "a tree report fits the push floor with the header folded in" { try std.testing.expectEqual(@as(usize, 48), @sizeOf(ChildAdded)); try std.testing.expectEqual(envelope.post_maximum, Protocol.event_maximum); try std.testing.expect(Protocol.event_maximum <= envelope.post_maximum); - // Ten records per enumerate reply — what the old count-header layout carried. - try std.testing.expectEqual(@as(usize, 10), entries_per_reply); + // Seven records per enumerate reply: (packet_maximum 256 - prefix 16) / 32. + // (The old count-header layout carried ten; this asserts the current shape.) + try std.testing.expectEqual(@as(usize, 7), entries_per_reply); } test "the verb and event numbering, and the device id in the header" {