Teknium
54714ef066
refactor(state): table-drive parent-metadata inheritance SQL, unify end-stamp bump and delete cascades, collapse defensive layers in hermes_state_sessions
2026-09-02 23:17:22 -07:00
Teknium
c8616a9127
refactor(state): drop unreferenced re-exports and dead helpers in hermes_state; fold open path into _open_writer, unify read-conn close logging
2026-09-02 22:59:30 -07:00
Teknium
3e566e9389
refactor(cli): drop rich imports left unused after the two-region merge
2026-09-02 21:45:46 -07:00
Teknium
ac622be8b6
Merge branch 'simp/r3-00-state' into simp/r3-00
2026-09-02 21:36:08 -07:00
Teknium
a75a98b2fe
Merge branch 'simp/r3-00-stmods' into simp/r3-00
2026-09-02 20:42:13 -07:00
Teknium
833ffda3d6
refactor(state): repack hermes_state re-export import blocks
2026-09-02 20:32:35 -07:00
Teknium
71242c419f
refactor(state): fold replaced/WAL-generation guards into two halt helpers
2026-09-02 20:25:40 -07:00
Teknium
ff3ebf509f
refactor(state): dict-dispatch persistence-error classifier, unify WHERE/placeholder builders, compact docstrings across state modules
2026-09-02 20:18:08 -07:00
Teknium
36b7fe14ee
refactor(state): hand-compact remaining long docstrings (all invariants kept)
2026-09-02 20:12:31 -07:00
Teknium
76f5a58cfc
refactor(state): pack one remaining signature
2026-09-02 20:09:45 -07:00
Teknium
93b15c690a
Merge branch 'simp/r3-00-cliB' into simp/r3-00
2026-09-02 20:07:59 -07:00
Teknium
a4edb9f228
refactor(state): local _scrub_surrogates in messages mixin instead of four lazy imports
2026-09-02 20:07:48 -07:00
Teknium
28eb24eb3a
refactor(state): reflow full-line comment paragraphs to the 108-col budget (word-preserving)
2026-09-02 19:59:11 -07:00
Teknium
2865973f9e
refactor(state): hoist chain-step SQL, fold cooldown/number readers in compression mixin
2026-09-02 19:53:54 -07:00
Teknium
3c9a51bbf1
refactor(state): unify writer-conn setup, drop dead attrs/branches, compact hermes_state comments
2026-09-02 19:53:29 -07:00
Teknium
cd9c9aaaa4
refactor(cli): group immutable overlay/pet/voice state inits in HermesCLI._init_ui_state
2026-09-02 19:51:58 -07:00
Teknium
6331d43126
Merge branch 'simp/r3-00-cliA' into simp/r3-00
2026-09-02 19:50:21 -07:00
Teknium
9fe1267a88
refactor(state): tighten messages mixin helpers (reaction check, replay-dup loop, one-line probes)
2026-09-02 19:49:28 -07:00
Teknium
f731c63e89
refactor(state): drop blank separators around nested _do txn closures
2026-09-02 19:47:36 -07:00
Teknium
3c615c48e9
refactor(state): AST-neutral bracket/string-literal layout pass on the six mixin modules
2026-09-02 19:45:18 -07:00
Teknium
4de8710b74
refactor(state): unify _placeholders/_ended_by_compression/row-probe SQL into hermes_state_common
2026-09-02 19:43:49 -07:00
Teknium
7d48a84acf
refactor(state): reflow prose docstrings to the 108-col budget (word-preserving)
2026-09-02 19:39:50 -07:00
Teknium
cecd39fc75
Merge branch 'simp/r3-00-stmods-mdb' into simp/r3-00-stmods
2026-09-02 19:33:18 -07:00
Teknium
c63651c8de
Merge branch 'simp/r3-00-stmods-msg' into simp/r3-00-stmods
2026-09-02 19:33:16 -07:00
Teknium
1064a3a935
refactor(state): compact SessionMaintenanceMixin and state.db file helpers (-280 LOC, SQL-parity neutral)
...
hermes_state_maintenance.py 557->418, hermes_state_dbfile.py 545->404.
- _placeholders() replaces 4 inline ','.join('?'...) builders (identical output)
- _write_guards_reject() unifies the lease/lock probe in sweep_orphaned_sessions
and prune_sessions (same kwargs, same exception set; prune keeps set -= order)
- _page_pragmas() absorbs the try/except-debug shape of logical_size_bytes and
_freelist_ratio (log texts unchanged); _try_checkpoint() for the two WAL
checkpoints in vacuum(); _seconds_since() for the two state_meta float parses
- archived tri-state -> f'string' clause (byte-identical SQL)
- dbfile: contextlib.suppress for pass-only excepts, lock closures collapsed,
unreachable size<0 branch dropped, is_zeroed tail folded to one predicate
- docstrings/comments compacted by hand; every WHY/lock-safety invariant kept
SQL PARITY OK (1120 stmts), MSG PARITY OK, import smoke OK.
2026-09-02 19:32:41 -07:00
Teknium
991253e56a
refactor(cli): extract chat() + per-turn phase helpers into hermes_cli/cli_chat_turn_mixin.py (CLIChatTurnMixin)
2026-09-02 19:32:38 -07:00
Teknium
e0545fb06d
refactor(state): compact hermes_state_messages mixin (1425->1254 LOC, zero behavior change)
...
- shared SQL constants for repeated literals (display-meta row/update, active ids,
counter set/reset, archive-active, bump-generation)
- _bump_session_counters helper replaces the duplicated UPDATE-counters branches in
append_message/append_messages_batch (byte-identical SQL for both shapes)
- archive_and_compact tail/counter statements composed from one template each
(byte-identical for every branch), replacing two if/else literal pairs
- collapsed redundant guards: sqlite3.Row hasattr check, cache getter, boundary
int parse, message_count/message_dict helpers, get_messages paging slices
- hand-compacted docstrings (WHY/invariants kept), inlined single-use column tuples
- SQL trace parity + 73-record message-dict parity + import smoke verified
2026-09-02 19:30:31 -07:00
Teknium
224420c937
Merge branch 'simp/r3-00-stmods-gwc' into simp/r3-00-stmods
2026-09-02 19:27:12 -07:00
Teknium
ee354cec48
refactor(cli): flatten _start_worktree_setup/_build_cli_from_args, compact HermesCLI turn/shutdown comments (WHYs kept)
2026-09-02 19:26:52 -07:00
Teknium
af85e7c644
refactor(state): compact SessionGatewayMixin/SessionCompressionMixin — compose fail_handoff/lineage SQL, unify set_* writers, trim docstrings
2026-09-02 19:21:56 -07:00
Teknium
719ad479ac
refactor(cli): lift main()'s single-query branch into _run_single_query_mode + _configure_quiet_agent
2026-09-02 19:20:44 -07:00
Teknium
d254525a39
refactor(state): extract session lifecycle/listing to hermes_state_sessions and FTS setup to hermes_state_fts
2026-09-02 19:20:36 -07:00
Teknium
b731a1675f
refactor(cli): split HermesCLI._init_model_routing/_init_runtime_state into phase helpers; compact __init__ display options
2026-09-02 19:17:19 -07:00
Teknium
cfca47c2eb
refactor(cli): lift run() app construction/signal/stdin probes and _tui_print_startup prewarm+maintenance phases into helpers
2026-09-02 19:09:43 -07:00
Teknium
4e816f16c1
refactor(cli): join short multi-line calls (AST-identical)
2026-09-02 19:07:38 -07:00
Teknium
cee3f5b026
refactor(cli): split _tui_process_loop into idle tick, input unwrap, one-input dispatch, slash run and after-turn helpers
2026-09-02 19:04:08 -07:00
Teknium
5def9faff0
refactor(cli): reuse banner art from hermes_cli.banner; collapse _cprint loop fallbacks
2026-09-02 19:02:17 -07:00
Teknium
e0cad5109e
refactor(hermes_constants): split Windows node heal into stage/swap phase helpers
2026-09-02 19:01:21 -07:00
Teknium
f0d24b3c2e
refactor(cli): split _chat_render_turn and _process_unregistered_slash into per-branch helpers
2026-09-02 18:59:19 -07:00
Teknium
b6773e3a96
refactor(hermes_startup_watchdog): unify never-raise logging in the fire path
2026-09-02 18:58:21 -07:00
Teknium
8cd56917b6
refactor(misc): join short multi-line statements (AST-identical)
2026-09-02 18:55:16 -07:00
Teknium
9bbe578aca
refactor(misc): drop intra-function blank lines (AST-identical)
2026-09-02 18:52:34 -07:00
Teknium
458b56a47c
refactor(cli): split chat() into image-routing, @-reference, staging and audio-release phase helpers
2026-09-02 18:52:01 -07:00
Teknium
d5a2913a89
refactor(cli): table-drive best-effort shutdown steps in _run_cleanup
2026-09-02 18:50:31 -07:00
Teknium
182dc4b313
refactor(state): extract read-connection budgeting to hermes_state_readpool
2026-09-02 18:50:30 -07:00
Teknium
511c7fb9b7
refactor(state): compact common preview/lineage helpers and comments
2026-09-02 18:49:10 -07:00
Teknium
8c9c7a041a
refactor(cli): extract git worktree machinery into hermes_cli/worktree_ops.py (cli re-exports)
2026-09-02 18:44:44 -07:00
Teknium
3f73e6ab4d
refactor(batch_runner): table-drive runner fields, banner helper, reasoning-turn predicate
2026-09-02 18:44:40 -07:00
Teknium
e527b0699d
refactor(state): extract error types/classifiers to hermes_state_errors and the live-DB guard to hermes_state_guard
2026-09-02 18:44:39 -07:00
Teknium
b8bc47032b
refactor(state): compact common lock helpers (shared lock-file rewrite, merged holder-record parse)
2026-09-02 18:43:04 -07:00