wip(929): stage 9 — drop FS-archived-deps scan; story_tools/story/create.rs reads CRDT
io/watcher and io/watcher/sweep were already CRDT-only — the watcher only
watches .huskies/{project,agents}.toml, work-item events come from CRDT
subscribe — so the remaining FS shadow reader was the bug-503 archived-dep
warning in story_tools/story/create.rs (via check_archived_deps_from_list,
which scanned .huskies/work/6_archived/). Migrate that call to the
CRDT-direct `dep_is_archived_crdt`. Drop the now-unused helper and the
four dead imports in bug/spike/refactor/criteria.rs that referenced it.
io/story_metadata/deps.rs is reduced to a module-level comment pointing
callers at the crdt_state helpers; nothing in io/ now scans the FS shadow
tree.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +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_from_list, parse_unchecked_todos};
|
||||
use crate::io::story_metadata::parse_unchecked_todos;
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -13,7 +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_from_list, parse_unchecked_todos};
|
||||
use crate::io::story_metadata::parse_unchecked_todos;
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -13,7 +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_from_list, parse_unchecked_todos};
|
||||
use crate::io::story_metadata::parse_unchecked_todos;
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -13,7 +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_from_list, parse_unchecked_todos};
|
||||
use crate::io::story_metadata::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::create_story_file;
|
||||
use crate::io::story_metadata::check_archived_deps_from_list;
|
||||
use crate::slog_warn;
|
||||
use serde_json::Value;
|
||||
|
||||
@@ -51,9 +50,15 @@ pub(crate) fn tool_create_story(args: &Value, ctx: &AppContext) -> Result<String
|
||||
// Bug 503: warn at creation time if any depends_on points at an already-archived story.
|
||||
// Archived = satisfied semantics: the dep will resolve immediately on the next promotion
|
||||
// tick, which is surprising if the archived story was abandoned rather than cleanly done.
|
||||
let archived_deps = depends_on
|
||||
// Story 929: dep archived-status now comes from the CRDT, not a FS scan of 6_archived/.
|
||||
let archived_deps: Vec<u32> = depends_on
|
||||
.as_deref()
|
||||
.map(|deps| check_archived_deps_from_list(&root, deps))
|
||||
.map(|deps| {
|
||||
deps.iter()
|
||||
.copied()
|
||||
.filter(|&d| crate::crdt_state::dep_is_archived_crdt(d))
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
if !archived_deps.is_empty() {
|
||||
slog_warn!(
|
||||
|
||||
Reference in New Issue
Block a user