]> git.giacomolli.uk - onechat/commit
Replay a synthetic log through the core
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 15:06:45 +0000 (12:06 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 15:06:45 +0000 (12:06 -0300)
commit442c68e1d384a7da0d9ab039704bf763a1c3ac35
treefdba5f4428ddc94ee686bb553526367d31536ecc
parent4e3341f81d4c9b296c8fd016f4a086752d561efd
Replay a synthetic log through the core

The exit check of the memory core runs a synthetic log of 100,000
messages through the core with the fake summarizer. The log mixes short
user lines, replies, notes, reports, tool calls, and tool output, and
one output in a hundred is over 30 KB. The core has no reader of the
optchat log, because that belongs to the history import.

After each message the test checks that the chat view is at most 128,000
bytes and the compaction view at most 32,000, and that a batch merges
the chat view to 64,000 bytes or less. It checks each rendered line: a
built line holds its node, a long message has a summary and not its
text, and an unbuilt line holds only the pending mark. A restart in the
middle and at the end loads the same views and view.json byte for byte.

Issue: beb9a70
replay_test.go [new file with mode: 0644]