huskies: merge 730_story_use_numeric_only_story_ids_across_mcp_worktrees_git_branches_and_log_paths
This commit is contained in:
@@ -257,8 +257,8 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
assert!(
|
||||
result.contains("_bug_login_crash"),
|
||||
"result should contain bug ID: {result}"
|
||||
result.starts_with("Created bug: "),
|
||||
"result should be a 'Created bug: <id>' message: {result}"
|
||||
);
|
||||
// Extract the actual bug ID from the result message (format: "Created bug: <id>").
|
||||
let bug_id = result.trim_start_matches("Created bug: ").trim();
|
||||
|
||||
@@ -111,14 +111,14 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
assert!(
|
||||
result.contains("_spike_compare_encoders"),
|
||||
"result should contain spike ID: {result}"
|
||||
result.starts_with("Created spike: "),
|
||||
"result should be a 'Created spike: <id>' message: {result}"
|
||||
);
|
||||
// Extract the actual spike ID from the result message (format: "Created spike: <id>").
|
||||
let spike_id = result.trim_start_matches("Created spike: ").trim();
|
||||
// Spike content should exist in the CRDT content store.
|
||||
let contents = crate::db::read_content(spike_id).expect("expected spike content in CRDT");
|
||||
assert!(contents.starts_with("---\nname: \"Compare Encoders\"\n---"));
|
||||
assert!(contents.starts_with("---\ntype: spike\nname: \"Compare Encoders\"\n---"));
|
||||
assert!(contents.contains("Which encoder is fastest?"));
|
||||
}
|
||||
|
||||
@@ -133,15 +133,15 @@ mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
assert!(
|
||||
result.contains("_spike_my_spike"),
|
||||
"result should contain spike ID: {result}"
|
||||
result.starts_with("Created spike: "),
|
||||
"result should be a 'Created spike: <id>' message: {result}"
|
||||
);
|
||||
// Extract the actual spike ID from the result message (format: "Created spike: <id>").
|
||||
let spike_id = result.trim_start_matches("Created spike: ").trim();
|
||||
|
||||
// Spike content should exist in the CRDT content store.
|
||||
let contents = crate::db::read_content(spike_id).expect("expected spike content in CRDT");
|
||||
assert!(contents.starts_with("---\nname: \"My Spike\"\n---"));
|
||||
assert!(contents.starts_with("---\ntype: spike\nname: \"My Spike\"\n---"));
|
||||
assert!(contents.contains("## Question\n\n- TBD\n"));
|
||||
}
|
||||
|
||||
|
||||
@@ -300,12 +300,14 @@ pub(crate) fn tool_unblock_story(args: &Value, ctx: &AppContext) -> Result<Strin
|
||||
|
||||
let root = ctx.state.get_project_root()?;
|
||||
|
||||
// Extract the numeric prefix (e.g. "42" from "42_story_foo")
|
||||
// Extract the numeric prefix (e.g. "42" from "42" or from legacy "42_story_foo").
|
||||
let story_number = story_id
|
||||
.split('_')
|
||||
.next()
|
||||
.filter(|s| !s.is_empty() && s.chars().all(|c| c.is_ascii_digit()))
|
||||
.ok_or_else(|| format!("Invalid story_id format: '{story_id}'. Expected a numeric prefix (e.g. '42_story_foo')."))?;
|
||||
.ok_or_else(|| {
|
||||
format!("Invalid story_id format: '{story_id}'. Expected a numeric ID (e.g. '42').")
|
||||
})?;
|
||||
|
||||
Ok(crate::chat::commands::unblock::unblock_by_number(
|
||||
&root,
|
||||
|
||||
Reference in New Issue
Block a user