wip(929): stage 6 — drop resume_to_stage YAML lookup from projection layer
projection::project_stage was the last yaml_legacy reader in pipeline_state. Drop the read_content+parse_front_matter detour for the "7_frozen" case and always default resume_to to Stage::Coding. The YAML write side in apply.rs goes in stage 7. Story 934 (sibling refactor) will replace Stage::Frozen-with-payload with a frozen flag orthogonal to Stage, so a story frozen in Qa stays in Stage::Qa rather than encoding a "where to resume" target. After 934 lands the resume_to payload disappears entirely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -131,18 +131,12 @@ pub fn project_stage(view: &PipelineItemView) -> Result<Stage, ProjectionError>
|
||||
})
|
||||
}
|
||||
"7_frozen" => {
|
||||
// The stage to resume to is stored in front matter as `resume_to_stage`.
|
||||
// Fall back to Coding if the field is absent (e.g. legacy frozen items).
|
||||
let resume_to = crate::db::read_content(view.story_id())
|
||||
.and_then(|content| {
|
||||
crate::db::yaml_legacy::parse_front_matter(&content)
|
||||
.ok()
|
||||
.and_then(|m| m.resume_to_stage)
|
||||
.and_then(|dir| Stage::from_dir(&dir))
|
||||
})
|
||||
.unwrap_or(Stage::Coding);
|
||||
// Story 929: resume_to was previously read from YAML front matter;
|
||||
// we default to Coding here. Story 934 will obviate this — frozen
|
||||
// becomes a flag orthogonal to Stage, so the story stays in its
|
||||
// current Stage rather than encoding a "where to go next" payload.
|
||||
Ok(Stage::Frozen {
|
||||
resume_to: Box::new(resume_to),
|
||||
resume_to: Box::new(Stage::Coding),
|
||||
})
|
||||
}
|
||||
other => Err(ProjectionError::UnknownStage(other.to_string())),
|
||||
|
||||
Reference in New Issue
Block a user