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
+2 -2
View File
@@ -93,8 +93,8 @@ pub(crate) fn tool_dump_crdt(args: &Value) -> Result<String, String> {
"agent": item.agent,
"retry_count": item.retry_count,
"depends_on": item.depends_on,
"claimed_by": item.claimed_by,
"claimed_at": item.claimed_at,
"claimed_by": item.claim_agent,
"claimed_at": item.claim_ts,
"content_index": item.content_index,
"is_deleted": item.is_deleted,
})
-4
View File
@@ -305,8 +305,6 @@ mod tests {
None,
None,
None,
None,
None,
);
let tmp = tempfile::tempdir().unwrap();
let ctx = test_ctx(tmp.path());
@@ -331,8 +329,6 @@ mod tests {
None,
None,
None,
None,
None,
);
let tmp = tempfile::tempdir().unwrap();
let ctx = test_ctx(tmp.path());
+15 -4
View File
@@ -165,7 +165,10 @@ pub(super) async fn tool_status(args: &Value, ctx: &AppContext) -> Result<String
"Story '{story_id}' not found in coding stage. Check the story_id and ensure it is in the current stage."
))?;
if !matches!(typed_item.stage, crate::pipeline_state::Stage::Coding) {
if !matches!(
typed_item.stage,
crate::pipeline_state::Stage::Coding { .. }
) {
return Err(format!(
"Story '{story_id}' not found in coding stage. Check the story_id and ensure it is in the current stage."
));
@@ -192,9 +195,17 @@ pub(super) async fn tool_status(args: &Value, ctx: &AppContext) -> Result<String
if !deps.is_empty() {
front_matter.insert("depends_on".to_string(), json!(deps));
}
if let Some(claim) = view.claim() {
front_matter.insert("claimed_by".to_string(), json!(claim.node));
front_matter.insert("claimed_at".to_string(), json!(claim.at));
let stage_claim = match &typed_item.stage {
crate::pipeline_state::Stage::Coding { claim } => claim.as_ref(),
crate::pipeline_state::Stage::Merge { claim, .. } => claim.as_ref(),
_ => None,
};
if let Some(claim) = stage_claim {
front_matter.insert("claimed_by".to_string(), json!(claim.agent.0.as_str()));
front_matter.insert(
"claimed_at".to_string(),
json!(claim.claimed_at.timestamp() as f64),
);
}
}
+2 -2
View File
@@ -188,8 +188,8 @@ pub fn debug_crdt_handler(req: &poem::Request) -> poem::Response {
"agent": item.agent,
"retry_count": item.retry_count,
"depends_on": item.depends_on,
"claimed_by": item.claimed_by,
"claimed_at": item.claimed_at,
"claimed_by": item.claim_agent,
"claimed_at": item.claim_ts,
"content_index": item.content_index,
"is_deleted": item.is_deleted,
})
+3 -3
View File
@@ -171,7 +171,7 @@ pub fn load_pipeline_state(ctx: &AppContext) -> Result<PipelineState, String> {
match &item.stage {
Stage::Upcoming => state.backlog.push(story), // upcoming shown with backlog
Stage::Backlog => state.backlog.push(story),
Stage::Coding => state.current.push(story),
Stage::Coding { .. } => state.current.push(story),
Stage::Blocked { .. } => state.current.push(story), // blocked shown with current
Stage::Qa => state.qa.push(story),
Stage::Merge { .. } => state.merge.push(story),
@@ -182,7 +182,7 @@ pub fn load_pipeline_state(ctx: &AppContext) -> Result<PipelineState, String> {
// Route to the section matching the stage that was active when
// the item was frozen, so it appears in-place.
match unwrap_frozen(resume_to) {
Stage::Coding | Stage::Blocked { .. } => state.current.push(story),
Stage::Coding { .. } | Stage::Blocked { .. } => state.current.push(story),
Stage::Qa | Stage::ReviewHold { .. } => state.qa.push(story),
Stage::Merge { .. }
| Stage::MergeFailure { .. }
@@ -324,7 +324,7 @@ pub fn validate_story_dirs(_root: &Path) -> Result<Vec<StoryValidationResult>, S
let mut results = Vec::new();
for item in crate::pipeline_state::read_all_typed() {
if !matches!(item.stage, Stage::Backlog | Stage::Coding) {
if !matches!(item.stage, Stage::Backlog | Stage::Coding { .. }) {
continue;
}
results.push(StoryValidationResult {