fix: slotsfull is occupancy, not free slots, and cover it end to end
Running the e2e suite against a real soulfind showed the per-member slots field was implemented backwards. The wire field is `slotsfull` -- a boolean that is true when the member's upload slots are all occupied -- not a count of free ones. `slots_free: u32` named it, documented it and printed it as the opposite of what the server means, so a caller reading it would pick the busiest peer to download from. - types: `slots_full: bool`, with the wire name in the doc comment - the DTO, the `room users` output and SKILL.md follow - a new e2e test joins a room with a member sharing a known three files and asserts the counts, the roster alignment and the slot flag against soulfind, so the parsing is checked against a real server rather than only against frames this repo wrote itself
This commit is contained in:
@@ -141,10 +141,10 @@ server did not answer — those are different facts, so do not treat null as 0.
|
||||
|
||||
**`room list`** — `room`, `users`.
|
||||
**`room users <room>`** — `room`, `user`, `status`, `average_speed`,
|
||||
`shared_files`, `shared_folders`, `slots_free`, `country`. Everything but
|
||||
`shared_files`, `shared_folders`, `slots_full`, `country`. Everything but
|
||||
`room` and `user` is `null` when the server sent no statistics for that
|
||||
member — `null` means unknown, not zero. `slots_free` of 0 means the peer has
|
||||
no free upload slot right now, so a download from them will queue.
|
||||
member — `null` means unknown, not zero. `slots_full` is true when the peer's
|
||||
upload slots are all occupied, so a download from them will queue.
|
||||
**`room listen <room>`** — streams `type`, `room`, `user`, `message`.
|
||||
**`room say <room> <message>`** — prints nothing; exit 0 is the confirmation.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user