liuhao1024
a6d65cdd09
fix(state): single durable-shape authority for async_delegations
...
Review follow-up on #94701 : the delegation tool's _initialize_schema
still carried its own CREATE TABLE + ALTER column list for
async_delegations, leaving a second durable-shape authority even with
the column declared in SCHEMA_SQL. Its legacy ALTER added
origin_session_id as bare TEXT (nullable, no default); reconciliation
repairs missing column names only, so a database first opened through
the tool kept a non-canonical shape forever (#94691 ).
Remove the private DDL entirely. The tool's initializer now calls a new
reconcile_state_schema() in hermes_state_schema, which replays the
canonical SCHEMA_SQL (idempotent CREATE IF NOT EXISTS for every table,
canonical indexes included) and reuses SessionDB's declarative
_reconcile_columns for missing-column backfill — one reconciliation
implementation, one authority. Because _parse_schema_columns
reconstructs each column's full constraint expression (type, NOT NULL,
DEFAULT), the tool-first legacy path now adds origin_session_id as
TEXT NOT NULL DEFAULT '' — the canonical shape — and SQLite backfills
existing rows with the '' default.
Opening-order regressions compare FULL PRAGMA table_info metadata
(type, notnull, dflt_value, pk) plus the canonical index set across
fresh SessionDB→tool, legacy→SessionDB, and legacy→tool→SessionDB,
each preserving a pre-existing legacy delegation row.
2026-09-11 06:24:54 -07:00
..
2026-09-08 17:03:01 -07:00
2026-09-11 11:19:53 +05:30
2026-09-11 15:45:43 +05:30
2026-09-07 12:50:29 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:49:57 -07:00
2026-09-07 14:30:41 -07:00
2026-09-07 14:30:41 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-07 08:13:38 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 06:24:54 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 10:27:07 -07:00
2026-09-10 10:27:07 -07:00
2026-09-06 13:08:31 -07:00
2026-09-10 10:27:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-03 14:25:33 -07:00
2026-09-03 14:16:54 -07:00
2026-09-03 14:16:54 -07:00
2026-09-06 23:31:05 +05:30
2026-09-03 14:16:54 -07:00
2026-09-03 14:16:54 -07:00
2026-09-06 23:31:05 +05:30
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-10 10:35:07 -07:00
2026-09-10 11:48:01 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 06:00:46 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-07 07:10:28 -07:00
2026-09-07 06:12:24 -07:00
2026-09-05 18:46:53 +05:30
2026-09-10 10:35:07 -07:00
2026-09-10 02:21:16 +05:30
2026-09-10 02:21:16 +05:30
2026-09-03 09:44:26 -07:00
2026-09-07 08:18:56 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 15:32:47 +05:30
2026-09-03 09:44:26 -07:00
2026-09-09 12:17:57 +05:30
2026-09-08 02:26:05 +05:30
2026-09-10 05:02:41 -07:00
2026-09-06 05:03:20 -07:00
2026-09-10 10:23:12 -07:00
2026-09-06 12:02:43 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 19:04:06 +10:00
2026-09-10 05:02:41 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:24:04 -07:00
2026-09-03 17:13:22 -07:00
2026-09-09 11:46:36 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:33:47 -07:00
2026-09-07 00:28:46 +05:30
2026-09-07 00:28:46 +05:30
2026-09-03 13:28:22 -07:00
2026-09-03 13:10:52 -07:00
2026-09-03 13:30:27 -07:00
2026-09-03 13:30:27 -07:00
2026-09-06 12:05:53 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:53:03 -07:00
2026-09-08 14:57:15 -07:00
2026-09-09 11:46:36 -07:00
2026-09-03 13:24:04 -07:00
2026-09-05 13:51:06 -07:00
2026-09-07 04:46:54 -07:00
2026-09-09 12:18:58 -07:00
2026-09-07 06:35:14 -07:00
2026-09-10 02:21:16 +05:30
2026-09-11 03:45:33 +05:30
2026-09-07 08:22:35 -07:00
2026-09-03 09:44:26 -07:00
2026-09-08 17:44:51 -07:00
2026-09-07 08:22:35 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 02:21:16 +05:30
2026-09-10 18:12:39 -07:00
2026-09-03 13:28:47 -07:00
2026-09-09 12:20:21 +05:30
2026-09-06 13:18:19 -07:00
2026-09-09 11:27:29 -07:00
2026-09-09 12:20:21 +05:30
2026-09-09 12:20:21 +05:30
2026-09-03 13:28:47 -07:00
2026-09-09 12:20:21 +05:30
2026-09-07 22:47:33 +05:30
2026-09-03 09:44:26 -07:00
2026-09-09 12:20:21 +05:30
2026-09-03 13:28:47 -07:00
2026-09-09 12:20:21 +05:30
2026-09-06 14:53:13 +05:30
2026-09-09 12:19:13 +05:30
2026-09-04 00:15:16 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 22:47:33 +05:30
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 08:25:33 -07:00
2026-09-07 12:50:29 -07:00
2026-09-07 08:25:33 -07:00
2026-09-09 10:56:37 +05:30
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 08:14:51 -07:00
2026-09-03 13:49:57 -07:00
2026-09-11 19:04:06 +10:00
2026-09-08 17:51:35 +10:00
2026-09-11 06:24:11 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 08:15:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:33:47 -07:00
2026-09-11 19:04:06 +10:00
2026-09-09 12:19:13 +05:30
2026-09-11 19:04:06 +10:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 07:05:59 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 05:59:43 -07:00
2026-09-11 19:04:06 +10:00
2026-09-11 19:04:06 +10:00
2026-09-03 13:22:48 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 07:17:03 -07:00
2026-09-11 19:04:06 +10:00
2026-09-04 00:15:16 -07:00
2026-09-06 07:17:03 -07:00
2026-09-06 07:17:03 -07:00
2026-09-03 13:27:01 -07:00
2026-09-11 19:04:06 +10:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-05 18:04:00 +05:30
2026-09-06 13:32:51 +05:30
2026-09-07 12:50:29 -07:00
2026-09-05 19:01:22 +05:30
2026-09-07 06:05:51 -07:00
2026-09-03 13:24:04 -07:00
2026-09-03 13:24:04 -07:00
2026-09-11 11:19:53 +05:30
2026-09-06 12:06:04 -07:00
2026-09-10 11:48:01 -07:00
2026-09-07 08:09:20 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 03:45:33 +05:30
2026-09-03 17:13:22 -07:00
2026-09-10 02:21:15 +05:30
2026-09-10 02:21:16 +05:30
2026-09-10 02:21:16 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:30:31 -07:00
2026-09-03 13:17:25 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:20:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:30:31 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:24:36 -07:00
2026-09-03 13:24:36 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 13:08:53 -07:00
2026-09-05 18:46:16 +05:30
2026-09-04 07:17:00 -07:00
2026-09-03 17:13:22 -07:00
2026-09-11 19:04:06 +10:00
2026-09-11 19:04:06 +10:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00