File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,3 +171,28 @@ def test_import_agent_plan_merges_done_into_preserved_tasks_md():
171171 assert "REQ-001" in item .tasks_md
172172 assert item .checklist [0 ].done is True
173173 assert len (item .checklist ) == 2
174+
175+
176+ def test_workspace_todos_update_materializes_checklist (tmp_path : Path ):
177+ from cecli .spec .todos import WorkspaceTodos
178+
179+ api = WorkspaceTodos (tmp_path )
180+ store = api .load ()
181+ item = TodoItem (
182+ id = "t1" ,
183+ title = "Feature" ,
184+ tasks_md = "" ,
185+ checklist = [],
186+ created_at = _now_iso (),
187+ updated_at = _now_iso (),
188+ )
189+ store .todos .append (item )
190+ api .save (store )
191+
192+ updated , _ = api .update (
193+ item .id ,
194+ tasks_md = "- [ ] 1. Scaffold lib/ (depends: none)\n - [x] 2. Add tests\n " ,
195+ )
196+ assert len (updated .checklist ) == 2
197+ assert updated .checklist [0 ].done is False
198+ assert updated .checklist [1 ].done is True
You can’t perform that action at this time.
0 commit comments