huskies: merge 1009
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user