wip(929): stage 5 — drop FS-based dep checks and qa-mode parser from io/story_metadata
Migrate the last three callers of the FS-scanning dependency helpers to the CRDT-direct equivalents and delete the dead helpers: - agents/pool/auto_assign/story_checks.rs: has_unmet_dependencies and check_archived_dependencies now wrap check_unmet_deps_crdt / check_archived_deps_crdt directly. Tests rewritten to seed the CRDT. - http/mcp/story_tools/story/update.rs: bug-503 archived-dep warning now reads from CRDT instead of scanning 6_archived. - agents/pool/pipeline/advance/helpers.rs: resolve_qa_mode_from_store is CRDT-only (the FS fallback for content-store-empty stories is gone). - io/story_metadata/parser.rs: resolve_qa_mode_from_content removed. - io/story_metadata/deps.rs: check_unmet_deps and dep_is_done deleted, along with the unused check_unmet_deps_from_list helper. - io/story_metadata/mod.rs: re-exports trimmed accordingly. check_archived_deps_from_list survives because story-creation still calls it before the CRDT entry exists (used from story_tools/story/create.rs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,9 +13,7 @@ use crate::http::workflow::{
|
||||
list_refactor_files, load_pipeline_state, load_upcoming_stories, remove_criterion_from_file,
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::io::story_metadata::{check_archived_deps_from_list, parse_unchecked_todos};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -13,9 +13,7 @@ use crate::http::workflow::{
|
||||
list_refactor_files, load_pipeline_state, load_upcoming_stories, remove_criterion_from_file,
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::io::story_metadata::{check_archived_deps_from_list, parse_unchecked_todos};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -13,9 +13,7 @@ use crate::http::workflow::{
|
||||
list_refactor_files, load_pipeline_state, load_upcoming_stories, remove_criterion_from_file,
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::io::story_metadata::{check_archived_deps_from_list, parse_unchecked_todos};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -13,9 +13,7 @@ use crate::http::workflow::{
|
||||
list_refactor_files, load_pipeline_state, load_upcoming_stories, remove_criterion_from_file,
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::io::story_metadata::{check_archived_deps_from_list, parse_unchecked_todos};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
use crate::http::context::AppContext;
|
||||
use crate::http::workflow::update_story_in_file;
|
||||
use crate::io::story_metadata::check_archived_deps;
|
||||
use crate::slog_warn;
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
@@ -89,12 +88,8 @@ pub(crate) fn tool_update_story(args: &Value, ctx: &AppContext) -> Result<String
|
||||
}
|
||||
|
||||
// Bug 503: warn if any depends_on in the (now updated) story points at an archived story.
|
||||
let stage = crate::pipeline_state::read_typed(story_id)
|
||||
.ok()
|
||||
.flatten()
|
||||
.map(|i| i.stage.dir_name().to_string())
|
||||
.unwrap_or_else(|| "1_backlog".to_string());
|
||||
let archived_deps = check_archived_deps(&root, &stage, story_id);
|
||||
// Story 929: reads from the CRDT (was a FS-yaml scan).
|
||||
let archived_deps = crate::crdt_state::check_archived_deps_crdt(story_id);
|
||||
if !archived_deps.is_empty() {
|
||||
slog_warn!(
|
||||
"[update-story] Story '{story_id}' depends_on {archived_deps:?} which \
|
||||
|
||||
Reference in New Issue
Block a user