test(stage-369): widen brittle setCompressionUi({ assertion

PR #2347 hoisted the inline state object to a `state` variable so the
auto-compression handler could share it with appendLiveCompressionCard.
Behavior is identical — same setCompressionUi() dispatch, same calm
compression-card path — but tests/test_run_journal_frontend_static.py
pinned the literal substring `setCompressionUi({` to verify the call
site. Relax the assertion to accept either inline (`{...}`) or hoisted
(`state`) argument form. Both forms route through the same compression
card path; the over-specific substring was the bug.
This commit is contained in:
Hermes Agent
2026-05-16 20:11:06 +00:00
parent ade7401ae1
commit 9441e32adb
+9 -1
View File
@@ -66,7 +66,15 @@ def test_replayed_long_task_events_enter_the_same_live_timeline_handlers():
assert "updateThinking(" in wire_block, "reasoning replay should use the live Thinking card path"
assert "appendLiveToolCard(tc)" in wire_block, "tool replay should use live tool-card rendering"
assert "setCompressionUi({" in wire_block, "compression replay should use the compression card path"
# Compression replay must dispatch through setCompressionUi(...). The handler
# body may build the state object inline (`setCompressionUi({...})`) or hoist
# it into a `state` variable first (`setCompressionUi(state)`) — both forms
# use the same compression-card path, so accept either. Pinning the literal
# `{` after the open-paren was over-specific and broke in v0.51.76 when
# PR #2347 hoisted the state object to share it with `appendLiveCompressionCard`.
assert ("setCompressionUi({" in wire_block) or ("setCompressionUi(state)" in wire_block), (
"compression replay should use the compression card path"
)
assert "_runJournalReplayParams()" in MESSAGES_SRC, "replay attachments should enter _wireSSE via EventSource"