ee6d79648a
#80216 fixed /retry (and a follow-up fixed yuanbao recall) destroying soft-archived active=0/compacted=1 in-place-compaction rows via the destructive replace_messages default. Two sibling sites still carried the same class: - acp_adapter/session.py _persist (non-owned-agent branch): probed has_archived_messages and FAILED OPEN into the destructive full replace on any probe error; the probe can also race a concurrent archive_and_compact. Now passes active_only=True unconditionally — on a fresh create/fork every row is active=1 so behavior is identical, and the probe (its only production caller) is deleted. - tui_gateway/methods_prompt.py edit/regenerate truncation: bare replace_messages() deleted the archived transcript of a compacted session on every edit/regenerate. Now active_only=True. hermes_state.has_archived_messages docstring updated (probe is now test/diagnostic-only). Test stubs in test_tui_gateway_server.py accept the new kwarg. New regression tests: real-SQLite archive-survival for both write shapes, fresh-session equivalence (the claim the unconditional switch rests on), and source-level guards pinning that neither site re-grows the fail-open probe (both mutation-checked: revert either fix and its guard fails).