huskies: merge 891

This commit is contained in:
dave
2026-05-12 17:03:41 +00:00
parent b76633b79b
commit 148ce37beb
20 changed files with 418 additions and 262 deletions
+2 -3
View File
@@ -68,7 +68,7 @@ fn inject_gate_failure_section(args: &mut Vec<String>, gate_output: &str) {
/// prior failure context, even when session-resuming (story 881).
pub(super) fn maybe_inject_gate_failure(args: &mut Vec<String>, story_id: &str) {
let retry_count = crate::crdt_state::read_item(story_id)
.and_then(|item| item.retry_count)
.map(|item| item.retry_count())
.unwrap_or(0);
if retry_count > 0
&& let Some(gate_output) = crate::db::read_content(&format!("{story_id}:gate_output"))
@@ -767,8 +767,7 @@ mod tests {
// retry_count must remain 0 — the abort path never calls bump_retry_count.
let retry_count = crate::crdt_state::read_item(story_id)
.and_then(|item| item.retry_count)
.map(|r| r as u32)
.map(|item| item.retry_count())
.unwrap_or(0);
assert_eq!(
retry_count, 0,
+2 -2
View File
@@ -64,10 +64,10 @@ pub(super) fn read_front_matter_agent(story_id: &str, agent_name: Option<&str>)
// to legacy YAML parsing for stories whose CRDT entry doesn't yet have
// the field populated.
if let Some(view) = crate::crdt_state::read_item(story_id)
&& let Some(agent) = view.agent.as_ref()
&& let Some(agent) = view.agent()
&& !agent.is_empty()
{
return Some(agent.clone());
return Some(agent.to_string());
}
crate::db::read_content(story_id).and_then(|contents| {
crate::db::yaml_legacy::parse_front_matter(&contents)