huskies: merge 520_story_typed_pipeline_state_machine_in_rust_foundation_replaces_stringly_typed_crdt_views_with_strict_enums_subsumes_436
This commit is contained in:
@@ -108,11 +108,11 @@ pub async fn handle_assign(
|
||||
// --- DB-first lookup ---
|
||||
for id in crate::db::all_content_ids() {
|
||||
let file_num = id.split('_').next().unwrap_or("");
|
||||
if file_num == story_number && let Some(item) = crate::crdt_state::read_item(&id) {
|
||||
if file_num == story_number && let Ok(Some(item)) = crate::pipeline_state::read_typed(&id) {
|
||||
let path = project_root
|
||||
.join(".huskies")
|
||||
.join("work")
|
||||
.join(&item.stage)
|
||||
.join(item.stage.dir_name())
|
||||
.join(format!("{id}.md"));
|
||||
found = Some((path, id));
|
||||
break;
|
||||
|
||||
@@ -76,13 +76,13 @@ pub async fn handle_delete(
|
||||
// --- DB-first lookup ---
|
||||
for id in crate::db::all_content_ids() {
|
||||
let file_num = id.split('_').next().unwrap_or("");
|
||||
if file_num == story_number && let Some(item) = crate::crdt_state::read_item(&id) {
|
||||
if file_num == story_number && let Ok(Some(item)) = crate::pipeline_state::read_typed(&id) {
|
||||
let path = project_root
|
||||
.join(".huskies")
|
||||
.join("work")
|
||||
.join(&item.stage)
|
||||
.join(item.stage.dir_name())
|
||||
.join(format!("{id}.md"));
|
||||
found = Some((path, item.stage, id));
|
||||
found = Some((path, item.stage.dir_name().to_string(), id));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,11 +95,11 @@ pub async fn handle_start(
|
||||
// --- DB-first lookup ---
|
||||
for id in crate::db::all_content_ids() {
|
||||
let file_num = id.split('_').next().unwrap_or("");
|
||||
if file_num == story_number && let Some(item) = crate::crdt_state::read_item(&id) {
|
||||
if file_num == story_number && let Ok(Some(item)) = crate::pipeline_state::read_typed(&id) {
|
||||
let path = project_root
|
||||
.join(".huskies")
|
||||
.join("work")
|
||||
.join(&item.stage)
|
||||
.join(item.stage.dir_name())
|
||||
.join(format!("{id}.md"));
|
||||
found = Some((path, id));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user