teknium1
576accd92b
refactor(sqlite): one open_db/transaction layer for every small store; plugin DBs use the WAL fallback
...
Twelve modules each carried their own sqlite3.connect + PRAGMA + `with conn:`
stack. The #69567 fd-leak fix (a `with conn:` commits but never closes, so each
call leaked a connection and its WAL/SHM fds until GC) was pasted as code plus
docstring into six of them and hosted_room_policy_checkpoint never received
it; plugins/plugin_storage.plugin_db was the only production caller issuing a
raw `PRAGMA journal_mode=WAL`, bypassing the network-FS fallback, the
WAL-reset-bug gate and the never-live-downgrade invariant that
hermes_state_wal.apply_wal_with_fallback carries.
hermes_cli/sqlite_util.py (already home to add_column_if_missing/write_txn,
imported by cron, gateway and hermes_cli alike) gains `open_db(path, *,
db_label, busy_timeout_ms, wal, foreign_keys, synchronous_full, row_factory,
check_same_thread, wal_lock_retries, initialize)` and `transaction(conn,
immediate=)`; cron/ledger.py is deleted and hosted_rooms_common's
open_sqlite/connect/transaction become 1-3 line forwarders. Migrated:
agent/verification_evidence, cron/{executions,incidents,notepad,
delivery_queue}, gateway/{delivery_ledger,hosted_room_policy_checkpoint,
hosted_rooms_common (-> hosted_rooms, hosted_room_driver)}, hermes_cli/
projects_db, tools/async_delegation, plugins/plugin_storage.
Behavior changes (each module keeps its effective PRAGMA set otherwise):
- hosted_room_policy_checkpoint: connection now closed after every use and
on init failure (was leaked per call), busy_timeout PRAGMA set explicitly.
- projects_db: gains busy_timeout=5000 (was the sqlite3 default 5 s connect
timeout with no PRAGMA); explicit and observable.
- delivery_ledger / async_delegation: busy_timeout PRAGMA now mirrors the
10 s connect timeout they already had.
- plugin_storage.plugin_db: WAL through apply_wal_with_fallback (DELETE on
network filesystems / WAL-reset-vulnerable builds instead of raw WAL);
busy_timeout=5000.
- cron/incidents._redact_error: redact_sensitive_text(force=True) — the
error text is persisted to disk.
- delivery_ledger's private duplicate-column guard and the unguarded
`ALTER TABLE ADD COLUMN` sites (shared_metrics, api_server_run_idempotency,
holographic store, kanban model_override) go through add_column_if_missing.
- hermes_state.py::_scrub_surrogates: dead byte-copy of
hermes_state_messages._scrub_surrogates (0 callers) deleted.
2026-09-13 05:08:29 -07:00
..
2026-09-12 01:35:05 -07:00
2026-09-12 20:55:04 -07:00
2026-09-11 15:45:43 +05:30
2026-09-02 22:36:16 -07:00
2026-09-07 12:50:29 -07:00
2026-09-02 22:36:16 -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-12 21:12:18 -07:00
2026-09-11 19:39:12 -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-12 22:03:19 -07:00
2026-09-03 09:44:26 -07:00
2026-09-13 05:08:29 -07:00
2026-09-02 22:36:16 -07:00
2026-09-02 22:36:16 -07:00
2026-09-02 22:36:15 -07:00
2026-09-03 09:44:26 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 05:07:11 -07:00
2026-09-06 13:08:31 -07:00
2026-09-13 05:07:11 -07:00
2026-09-03 17:13:22 -07:00
2026-09-12 01:35:05 -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-02 22:47:50 -07:00
2026-09-02 22:47:50 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-11 19:39:12 -07:00
2026-09-03 14:16:54 -07:00
2026-09-03 14:16:54 -07:00
2026-09-12 08:43:28 -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-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-11 15:44:00 -07:00
2026-09-11 15:26:46 -07:00
2026-09-10 11:48:01 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 15:44:00 -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-02 22:36:16 -07:00
2026-09-11 15:44:00 -07:00
2026-09-02 23:08:22 -07:00
2026-09-11 15:44:00 -07:00
2026-09-05 18:46:53 +05:30
2026-09-10 10:35:07 -07:00
2026-09-02 22:36:16 -07:00
2026-09-10 02:21:16 +05:30
2026-09-10 02:21:16 +05:30
2026-09-11 19:39:12 -07:00
2026-09-07 08:18:56 -07:00
2026-09-03 09:44:26 -07:00
2026-09-12 20:57:21 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 00:10:18 -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-11 19:39:12 -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 11:54:49 -07: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 00:10:18 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-11 15:29:15 -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-02 22:48:08 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 13:33:47 -07:00
2026-09-07 00:28:46 +05:30
2026-09-12 20:52:49 -07:00
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-11 15:29:15 -07:00
2026-09-11 15:44:00 -07:00
2026-09-03 17:13:22 -07:00
2026-09-12 21:55:07 -07:00
2026-09-03 13:53:03 -07:00
2026-09-02 22:50:57 -07:00
2026-09-12 22:18:06 -07:00
2026-09-11 19:39:12 -07:00
2026-09-11 19:39:12 -07:00
2026-09-02 22:06:11 -07:00
2026-09-05 13:51:06 -07:00
2026-09-07 04:46:54 -07:00
2026-09-12 12:32:55 -07:00
2026-09-12 12:32:55 -07:00
2026-09-12 08:12:38 -07:00
2026-09-10 02:21:16 +05:30
2026-09-12 10:00:06 +05:30
2026-09-03 00:11:01 -07:00
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-13 05:07:11 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 02:21:16 +05:30
2026-09-02 23:56:55 -07:00
2026-09-11 19:39:12 -07:00
2026-09-03 13:28:47 -07:00
2026-09-11 15:27:23 -07:00
2026-09-12 21:05:29 -07:00
2026-09-12 09:05:56 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-12 01:35:05 -07:00
2026-09-11 15:27:23 -07:00
2026-09-07 22:47:33 +05:30
2026-09-03 09:44:26 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-12 21:05:29 -07:00
2026-09-12 21:05:29 -07:00
2026-09-12 20:43:42 -07:00
2026-09-09 12:19:13 +05:30
2026-09-03 01:43:42 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 22:59:19 -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-12 21:13:40 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 23:56:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-11 19:58:07 -07:00
2026-09-07 12:50:29 -07:00
2026-09-07 08:25:33 -07:00
2026-09-12 22:09:19 -07:00
2026-09-03 09:44:26 -07:00
2026-09-12 22:09:19 -07:00
2026-09-04 00:15:16 -07:00
2026-09-11 15:26:46 -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-12 22:11:56 -07:00
2026-09-07 08:14:51 -07:00
2026-09-03 13:49:57 -07:00
2026-09-11 11:54:49 -07:00
2026-09-03 01:36:04 -07:00
2026-09-11 15:26:46 -07:00
2026-09-11 06:24:11 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 01:41:16 -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-12 01:35:05 -07:00
2026-09-09 12:19:13 +05:30
2026-09-11 11:54:49 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 00:55:09 -07:00
2026-09-12 05:09:26 -07:00
2026-09-12 21:50:30 -07:00
2026-09-12 07:54:04 -07:00
2026-09-07 05:59:43 -07:00
2026-09-11 11:54:49 -07:00
2026-09-11 11:54:49 -07:00
2026-09-03 13:22:48 -07:00
2026-09-02 21:42:18 -07:00
2026-09-02 21:42:18 -07:00
2026-09-12 21:50:30 -07:00
2026-09-06 07:17:03 -07:00
2026-09-03 00:05:14 -07:00
2026-09-11 11:54:49 -07: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 01:09:55 -07:00
2026-09-03 13:27:01 -07:00
2026-09-03 01:09:55 -07:00
2026-09-13 05:07:50 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 01:09:12 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 22:37:39 -07:00
2026-09-11 19:39:12 -07:00
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-12 20:55:04 -07:00
2026-09-11 11:19:53 +05:30
2026-09-11 15:29:15 -07:00
2026-09-10 11:48:01 -07:00
2026-09-07 08:09:20 -07:00
2026-09-03 01:13:51 -07:00
2026-09-12 01:35:05 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 15:26:46 -07:00
2026-09-11 15:44:00 -07:00
2026-09-11 19:39:12 -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-12 10:00:08 +05:30
2026-09-03 13:17:25 -07:00
2026-09-13 05:07:50 -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-13 05:07:50 -07:00
2026-09-03 13:20:22 -07:00
2026-09-13 05:07:50 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 01:23:19 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 01:17:43 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-13 05:07:50 -07:00
2026-09-03 13:20:22 -07:00
2026-09-13 05:07:50 -07:00
2026-09-03 17:13:22 -07:00
2026-09-12 13:44:52 -07:00
2026-09-02 23:28:33 -07:00
2026-09-03 17:13:22 -07:00
2026-09-13 05:07:50 -07:00
2026-09-11 19:14:24 -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-13 05:07:11 -07:00
2026-09-12 21:30:38 -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-03 00:10:38 -07:00
2026-09-13 05:07:11 -07:00
2026-09-03 09:44:26 -07:00
2026-09-13 05:07:50 -07:00
2026-09-03 00:27:38 -07:00
2026-09-03 17:13:22 -07:00