T38: inside herdr, which passes no OSC 7501 on, herdr's agents in a state it knows are the session's records, one a pane, their app, title and message from herdr's fields; a snapshot that lists other agents replaces them whole, and they go when herdr leaves the foreground
CI / platforms (ubuntu-24.04) (push) Successful in 1m10s
CI / platforms (windows-latest) (push) Successful in 1m40s
CI / macos (push) Successful in 10m31s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-17 11:51:56 -04:00
1 parent 72acbe4bb0
commit a175b18743
6 files changed
+241 -42

No files matched your search

+26
View File
@@ -140,6 +140,32 @@ fn records_replace_and_clear_as_the_spec_says() {
assert!(records.list.is_empty());
}
#[test]
fn herdr_s_agents_replace_their_own_records_alone() {
let mut records = Records::default();
records.report("build".into(), record(State::Working, None));
let codex = [(
"herdr/w1:p1".to_string(),
record(State::Working, Some("codex")),
)];
records.herdr(&codex);
let clock = records.clock;
records.herdr(&codex);
assert_eq!(records.clock, clock, "the same agents change nothing");
let claude = [(
"herdr/w1:p2".to_string(),
record(State::Blocked, Some("claude")),
)];
records.herdr(&claude);
let ids: Vec<&str> = records.list.iter().map(|(id, ..)| id.as_str()).collect();
assert_eq!(ids, ["build", "herdr/w1:p2"]);
records.reset();
records.herdr(&claude);
assert_eq!(records.list.len(), 1, "the next snapshot puts them back");
records.herdr(&[]);
assert!(records.list.is_empty());
}
#[test]
fn a_new_prompt_leaves_done_and_error() {
let mut records = Records::default();