Skip to content

Commit fca434f

Browse files
committed
test(todos): assert the typed context overview budget
Signed-off-by: jackie-cqz <2557911191@qq.com>
1 parent 75ca8e6 commit fca434f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tests/control_plane/test_todo_projection_recovery.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ def test_long_committed_todo_rebuilds_from_the_fresh_head_without_a_second_creat
132132
assert manager["authority_revision"] == before["provider_revision"]
133133
assert manager["todos"][0]["todo_id"] == record["todo_id"]
134134
assert manager["todos"][0]["title"].startswith("Independent evidence")
135-
# The existing safe formatter appends its marker outside the text budget.
136-
assert manager["todos"][0]["title"] == listed["todo"]["title"][:419].rstrip() + "..."
135+
# The typed context owner budgets 420 characters including the ellipsis.
136+
assert manager["todos"][0]["title"] == title[:417].rstrip() + "..."
137+
assert len(manager["todos"][0]["title"]) <= 420
138+
assert manager["todos"][0]["content_truncated"] is True
137139
code, create_replay = _cli(registry, *create)
138140
assert code == 0 and create_replay["status"] == "replayed", create_replay
139141
assert _read(runtime) == before # No new Todo, provider revision or business receipt.

0 commit comments

Comments
 (0)