Commit 4e9ab39
Fix partial file download loss on multi-chunk resume
When a large file spans multiple HTTP requests, continuation chunks
arrive with is_first=false. But the StreamingContext resets between
requests, leaving file_handle=null, so the chunk handler silently
drops the remaining data. The importer then reports success with a
truncated file.
Fix: if a partially downloaded file is tracked in state, re-open it
in append mode before streaming begins so continuation chunks are
written correctly.
Also give the large-single-file E2E test its own dedicated site to
prevent interference from test-28's concurrent-error hooks which
modify files on the shared import-failures site.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7dde891 commit 4e9ab39
File tree
3 files changed
+23
-2
lines changed- importer
- tests/e2e
- tests
3 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2768 | 2768 | | |
2769 | 2769 | | |
2770 | 2770 | | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
2771 | 2791 | | |
2772 | 2792 | | |
2773 | 2793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments