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