mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
test(desktop): give the auto-compaction E2E real headroom over threshold_tokens
The 'queues an Enter-submitted draft while compaction is active' test pastes a large message to push the session over the fixture's 22k threshold_tokens. At repeat(500) the payload is only ~4k tokens — the other ~18k came from the ambient system prompt (tool schemas + skills index + memory), leaving the trigger margin-less. The hermes-agent skill hub restructure (e3d524b482) shrank the bundled skills index by ~160 tokens and dropped the total just under threshold: compaction never started, waitForHeldCompletion() hung, and the test timed out at 90s on every branch since — including main (first red run:9a4d1a0130). Bump the payload to repeat(1500) (~12.4k tokens, total ~30k) so the test crosses the threshold on its own weight with ~8k tokens of margin, and document the invariant so the next prompt-weight change doesn't resurrect this.
This commit is contained in:
parent
a0d2ebaffd
commit
b29ee6a650
1 changed files with 6 additions and 1 deletions
|
|
@ -122,11 +122,16 @@ auxiliary:
|
|||
// A normal message crosses the tiny configured context budget. The mock
|
||||
// blocks only the resulting summary request, so these assertions run
|
||||
// during automatic compaction rather than a slash-command path.
|
||||
// The payload must cross threshold_tokens (22k) on its OWN weight
|
||||
// (~12k tokens) on top of the system prompt. Do not shrink it: at
|
||||
// repeat(500) the trigger only worked because the ambient system prompt
|
||||
// (skills index + tool schemas) happened to carry it over the line, and
|
||||
// a 160-token skills-index cleanup on main broke the test for a day.
|
||||
await pasteAndSend(page, 'E2E_COMPACTION_HISTORY_ONE '.repeat(5))
|
||||
await waitForTranscript(page, MOCK_REPLY)
|
||||
await pasteAndSend(page, 'E2E_COMPACTION_HISTORY_TWO '.repeat(5))
|
||||
await waitForTranscript(page, MOCK_REPLY)
|
||||
await pasteAndSend(page, 'E2E_TRIGGER_AUTOMATIC_COMPACTION '.repeat(500))
|
||||
await pasteAndSend(page, 'E2E_TRIGGER_AUTOMATIC_COMPACTION '.repeat(1500))
|
||||
await fixture.mock.waitForHeldCompletion()
|
||||
await expect(page.getByRole('status', { name: 'Summarizing thread' }).last()).toBeVisible()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue