brokerd: state.sock answers memoryd's question about a session's state

Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
2026-09-28 11:05:42 -07:00
co-authored by ornith-1.5-35b-a3b
parent 5199bd7149
commit 9b4e9807b2
12 changed files with 758 additions and 14 deletions
+8 -1
View File
@@ -63,7 +63,9 @@ impl Home {
command
}
/// Starts `brokerd serve` and waits until both sockets answer.
/// Starts `brokerd serve` and waits until both sockets answer. A socket accepts connections
/// as soon as it is bound, before `brokerd` has printed its startup notices; the admin
/// socket's answer comes from a handler thread, which runs only after they are printed.
fn serve(&self) -> Running {
let child = self
.command(&[])
@@ -79,6 +81,11 @@ impl Home {
assert!(Instant::now() < until, "brokerd never listened");
std::thread::sleep(Duration::from_millis(20));
}
let answer = exchange(&self.admin(), 1, Message::Approvals(Empty {}));
assert!(
matches!(&answer[0].msg, Message::ApprovalList(_)),
"{answer:?}"
);
running
}