Yuan Li
2305385042
fix(agent): persist the summary-overload budget in session state so fresh bindings inherit it
...
Review P1 on #123186 (ehz0ah): the N=3 sustained-overload budget was
object-local. The gateway binds a fresh compressor to the same session on
every turn / cache eviction, and restart / API-server requests construct
one too, so each fresh instance restarted the budget at zero and a
sustained summary-provider outage walked the session back into
compression_exhausted and auto-reset — the exact wipe the PR exists to
prevent. Reproduced by the reviewer with three fresh compressors bound to
one session: every attempt ended at counter=1.
Persist the streak as sessions.compression_overload_streak through the
same durable channel the fallback streak and recovery deadline already
use (#100185 ): SessionCompressionMixin get/set pair over the sessions
row, loaded in the compressor's durable-load block, written on every
change (overload abort, successful summary, committed boundary, runtime
model switch).
- Compression rotation carries the streak to the child row at the
boundary, same as the fallback streak: the parent's value is read
before the bind, re-applied, and persisted onto the fresh child row.
- A completed compaction boundary settles the budget to 0 — including
the committed degraded fallback, so a recovered provider regains a
full budget instead of the session staying degraded forever.
- Schema event appended to SCHEMA_HISTORY["sessions"] (seq 28, after
compression_recovery_deadline) so salvage replay maps the new column.
- Fresh-instance regression: two aborts on one compressor, then a fresh
compressor bound to the same session inherits streak=2 and the third
session-wide attempt commits the fallback; plus a rotation carry-over
test. Both fail red against the memory-only implementation.
(cherry picked from commit 3742fee8d03d7077d23b0dac3a3c79fe48e102ac)
2026-09-26 22:42:38 +05:30
..
2026-09-24 06:55:33 -04:00
2026-09-25 22:07:48 -04:00
2026-09-23 11:41:01 -04:00
2026-09-24 23:49:18 -04:00
2026-09-26 22:27:13 +05:30
2026-09-24 14:47:06 -04:00
2026-09-24 14:08:22 -04:00
2026-09-24 06:03:29 -04:00
2026-09-23 12:02:05 -04:00
2026-09-25 17:57:38 -05:00
2026-09-23 11:41:01 -04:00
2026-09-23 19:51:34 -04:00
2026-09-25 00:00:09 -04:00
2026-09-22 09:55:47 -04:00
2026-09-24 02:03:59 -04:00
2026-09-25 21:27:06 +05:30
2026-09-23 11:41:01 -04:00
2026-09-24 18:06:48 +05:30
2026-09-25 21:27:06 +05:30
2026-09-25 14:25:16 -05:00
2026-09-26 21:38:28 +05:30
2026-09-26 21:38:28 +05:30
2026-09-24 02:03:59 -04:00
2026-09-25 14:22:12 -04:00
2026-09-24 01:40:31 -04:00
2026-09-25 12:07:32 -05:00
2026-09-24 01:55:51 -04:00
2026-09-24 01:55:51 -04:00
2026-09-24 22:32:57 +05:30
2026-09-25 13:49:31 -05:00
2026-09-23 15:26:34 -04:00
2026-09-24 22:32:57 +05:30
2026-09-22 13:57:51 +05:30
2026-09-25 21:27:06 +05:30
2026-09-24 13:13:35 -04:00
2026-09-23 10:05:40 -07:00
2026-09-23 22:22:32 +05:30
2026-09-23 17:09:54 -07:00
2026-09-23 17:09:54 -07:00
2026-09-24 13:10:14 -04:00
2026-09-23 22:05:49 +00:00
2026-09-24 00:17:13 -07:00
2026-09-23 22:05:49 +00:00
2026-09-24 00:17:13 -07:00
2026-09-25 21:27:06 +05:30
2026-09-25 19:09:03 -05:00
2026-09-23 19:51:34 -04:00
2026-09-24 06:08:20 -04:00
2026-09-23 15:05:44 -07:00
2026-09-24 09:20:50 -04:00
2026-09-26 22:27:13 +05:30
2026-09-23 15:26:34 -04:00
2026-09-22 09:55:47 -04:00
2026-09-22 01:07:59 -07:00
2026-09-23 10:43:45 -04:00
2026-09-24 08:51:52 -04:00
2026-09-24 08:51:52 -04:00
2026-09-24 01:55:51 -04:00
2026-09-23 11:41:01 -04:00
2026-09-23 15:26:34 -04:00
2026-09-23 10:42:18 -04:00
2026-09-25 12:01:44 -05:00
2026-09-23 15:26:34 -04:00
2026-09-23 10:58:15 -07:00
2026-09-23 10:58:15 -07:00
2026-09-23 08:25:28 -07:00
2026-09-23 07:48:32 -07:00
2026-09-25 12:01:44 -05:00
2026-09-26 20:07:47 +05:30
2026-09-25 14:22:12 -04:00
2026-09-23 18:29:35 -05:00
2026-09-24 22:25:06 +05:30
2026-09-24 07:39:33 -04:00
2026-09-24 08:51:52 -04:00
2026-09-24 11:50:30 -04:00
2026-09-22 05:16:50 -04:00
2026-09-22 13:41:11 +05:30
2026-09-22 13:41:11 +05:30
2026-09-25 14:22:12 -04:00
2026-09-23 08:09:47 -07:00
2026-09-23 11:41:01 -04:00
2026-09-23 15:26:34 -04:00
2026-09-25 14:22:12 -04:00
2026-09-25 14:22:12 -04:00
2026-09-23 10:43:45 -04:00
2026-09-25 16:28:14 -05:00
2026-09-25 19:25:40 -05:00
2026-09-24 04:27:31 -05:00
2026-09-24 01:55:51 -04:00
2026-09-25 17:57:38 -05:00
2026-09-25 17:57:38 -05:00
2026-09-23 15:26:34 -04:00
2026-09-22 18:01:46 -04:00
2026-09-22 22:00:24 +00:00
2026-09-25 15:01:16 -04:00
2026-09-24 11:50:30 -04:00
2026-09-23 07:49:35 -07:00
2026-09-23 10:52:20 -04:00
2026-09-24 14:08:21 -04:00
2026-09-23 11:41:01 -04:00
2026-09-25 21:27:06 +05:30
2026-09-25 12:07:32 -05:00
2026-09-25 12:07:32 -05:00
2026-09-26 07:14:26 +05:30
2026-09-24 09:40:41 -04:00
2026-09-26 22:21:47 +05:30
2026-09-22 13:57:51 +05:30
2026-09-23 06:46:02 -07:00
2026-09-24 16:17:47 -04:00
2026-09-22 22:00:24 +00:00
2026-09-23 09:26:07 +05:30
2026-09-25 14:22:12 -04:00
2026-09-22 05:16:50 -04:00
2026-09-24 02:03:03 -07:00
2026-09-22 05:16:50 -04:00
2026-09-24 05:10:12 -04:00
2026-09-25 14:22:12 -04:00
2026-09-23 12:45:32 +05:30
2026-09-23 07:09:45 -07:00
2026-09-24 14:08:21 -04:00
2026-09-24 11:50:29 -04:00
2026-09-24 14:08:21 -04:00
2026-09-24 11:50:29 -04:00
2026-09-24 11:50:29 -04:00
2026-09-25 21:19:04 +05:30
2026-09-24 11:50:29 -04:00
2026-09-25 21:19:04 +05:30
2026-09-24 11:50:29 -04:00
2026-09-25 21:19:04 +05:30
2026-09-22 05:16:50 -04:00
2026-09-22 01:19:12 -07:00
2026-09-22 17:16:00 +05:30
2026-09-22 13:03:25 -04:00
2026-09-23 11:41:01 -04:00
2026-09-25 14:22:12 -04:00
2026-09-22 05:16:50 -04:00
2026-09-22 05:16:50 -04:00
2026-09-24 14:08:21 -04:00
2026-09-25 14:22:12 -04:00
2026-09-24 11:58:45 -04:00
2026-09-24 16:17:16 -04:00
2026-09-25 00:00:09 -04:00
2026-09-25 12:09:37 -05:00
2026-09-22 01:07:59 -07:00
2026-09-23 05:37:40 -07:00
2026-09-24 06:14:42 -04:00
2026-09-23 05:37:40 -07:00
2026-09-23 15:26:34 -04:00
2026-09-25 14:25:16 -05:00
2026-09-23 07:36:31 -04:00
2026-09-23 12:58:33 -04:00
2026-09-23 19:51:34 -04:00
2026-09-24 09:40:09 -04:00
2026-09-25 00:00:09 -04:00
2026-09-24 11:50:30 -04:00
2026-09-24 12:30:00 -04:00
2026-09-23 22:22:32 +05:30
2026-09-23 15:43:51 -07:00
2026-09-25 10:46:54 -05:00
2026-09-26 22:42:38 +05:30
2026-09-24 18:08:24 +05:30
2026-09-23 22:22:32 +05:30
2026-09-23 10:43:45 -04:00
2026-09-23 01:25:04 +05:30
2026-09-24 17:59:37 +05:30
2026-09-24 08:51:52 -04:00
2026-09-22 07:05:11 -04:00
2026-09-25 20:00:57 -05:00
2026-09-25 14:22:12 -04:00
2026-09-24 11:50:30 -04:00
2026-09-24 02:03:58 -04:00
2026-09-24 14:23:48 -04:00
2026-09-23 22:05:57 -04:00
2026-09-25 14:22:12 -04:00
2026-09-23 18:29:35 -05:00
2026-09-23 11:00:15 -04:00
2026-09-24 11:12:27 -04:00
2026-09-24 02:03:59 -04:00
2026-09-22 22:24:31 +00:00
2026-09-24 16:17:16 -04:00
2026-09-24 16:17:47 -04:00
2026-09-25 18:08:49 -05:00
2026-09-25 12:09:37 -05:00
2026-09-24 14:08:22 -04:00
2026-09-26 20:07:47 +05:30
2026-09-25 14:22:12 -04:00
2026-09-23 18:48:33 -05:00
2026-09-26 20:07:47 +05:30
2026-09-24 05:03:23 -04:00
2026-09-24 23:52:31 -04:00
2026-09-22 05:16:50 -04:00
2026-09-25 14:15:22 -04:00
2026-09-24 14:08:22 -04:00
2026-09-25 00:00:09 -04:00
2026-09-24 14:08:22 -04:00
2026-09-23 11:41:01 -04:00
2026-09-23 05:36:30 -07:00
2026-09-23 06:51:47 -07:00
2026-09-25 12:09:37 -05:00
2026-09-25 14:22:12 -04:00
2026-09-25 01:21:28 -04:00
2026-09-26 20:07:47 +05:30
2026-09-25 12:01:44 -05:00
2026-09-22 15:55:23 +05:30
2026-09-25 00:00:09 -04:00
2026-09-25 14:22:12 -04:00
2026-09-23 03:25:06 -07:00
2026-09-22 05:16:50 -04:00
2026-09-23 15:26:34 -04:00
2026-09-23 11:00:15 -04:00
2026-09-25 12:01:44 -05:00
2026-09-24 11:50:30 -04:00
2026-09-23 06:46:02 -07:00
2026-09-23 01:16:41 -07:00
2026-09-23 11:41:01 -04:00
2026-09-25 17:18:06 -05:00
2026-09-23 06:46:02 -07:00
2026-09-25 12:09:37 -05:00
2026-09-25 12:09:37 -05:00
2026-09-23 21:55:59 -04:00
2026-09-24 15:38:22 +05:30
2026-09-23 19:51:34 -04:00