Commit 4d226da
committed
fix(consolidation): make the exact-dup guard case-sensitive
_norm_obs_text dropped a CREATE whose text matched a shown observation only after
lower-casing. But the guard's premise is that an exact-text match loses no info on
drop — case-folding breaks that (a create differing only in case, e.g. an acronym
like "TLS" vs "tls", carries different information). Collapse whitespace only;
keep case. The guard body stays — it's a zero-cost deterministic backstop for the
verbatim-re-create mode, complementary to interleave recall (which surfaces the twin;
the guard catches the LLM emitting an identical CREATE anyway).1 parent ebfb48b commit 4d226da
2 files changed
Lines changed: 20 additions & 6 deletions
File tree
- hindsight-api-slim
- hindsight_api/engine/consolidation
- tests
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
0 commit comments