Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(threads): add queuedChatAck schema validation

Steven Enamakeldc75bf52c28e
diff --git a/crates/openhuman-core/src/threads/wire_schema_tests.rs b/crates/openhuman-core/src/threads/wire_schema_tests.rs
index a9d58deb60..9d439387fc 100644
--- a/crates/openhuman-core/src/threads/wire_schema_tests.rs
+++ b/crates/openhuman-core/src/threads/wire_schema_tests.rs
@@ -9,6 +9,7 @@ fn thread_wire_schema_exports_the_core_and_session_records() {
for property in [
"thread",
"message",
+ "queuedChatAck",
"threadsList",
"threadMessages",
"threadDelete",
@@ -27,4 +28,19 @@ fn thread_wire_schema_exports_the_core_and_session_records() {
"schema is missing {property}"
);
}
+ let ack = &schema["$defs"]["QueuedChatAck"];
+ for field in [
+ "queued",
+ "queue_mode",
+ "client_id",
+ "thread_id",
+ "request_id",
+ "queue_depth",
+ "queued_attachments",
+ ] {
+ assert!(
+ ack["required"].as_array().unwrap().contains(&field.into()),
+ "ack schema must require serialized field {field}"
+ );
+ }
}