From fb8bec8aafb8d050fca4dc02af4fe2a04fdb690d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 9 Aug 2026 16:53:13 +0200 Subject: docs: name the ceiling in update_message's keep-on-omit convention The convention was documented but not its consequence: because None means keep, no caller can write NULL through this method, and that is invisible from the signature. Unreachable today since every field is filled once when a reply finishes and never cleared. Co-Authored-By: Claude Opus 5 --- docs/superpowers/plans/2026-08-09-external-providers.md | 8 +++++++- llamachat/db.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/superpowers/plans/2026-08-09-external-providers.md b/docs/superpowers/plans/2026-08-09-external-providers.md index d65d6b8..2b448a5 100644 --- a/docs/superpowers/plans/2026-08-09-external-providers.md +++ b/docs/superpowers/plans/2026-08-09-external-providers.md @@ -1980,7 +1980,13 @@ Replace `update_message` with: completion_tokens: int | None = None, model: str | None = None, ) -> None: - """Fill in a streamed reply. Omitted fields keep their stored value.""" + """Fill in a streamed reply. Omitted fields keep their stored value. + + ponytail: no caller can write NULL, since None means "keep". No + caller needs to: every field here is filled once when a reply + finishes and never cleared. The upgrade path if one ever does is a + sentinel object distinct from None, not a second method. + """ columns = ["content = ?"] values: list = [content] for column, value in ( diff --git a/llamachat/db.py b/llamachat/db.py index 4465adc..e88c131 100644 --- a/llamachat/db.py +++ b/llamachat/db.py @@ -227,7 +227,13 @@ class History: completion_tokens: int | None = None, model: str | None = None, ) -> None: - """Fill in a streamed reply. Omitted fields keep their stored value.""" + """Fill in a streamed reply. Omitted fields keep their stored value. + + ponytail: no caller can write NULL, since None means "keep". No + caller needs to: every field here is filled once when a reply + finishes and never cleared. The upgrade path if one ever does is a + sentinel object distinct from None, not a second method. + """ columns = ["content = ?"] values: list = [content] for column, value in ( -- cgit v1.2.3