ulysses/core
Afonso Coutinho baf9179d94
Fix truncate_messages persisting an inflated message_count (#2052)
truncate_messages deletes db_messages[keep_count:] (a no-op when
keep_count >= the real message total) then unconditionally wrote
db_session.message_count = keep_count. When keep_count exceeds the
number of messages that actually exist — e.g. the manage_session AI
tool defaults keep_count to 10, and the HTTP truncate endpoint passes
any client value — the persisted count is set too high (10 on a
3-message session), diverging from the real row count. That column
gates lazy DB-hydration in get_session (message_count > 0) and is
surfaced to the history UI, so it is correctness-relevant. Clamp to
min(keep_count, len(db_messages)); the in-memory slice already caps
naturally.
2026-06-04 21:19:16 +02:00
..
__init__.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
atomic_io.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
auth.py fix(auth): revoke API tokens when deleting users 2026-06-04 04:44:34 +01:00
constants.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
database.py fix(models): stabilize proxy endpoint refresh behavior 2026-06-04 04:56:11 +01:00
exceptions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
middleware.py Fix email-thread HTML injection, attachment path traversal, and missing authz (#475) 2026-06-01 22:20:17 +09:00
models.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
platform_compat.py [Bash] Fix Windows cookbook background tasks (#676) 2026-06-04 04:30:01 +01:00
session_manager.py Fix truncate_messages persisting an inflated message_count (#2052) 2026-06-04 21:19:16 +02:00