mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 16:18:55 +00:00
test: expect restored human anchor after user-role summary compaction
_is_real_user_message no longer accepts a user-role compaction summary as the human anchor, so _compress_context restores the original user turn after the summary; update the lifecycle-status test's expectation.
This commit is contained in:
parent
c03c247e7c
commit
9ef66ea8c1
1 changed files with 8 additions and 1 deletions
|
|
@ -583,7 +583,14 @@ class TestPreflightCompression:
|
|||
approx_tokens=1234,
|
||||
)
|
||||
|
||||
assert compressed == [{"role": "user", "content": f"{SUMMARY_PREFIX}\nPrevious conversation"}]
|
||||
# The compressor returned only the user-role summary; a summary
|
||||
# message no longer satisfies the human-anchor check, so the real
|
||||
# user turn is restored after it (repair merges the pair
|
||||
# summary-first before the next API call).
|
||||
assert compressed == [
|
||||
{"role": "user", "content": f"{SUMMARY_PREFIX}\nPrevious conversation"},
|
||||
{"role": "user", "content": "hello"},
|
||||
]
|
||||
assert new_system_prompt == "new system prompt"
|
||||
assert events[0][0] == "lifecycle"
|
||||
assert "Compacting context" in events[0][1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue