hermes-agent/tests/state
kshitij a0801b878a fix: bind continuation-marker exclusions to the queried parent (fail-open fix)
Adversarial review of the salvaged recovery found a reachable fail-open:
compression continuations inherit the rotated agent's model_config
verbatim (publish_compression_child callers pass
agent._session_init_model_config), so a delegate subagent's continuation
carries _delegate_from=<the delegate's own parent>. The marker-PRESENCE
filters in reopen_orphaned_compression_session and
find_live_compression_child misclassified such a REAL continuation as a
delegate child:

- reopen: parent 'orphaned' -> reopened while a live continuation exists
  -> two live heads in one lineage (verified with a live repro)
- find_live: adoption misses the continuation (fail-closed, masked the
  fork pre-PR; the PR made it active)

Fix: markers only disqualify a child when they point at the queried
parent (shared _NON_CONTINUATION_CHILD_FILTER_SQL fragment, also
resolving the duplicated-SQL drift risk flagged by the reuse reviewer).
Both directions regression-tested: reopen fails closed on an
inherited-marker continuation; find_live adopts it.

Also from review: reopen-failure log raised debug->warning (the failure
hard-fails the turn moments later), commit-semantics hardening comment
on the lease DELETE path, blank-line nit.

The three read-only projection walks (get_compression_tip,
list_sessions_rich chain, resume walk) share the marker-presence shape
but fail closed (skip a continuation -> resume shows the parent), and
the fixed adoption path self-heals that case at turn start; left as-is.
2026-08-07 13:24:56 +05:30
..
test_compression_lineage_guard.py fix: bind continuation-marker exclusions to the queried parent (fail-open fix) 2026-08-07 13:24:56 +05:30
test_disk_full_error.py fix(gateway): fail prompt.submit when session storage hits a full disk 2026-08-01 00:27:17 -05:00
test_fts_runtime_rebuild.py
test_no_more_rows_retry.py fix(state): retry transient 'no more rows available' across all sqlite3.Error classes 2026-07-31 23:18:12 -07:00
test_session_model_usage_pk_heal.py fix(state): heal session_model_usage PK unconditionally to restore token/cost accounting 2026-07-31 23:18:12 -07:00
test_write_lock_patience.py