huskies: merge 1009

This commit is contained in:
dave
2026-05-13 22:50:13 +00:00
parent a5cd3a2152
commit 4e007bb770
56 changed files with 453 additions and 384 deletions
+10 -2
View File
@@ -90,7 +90,11 @@ mod tests {
fn backlog_shows_only_backlog_stage_items() {
let items = vec![
make_item("10_story_in_backlog", "In Backlog", Stage::Backlog),
make_item("20_story_in_progress", "In Progress", Stage::Coding),
make_item(
"20_story_in_progress",
"In Progress",
Stage::Coding { claim: None },
),
make_item("30_story_in_qa", "In QA", Stage::Qa),
];
let output = build_backlog_from_items(&items);
@@ -227,7 +231,11 @@ mod tests {
#[test]
fn backlog_shows_none_when_empty() {
let items = vec![make_item("1_story_done", "Done", Stage::Coding)];
let items = vec![make_item(
"1_story_done",
"Done",
Stage::Coding { claim: None },
)];
let output = build_backlog_from_items(&items);
assert!(
output.contains("*(none)*"),
+1 -1
View File
@@ -239,7 +239,7 @@ mod tests {
.expect("read_typed should succeed")
.expect("item should be present");
assert!(
matches!(item.stage, crate::pipeline_state::Stage::Coding),
matches!(item.stage, crate::pipeline_state::Stage::Coding { .. }),
"stage should be restored to Coding: {:?}",
item.stage
);
+1 -1
View File
@@ -16,7 +16,7 @@ use std::collections::{HashMap, HashSet};
pub(crate) fn display_section(s: &Stage) -> Option<&'static str> {
match s {
Stage::Upcoming | Stage::Backlog => Some("Backlog"),
Stage::Coding
Stage::Coding { .. }
| Stage::Blocked { .. }
| Stage::Archived {
reason: ArchiveReason::Blocked { .. },
+26 -13
View File
@@ -137,7 +137,7 @@ fn status_does_not_show_full_filename_stem() {
let items = vec![make_item(
"293_story_register_all_bot_commands",
"Register all bot commands",
Stage::Coding,
Stage::Coding { claim: None },
)];
let agents = AgentPool::new_test(3000);
@@ -163,7 +163,7 @@ fn status_shows_cost_when_token_usage_exists() {
let items = vec![make_item(
"293_story_register_all_bot_commands",
"Register all bot commands",
Stage::Coding,
Stage::Coding { claim: None },
)];
// Write token usage for this story.
@@ -199,7 +199,7 @@ fn status_no_cost_when_no_usage() {
let items = vec![make_item(
"293_story_register_all_bot_commands",
"Register all bot commands",
Stage::Coding,
Stage::Coding { claim: None },
)];
let agents = AgentPool::new_test(3000);
@@ -219,7 +219,7 @@ fn status_aggregates_multiple_records_per_story() {
let items = vec![make_item(
"293_story_register_all_bot_commands",
"Register all bot commands",
Stage::Coding,
Stage::Coding { claim: None },
)];
// Write two records for the same story — costs should be summed.
@@ -262,7 +262,7 @@ fn status_shows_waiting_on_for_story_with_unmet_deps() {
make_item_with_deps(
"10_story_waiting",
"Waiting Story",
Stage::Coding,
Stage::Coding { claim: None },
vec![999],
),
make_item("999_story_dep", "Dep Story", Stage::Backlog),
@@ -287,7 +287,7 @@ fn status_does_not_show_waiting_on_when_dep_is_done() {
make_item_with_deps(
"10_story_unblocked",
"Unblocked Story",
Stage::Coding,
Stage::Coding { claim: None },
vec![999],
),
make_item(
@@ -314,7 +314,11 @@ fn status_shows_no_waiting_info_when_no_deps() {
use tempfile::TempDir;
let tmp = TempDir::new().unwrap();
let items = vec![make_item("42_story_nodeps", "No Deps Story", Stage::Coding)];
let items = vec![make_item(
"42_story_nodeps",
"No Deps Story",
Stage::Coding { claim: None },
)];
let agents = AgentPool::new_test(3000);
let output = build_status_from_items(tmp.path(), &agents, &items);
@@ -377,7 +381,7 @@ fn stage_is_blocked_returns_true_for_archived_blocked() {
#[test]
fn stage_is_blocked_returns_false_for_coding() {
assert!(!matches!(
Stage::Coding,
Stage::Coding { claim: None },
Stage::Blocked { .. }
| Stage::MergeFailure { .. }
| Stage::MergeFailureFinal { .. }
@@ -413,7 +417,11 @@ fn status_shows_idle_dot_for_unassigned_story() {
use tempfile::TempDir;
let tmp = TempDir::new().unwrap();
let items = vec![make_item("42_story_idle", "Idle Story", Stage::Coding)];
let items = vec![make_item(
"42_story_idle",
"Idle Story",
Stage::Coding { claim: None },
)];
let agents = AgentPool::new_test(3000);
let output = build_status_from_items(tmp.path(), &agents, &items);
@@ -503,6 +511,7 @@ fn merge_stage() -> Stage {
Stage::Merge {
feature_branch: BranchName("feature/test".to_string()),
commits_ahead: std::num::NonZeroU32::new(1).unwrap(),
claim: None,
}
}
@@ -779,7 +788,11 @@ fn in_progress_count_includes_blocked_items() {
let tmp = TempDir::new().unwrap();
let items = vec![
make_item("10_story_coding", "Coding Story", Stage::Coding),
make_item(
"10_story_coding",
"Coding Story",
Stage::Coding { claim: None },
),
make_item(
"11_story_blocked",
"Blocked Story",
@@ -810,7 +823,7 @@ fn frozen_coding_item_appears_in_in_progress_section() {
"60_story_frozen",
"Frozen Coding Story",
Stage::Frozen {
resume_to: Box::new(Stage::Coding),
resume_to: Box::new(Stage::Coding { claim: None }),
},
)];
@@ -868,7 +881,7 @@ fn frozen_item_shows_snowflake_indicator() {
"80_story_frozen_flake",
"Frozen Flake Story",
Stage::Frozen {
resume_to: Box::new(Stage::Coding),
resume_to: Box::new(Stage::Coding { claim: None }),
},
)];
@@ -898,7 +911,7 @@ fn frozen_and_blocked_use_distinct_indicators() {
"91_story_frozen_ind",
"Frozen Story",
Stage::Frozen {
resume_to: Box::new(Stage::Coding),
resume_to: Box::new(Stage::Coding { claim: None }),
},
),
];
-6
View File
@@ -221,8 +221,6 @@ mod tests {
Some(5),
None,
None,
None,
None,
);
let output = unblock_cmd_with_root(tmp.path(), "9903").unwrap();
@@ -299,8 +297,6 @@ mod tests {
Some(5),
None,
None,
None,
None,
);
let output = unblock_cmd_with_root(tmp.path(), "9904").unwrap();
@@ -358,8 +354,6 @@ mod tests {
Some(3),
None,
None,
None,
None,
);
let output = unblock_cmd_with_root(tmp.path(), "9901").unwrap();
@@ -324,8 +324,6 @@ mod tests {
None,
None,
None,
None,
None,
);
let agents = std::sync::Arc::new(AgentPool::new_test(3000));
@@ -379,8 +377,6 @@ mod tests {
None,
None,
None,
None,
None,
);
let agents = std::sync::Arc::new(AgentPool::new_test(3000));
@@ -429,8 +425,6 @@ mod tests {
None,
None,
None,
None,
None,
);
let agents = std::sync::Arc::new(AgentPool::new_test(3000));
+1 -3
View File
@@ -108,7 +108,7 @@ fn stage_display_label(stage: &crate::pipeline_state::Stage) -> &'static str {
match stage {
Stage::Upcoming => "upcoming",
Stage::Backlog => "backlog",
Stage::Coding => "in-progress",
Stage::Coding { .. } => "in-progress",
Stage::Blocked { .. } => "blocked",
Stage::Qa => "QA",
Stage::Merge { .. } => "merge",
@@ -254,8 +254,6 @@ mod tests {
None,
None,
None,
None,
None,
);
// Seed in content store so find_story_by_number can resolve it.