mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
test: alternate roles in the #35809 bloat fixture
load_transcript is now a live-replay restore site that heals alternation violations on load (#64934), so the old all-user 120-row fixture was merged into a single message and the precondition len==120 failed. The fixture was never a valid conversation shape; alternate user/assistant so it exercises the same bloat scenario without tripping the repair.
This commit is contained in:
parent
4851f894be
commit
0fe18b8650
1 changed files with 11 additions and 2 deletions
|
|
@ -151,8 +151,17 @@ def _make_source():
|
|||
|
||||
def _bloat(n):
|
||||
# Stand-in for the oversized, post-compression "child" transcript that
|
||||
# could not be compressed any further (#35809).
|
||||
return [{"role": "user", "content": "x" * 2000} for _ in range(n)]
|
||||
# could not be compressed any further (#35809). Alternates roles so the
|
||||
# fixture is a valid conversation: load_transcript is a live-replay
|
||||
# restore site and heals alternation violations on load (#64934), so a
|
||||
# degenerate all-user transcript would be merged into one message.
|
||||
return [
|
||||
{
|
||||
"role": "user" if i % 2 == 0 else "assistant",
|
||||
"content": "x" * 2000,
|
||||
}
|
||||
for i in range(n)
|
||||
]
|
||||
|
||||
|
||||
class TestAutoResetLoadsCleanContext:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue