fix(tests): a Note's is_task cannot be set — status is what makes one (#3099)

The spike CHECK tests constructed Note(is_task=True). `is_task` is a derived
read-only property — `status is not None` — so SQLAlchemy raised
"property 'is_task' of 'Note' object has no setter" before any row reached
the database. All three failed for that, not for anything about migration
0091; the other 80 integration tests passed, including 0090's.

status="todo" is what makes a note a task. Noted inline, since the field
appears in to_dict output and reads like an ordinary column from there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-27 13:43:57 -04:00
committed by bvandeusen
co-authored by Claude Opus 5
parent e2e64b94c0
commit 4be1eaecf6
+4 -1
View File
@@ -32,8 +32,11 @@ async def owner_id():
async def _write(uid: int, kind: str) -> int:
async with async_session() as s:
# No is_task=: it is a derived read-only property (a note IS a task
# when status is not None), so passing it raises rather than being
# ignored. status="todo" is what makes this a task.
note = Note(
user_id=uid, title=f"kind {kind}", body="", is_task=True,
user_id=uid, title=f"kind {kind}", body="",
status="todo", task_kind=kind,
)
s.add(note)