huskies: merge 988

This commit is contained in:
dave
2026-05-13 17:24:18 +00:00
parent a078d3df7c
commit caed894db9
15 changed files with 169 additions and 81 deletions
+11 -2
View File
@@ -218,7 +218,7 @@ fn render_item_line(
Some(item.name.as_str())
};
// Use the typed CRDT stage as the sole source of truth (story 945).
let frozen = item.stage.is_frozen();
let frozen = matches!(item.stage, Stage::Frozen { .. });
let base_label = super::story_short_label(story_id, name_opt);
let display = if frozen {
format!("\u{2744}\u{FE0F} {base_label}") // ❄️ prefix
@@ -310,7 +310,16 @@ fn render_item_line(
}
}
let blocked = item.stage.is_blocked();
let blocked = matches!(
item.stage,
Stage::Blocked { .. }
| Stage::MergeFailure { .. }
| Stage::MergeFailureFinal { .. }
| Stage::Archived {
reason: ArchiveReason::Blocked { .. },
..
}
);
// Blocked items with a recovery agent get differentiated indicators.
if blocked {
return match agent.map(|a| &a.status) {
+30 -3
View File
@@ -362,12 +362,30 @@ fn stage_is_blocked_returns_true_for_archived_blocked() {
reason: "too many retries".to_string(),
},
};
assert!(stage.is_blocked());
assert!(matches!(
stage,
Stage::Blocked { .. }
| Stage::MergeFailure { .. }
| Stage::MergeFailureFinal { .. }
| Stage::Archived {
reason: ArchiveReason::Blocked { .. },
..
}
));
}
#[test]
fn stage_is_blocked_returns_false_for_coding() {
assert!(!Stage::Coding.is_blocked());
assert!(!matches!(
Stage::Coding,
Stage::Blocked { .. }
| Stage::MergeFailure { .. }
| Stage::MergeFailureFinal { .. }
| Stage::Archived {
reason: ArchiveReason::Blocked { .. },
..
}
));
}
#[test]
@@ -376,7 +394,16 @@ fn stage_is_blocked_returns_false_for_archived_completed() {
archived_at: Utc::now(),
reason: ArchiveReason::Completed,
};
assert!(!stage.is_blocked());
assert!(!matches!(
stage,
Stage::Blocked { .. }
| Stage::MergeFailure { .. }
| Stage::MergeFailureFinal { .. }
| Stage::Archived {
reason: ArchiveReason::Blocked { .. },
..
}
));
}
// -- status output shows idle dot for items with no active agent --------