huskies: merge 867
This commit is contained in:
@@ -22,6 +22,8 @@ pub(super) struct FrontMatter {
|
||||
pub depends_on: Option<Vec<u32>>,
|
||||
/// When `true`, the story is frozen.
|
||||
pub frozen: Option<bool>,
|
||||
/// Stage directory to restore on unfreeze (e.g. `"2_current"`).
|
||||
pub resume_to_stage: Option<String>,
|
||||
/// Set to `true` when an agent's `run_tests` call returns `passed=true`.
|
||||
/// Used by the bug-645 salvage path to distinguish a genuine test-passing
|
||||
/// session from one that merely compiled.
|
||||
@@ -76,6 +78,7 @@ fn build_metadata(front: FrontMatter) -> StoryMetadata {
|
||||
blocked: front.blocked,
|
||||
depends_on: front.depends_on,
|
||||
frozen: front.frozen,
|
||||
resume_to_stage: front.resume_to_stage,
|
||||
run_tests_passed: front.run_tests_passed,
|
||||
item_type: front.item_type,
|
||||
mergemaster_attempted: front.mergemaster_attempted,
|
||||
@@ -131,17 +134,15 @@ pub fn resolve_qa_mode_from_content(story_id: &str, contents: &str, default: QaM
|
||||
}
|
||||
}
|
||||
|
||||
/// Return `true` if the story has `frozen: true` in the content store.
|
||||
/// Return `true` if the story is in the `Frozen` pipeline stage.
|
||||
///
|
||||
/// Used by the pipeline advance code to suppress stage transitions for frozen stories.
|
||||
/// Checks the typed CRDT stage via `read_typed`. Used by the pipeline advance
|
||||
/// code to suppress stage transitions for frozen stories.
|
||||
pub fn is_story_frozen_in_store(story_id: &str) -> bool {
|
||||
let contents = match crate::db::read_content(story_id) {
|
||||
Some(c) => c,
|
||||
None => return false,
|
||||
};
|
||||
parse_front_matter(&contents)
|
||||
crate::pipeline_state::read_typed(story_id)
|
||||
.ok()
|
||||
.and_then(|m| m.frozen)
|
||||
.flatten()
|
||||
.map(|item| item.stage.is_frozen())
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user