Repository navigation
fix(sessions): exclude Hermes operational user rows - #2039
Conversation
|
Fixed the E2E failures in ca6afb9. The failing fixtures use an older Hermes Validation:
|
No other confident findings in the specified diff. |
|
@jeff-r2026 I added a real-CLI verification record to the PR description. On native Windows, the built CLI at ca6afb9 read a synthetic Hermes database through the real SQLite CLI: it kept the human prompt and assistant reply, excluded the model-switch record and compressed summary, and left all four database rows intact. I did not run the POSIX verify:world harness. Would the Windows real-CLI record be sufficient for this change, or should I follow up with a Linux world run before re-review? Thanks! |
|
Yes, the Windows record is enough. AGENTS.md asks for one representative real-CLI run, and an isolated run of the built CLI is accepted where |
Problem
Hermes stores operational records and compressed conversation summaries with
role = 'user'. Its session adapter currently treats every such row as human-authored input, so model switches and_compressed_summaryrows enter the normalized transcript and can inflate prompt-derived scoring.Hermes distinguishes these rows in the database:
display_kindand_compressed_summary = 0display_kind_compressed_summary = 1Change
display_kindand_compressed_summaryfrom Hermes'messagestablerole = 'user'row only when it has no display kind and is not a compressed summaryVerification
main: expected message ids['20', '23'], received['20', '21', '22', '23']node node_modules/vitest/vitest.mjs run packages/tool-hermes/src/session-adapter.test.ts --retry 0— 5 passednpm run typecheckgit diff --checknpm run verify:worldcannot run on this Windows checkout: the verifier reports that a world requires a POSIX shell. This adapter boundary is covered with the existing SQLite-query mock, including one ordinary prompt, onemodel_switch, one compressed summary, and one assistant reply.Scope
Hermes session parsing only. No session-store writes, CLI options, or other tool adapters change.
Refs #1989
Real CLI verification (native Windows)
PASS for the built TeamAI CLI at
ca6afb9(Node v24.18.0, SQLite CLI 3.51.1). Used an isolated HOME and local self-mode Git workspace with a synthetic four-row Hermes SQLite database, queried by the real SQLite CLI, without a query mock or model call.This verifies the built CLI's read/filter path on a real SQLite database, not a live Hermes session or a POSIX verify:world run. The POSIX world check remains outstanding: no usable Linux environment was available on this host.