Files
hermes-agent/gateway
Yingliang Zhang cfd5dc3876 fix(api): scope ancestor reads to display surfaces; guard after_id; stamp read-path fixture
Quad-review follow-up (4 legs ACCEPT-WITH-NITS, P0s independently reproduced):

- _conversation_history_for_session reverts to tip-only: it feeds
  conversation_history for session chat / chat stream / v1 runs (model-fed
  restore must not regrow what compaction summarized away); the
  include_ancestors=True expansion stays on the DISPLAY reads
  (_handle_session_messages + web router). Restores the delegation delivery
  contract test (probe pinned the model history to the tip segment).
- get_messages now raises ValueError for after_id + include_ancestors
  instead of silently ignoring the cursor on a merged-lineage read.
- test_session_db_read_path_split fixture stamps the parent
  end_reason='compression' the way a real rotation (publish_compression_child)
  does; the old unverified parent link is a shape no production writer
  creates and the verified walker correctly rejects.

Verification: test_session_db_read_path_split 9 passed;
test_api_delegation_delivery_contract 2 passed; test_hermes_state.py 270
passed / 1 pre-existing FTS5 base failure (fails identically on 6e07eb4838);
tests/hermes_state/ 310 passed 3 skipped; gateway session-api +
compaction-projection + read-path 44 passed; resume-display + conversation-root
+ tui resume 32 passed; ruff + py_compile + git diff --check clean.
2026-09-28 20:17:37 -05:00
..
…
…
…