fix(tests): a Note's is_task cannot be set — status is what makes one (#3099)
CI & Build / Python lint (push) Successful in 5s
CI & Build / Plugin hooks (push) Successful in 10s
CI & Build / integration (push) Successful in 29s
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Python tests (push) Successful in 1m8s
CI & Build / Build & push image (push) Successful in 17s

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 12:05:07 -04:00
co-authored by Claude Opus 5
parent 88e9c0b0bd
commit 15659e2c57
+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)