fix(lessons): a multi-paragraph trigger no longer grows a copy of itself on every edit (#4272) #179

Merged
bvandeusen merged 3 commits from dev into main 2026-09-21 16:52:23 -04:00
Showing only changes of commit 9883b010b3 - Show all commits
+7 -2
View File
@@ -22,8 +22,13 @@ composer writes all of it after the marker, so paragraphs 2..n were ordinary
lines that the filter had no reason to touch. They came back as "the
insight", the full trigger was prepended again, and the stored lesson gained
(n-1) paragraphs per update — silently, compounding, and in the half of the
document that does the retrieving. On the corpus's worst real shape it grew
the body by 520 characters over ten round trips.
document that does the retrieving.
Measured on the one real row this damaged (lesson #4207, a three-paragraph
trigger): the body grew by exactly 607 characters per edit — the length of
paragraphs 2 and 3 with their separators — taking it from 1291 characters to
7361 over ten edits, at which point the trigger appears eleven times and the
insight is 17% of the record.
WHY A MARKER COULD NOT HAVE FIXED IT. There is no end-of-trigger marker in
the body and adding one would not repair a row already written without it.