artifactize-core 0.27.0

The library behind artifactize: Artifacts, evals, reviews, the monitor and review models, and the shared operations every interface calls.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use serde_json::json;

#[test]
fn only_a_queued_request_keeps_the_saved_slot_reason() {
    let slot = json!({"kind": "slot", "backend": "openai"});
    for status in ["QUEUED", "GREEN"] {
        let view = crate::test_request::request("app/check", status, json!({"queue": slot}));
        let wire = serde_json::to_value(&view.request).unwrap();
        assert_eq!(wire["status"], status);
        assert_eq!(wire.get("queue"), (status == "QUEUED").then_some(&slot));
    }
}