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:
Timmy
2026-05-12 19:17:10 +01:00
parent 6e704a33b7
commit bfea832402
+5 -11
View File
@@ -131,18 +131,12 @@ pub fn project_stage(view: &PipelineItemView) -> Result<Stage, ProjectionError>
}) })
} }
"7_frozen" => { "7_frozen" => {
// The stage to resume to is stored in front matter as `resume_to_stage`. // Story 929: resume_to was previously read from YAML front matter;
// Fall back to Coding if the field is absent (e.g. legacy frozen items). // we default to Coding here. Story 934 will obviate this — frozen
let resume_to = crate::db::read_content(view.story_id()) // becomes a flag orthogonal to Stage, so the story stays in its
.and_then(|content| { // current Stage rather than encoding a "where to go next" payload.
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);
Ok(Stage::Frozen { Ok(Stage::Frozen {
resume_to: Box::new(resume_to), resume_to: Box::new(Stage::Coding),
}) })
} }
other => Err(ProjectionError::UnknownStage(other.to_string())), other => Err(ProjectionError::UnknownStage(other.to_string())),