]> git.giacomolli.uk - onechat/commit
Send the compaction view in blocks of four lines
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 19:55:18 +0000 (16:55 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 19:55:18 +0000 (16:55 -0300)
commit56129a5fcbcbe51a7ac7d6b009d4551ed9f71109
tree02efcdebd078b24a76d6d0ccfd8cce563f121672
parentfe39a670d7af062af089bdba4dd07c3f0aee4048
Send the compaction view in blocks of four lines

A compaction sends its view as separate input parts of the user
message: the opening tag, one part for each whole block of four lines,
and the rest of the lines with the closing tag. The task and the note
of a retry follow as parts of their own. Joined, the parts are the same
bytes as the single view part before, so the model reads the same text.

The views of two compactions end at different lines when builds run at
once, so before this change no two first tries sent the same view part.
With blocks, they send the same parts up to the last whole block that
both views have. This tests the hypothesis that the ChatGPT backend
reuses a cache entry only up to the end of an input part that both
requests have. The explicit cache breakpoints of the reference
implementation are not used, because the ChatGPT endpoint rejects both
prompt_cache_breakpoint and prompt_cache_options with gpt-6.1-sol.

Issue: 8c5fd2a
compactor.go
compactor_test.go