Files
hermes-agent/tests
teknium1 c44fa8600b fix(tui_gateway): create-time Bot Chat composer pick survives resume (#123805, salvage #125911)
Trim the salvaged change to the salvage bar:

- Tighten the comment at the new `_create_session` marker site to the WHY:
  it records the same provenance `_apply_model_switch` records for a mid-chat
  pick, so `_stored_session_runtime_overrides` can tell a chat-scoped pick from
  an unmarked profile-following row instead of dropping model AND provider.
- Replace the contributor's record-shape test in the 22k-line
  test_tui_gateway_server.py with one end-to-end invariant next to the existing
  Bot Chat composer tests: `session.create` under owning profile B (launch
  profile A has a different model) records B's model as the marker, the first
  row write (`_ensure_session_db_row`) persists it into B's real state.db, and
  the resume read under B's scope restores the picked model and provider.

Red on origin/main (KeyError: the record has no `composer_override_profile`,
so the row is written marker-less and resume falls back to the profile
default); green on head.

Class check (write paths that set a model override on a follow_profile_config
session): `_apply_model_switch` (mid-chat composer pick / /model via
config.set model), the three `session.resume` paths and `_persist_live_session
_runtime` / `_session_row_model_config` already carry the marker on main
(#116889, 53ac548f36); `session.create` was the only writer that did not.
Branch children (`_branch_live`, `session.branch_stored`) do not inherit
`follow_profile_config` or `model_override`, so they are out of the class.
2026-09-28 06:06:17 -07:00
..
…