bxcore: a turn's speaker, SessionUpdated's turn, the session-state messages

Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
2026-09-28 10:27:28 -07:00
co-authored by ornith-1.5-35b-a3b
parent 027146f359
commit c798714af1
31 changed files with 238 additions and 13 deletions
+2
View File
@@ -102,6 +102,7 @@ fn replay_keeps_only_messages_in_order_and_unchanged() {
LogRecord::User {
time: ts(),
content: "hi".to_string(),
speaker: None,
},
LogRecord::Assistant {
time: ts(),
@@ -195,6 +196,7 @@ fn replay_of_a_prefix_is_a_prefix() {
0 => LogRecord::User {
time: ts(),
content: format!("u{i}"),
speaker: None,
},
1 => LogRecord::Assistant {
time: ts(),
+2
View File
@@ -65,6 +65,7 @@ fn turn(socket: &PathBuf, session: &str, content: &str, resume: bool) -> Vec<Env
session: id(session),
content: content.to_string(),
resume,
speaker: None,
});
write_frame(
&mut stream,
@@ -350,6 +351,7 @@ fn bad_frames_get_an_error_and_a_close() {
session: id("a"),
content: "x".to_string(),
resume: false,
speaker: None,
});
write_frame(
&mut stream,
+1
View File
@@ -153,6 +153,7 @@ fn answers(socket: &Path) -> bool {
session: SessionId::new("probe").unwrap(),
content: "are you there".to_string(),
resume: true,
speaker: None,
}),
};
if write_frame(&mut stream, &turn).is_err() {
+1
View File
@@ -88,6 +88,7 @@ fn turn(l: &Loopd, session: &str, resume: bool) -> Message {
session: SessionId::new(session).unwrap(),
content: "hello".to_string(),
resume,
speaker: None,
});
let env = Envelope {
v: PROTOCOL_VERSION,
+1
View File
@@ -125,6 +125,7 @@ fn an_old_log_with_a_raw_tag_is_replayed_as_it_is() {
LogRecord::User {
time: ts(),
content: user.clone(),
speaker: None,
},
LogRecord::Assistant {
time: ts(),
+3
View File
@@ -62,6 +62,7 @@ fn append_is_visible_on_disk_at_once_and_after_reopen() {
s.append(LogRecord::User {
time: ts(),
content: "hi\nthere \"quoted\" caf\u{e9}".to_string(),
speaker: None,
})
.unwrap();
assert_eq!(
@@ -104,6 +105,7 @@ fn a_torn_log_is_refused_with_the_line_number() {
s.append(LogRecord::User {
time: ts(),
content: "hi".to_string(),
speaker: None,
})
.unwrap();
drop(s);
@@ -173,6 +175,7 @@ fn last_usage_is_the_latest_usage_record() {
s.append(LogRecord::User {
time: ts(),
content: "x".to_string(),
speaker: None,
})
.unwrap();
s.append(LogRecord::Usage {
@@ -74,6 +74,7 @@ fn untrusted(socket: &Path, session: &str, content: &str, resume: bool) -> bool
session: SessionId::new(session).unwrap(),
content: content.to_string(),
resume,
speaker: None,
});
let turn = Envelope {
v: PROTOCOL_VERSION,