]> git.giacomolli.uk - onechat/commit
Add the summary tree nodes
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 14:32:30 +0000 (11:32 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 14:32:30 +0000 (11:32 -0300)
commit6e20c4df4a0eac7f993d7783e82eb4c1ca6d8c70
treeb7d6a3299f92278926ed2f0056018bcea5ce28cc
parent5023a5ff75de371f147392be54aec7737fca36a5
Add the summary tree nodes

The tree stores each built node (l, i) as one JSON line, {l, i, text,
size}, in tree/YYYY-MM-DD.jsonl, and loads all lines again at start.
Node (l, i) covers the 2^l messages from i*2^l on. The tree refuses a
node that is already built and a parent without both children, so each
node is built once and the tree never holds a gap.

A source that fits in 512 bytes is its own node with no model call. A
short message becomes the leaf "kind: text" word for word, and two short
siblings join with a newline into their parent.

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