Commit 3753fce
committed
ingest: don't set ContentRef when no section content was written
persistTree assigned ContentRef unconditionally but only Put the content
when it was non-empty after cleanForLLM. Leaves whose text cleaned to empty
(heading-only sections, CID-font garbage) thus got a ref pointing at an
object that was never written — so summarize, HyDE, and treewalk get_pages
all failed them with 'storage: object not found'. On the whitepaper that
was 24 of 93 leaves (~26%).
Fix: only set ContentRef when content is actually stored; empty leaves get
an empty ref, which every reader already treats as 'no stored content'
(summaryFor falls back to the title; the treewalk loader returns the
summary or empty). Adds a regression test asserting ref↔object parity.
Closes HAL-316.1 parent c15175a commit 3753fce
2 files changed
Lines changed: 87 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
631 | 640 | | |
| 641 | + | |
632 | 642 | | |
633 | 643 | | |
634 | 644 | | |
| |||
638 | 648 | | |
639 | 649 | | |
640 | 650 | | |
| 651 | + | |
641 | 652 | | |
642 | 653 | | |
643 | 654 | | |
| |||
647 | 658 | | |
648 | 659 | | |
649 | 660 | | |
650 | | - | |
| 661 | + | |
651 | 662 | | |
652 | 663 | | |
653 | 664 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments