wsb-daemon 0.258.6441

wsb's daemon: the workbench, the GitHub mirror's schedule and peer continuity, for every workspace on the machine
//! The adaptation between the file's vocabulary and the registry's.
//!
//! The format itself is tested where it lives (`wsb::logs::op_log`). What is
//! testable here is the translation, which is where a mistake would show up as
//! a line that reads back out of order or without its time.

use super::*;
use wsb::output::Record;

/// TEST9008: a line read back keeps its sequence, its time and its record.
///
/// The page resolves the snapshot/live overlap by sequence number and orders
/// what it shows by time; a line that lost either on the way out of the file
/// would be shown twice, or nowhere it belongs.
#[test]
fn test9008_a_line_read_back_keeps_its_place_and_time() {
    let read = output_line_of(wsb::output::Line {
        seq: 2,
        ts: "2026-08-22T14:30:12Z".to_string(),
        record: Record::Stderr { text: "two".into() },
    });
    assert_eq!(read.seq, 2);
    assert_eq!(read.ts.as_deref(), Some("2026-08-22T14:30:12Z"));
    assert_eq!(read.record, Record::Stderr { text: "two".into() });
}