From bfea83240205aed37f99d0cdf35940d30763fde9 Mon Sep 17 00:00:00 2001 From: Timmy Date: Tue, 12 May 2026 19:17:10 +0100 Subject: [PATCH] =?UTF-8?q?wip(929):=20stage=206=20=E2=80=94=20drop=20resu?= =?UTF-8?q?me=5Fto=5Fstage=20YAML=20lookup=20from=20projection=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- server/src/pipeline_state/projection.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/server/src/pipeline_state/projection.rs b/server/src/pipeline_state/projection.rs index 064d28c7..b2afd5d1 100644 --- a/server/src/pipeline_state/projection.rs +++ b/server/src/pipeline_state/projection.rs @@ -131,18 +131,12 @@ pub fn project_stage(view: &PipelineItemView) -> Result }) } "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())),