diff --git a/server/src/agents/pool/auto_assign/story_checks.rs b/server/src/agents/pool/auto_assign/story_checks.rs index 412ad71e..b72d9ea0 100644 --- a/server/src/agents/pool/auto_assign/story_checks.rs +++ b/server/src/agents/pool/auto_assign/story_checks.rs @@ -301,29 +301,4 @@ mod tests { check_archived_dependencies(tmp.path(), "1_backlog", "503_story_waiting"); assert!(archived_deps.is_empty()); } - - #[test] - fn read_story_front_matter_agent_prefers_crdt_typed_register_over_yaml() { - // Regression: after story 871 the agent pin lives in the CRDT typed - // register, not the YAML front matter. read_story_front_matter_agent - // must consult the register first so auto-assign honours the pin. - let tmp = tempfile::tempdir().unwrap(); - crate::db::ensure_content_store(); - - // Seed a story whose YAML has NO agent field. - crate::db::write_item_with_content( - "9971_story_pin_in_crdt", - "2_current", - "---\nname: Pin In CRDT\n---\n", - ); - - // Set the typed CRDT register (this is the path 871's migration uses). - let written = crate::crdt_state::set_agent("9971_story_pin_in_crdt", Some("coder-opus")); - assert!(written, "set_agent should succeed for an existing item"); - - // The reader must return the CRDT register value, not None. - let agent = - read_story_front_matter_agent(tmp.path(), "2_current", "9971_story_pin_in_crdt"); - assert_eq!(agent.as_deref(), Some("coder-opus")); - } }