wip(929): stage 2 — migrate chat/transport/matrix/* off yaml_legacy
delete.rs, start.rs, assign.rs all looked up the story name by reading
the content from disk/store and parsing the front matter. Replaced with
`crdt_state::read_item(&story_id).and_then(|w| w.name())`. Each callsite's
fallback chain ("CRDT → content store → filesystem") still locates the
story_id; only the name extraction moved off YAML.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,7 @@ pub async fn handle_start(
|
||||
agents: &AgentPool,
|
||||
) -> String {
|
||||
// Find the story by numeric prefix: CRDT → content store → filesystem.
|
||||
let (story_id, _stage_dir, _path, content) =
|
||||
let (story_id, _stage_dir, _path, _content) =
|
||||
match crate::chat::lookup::find_story_by_number(project_root, story_number) {
|
||||
Some(found) => found,
|
||||
None => {
|
||||
@@ -88,12 +88,9 @@ pub async fn handle_start(
|
||||
}
|
||||
};
|
||||
|
||||
let story_name = content
|
||||
.and_then(|contents| {
|
||||
crate::db::yaml_legacy::parse_front_matter(&contents)
|
||||
.ok()
|
||||
.and_then(|m| m.name)
|
||||
})
|
||||
// Story name comes from the CRDT name register (story 929).
|
||||
let story_name = crate::crdt_state::read_item(&story_id)
|
||||
.and_then(|w| w.name().map(str::to_string))
|
||||
.unwrap_or_else(|| story_id.clone());
|
||||
|
||||
// Resolve agent name: try "coder-{hint}" first, then the hint as-is.
|
||||
|
||||
Reference in New Issue
Block a user