Commit 7e8b8a8
[levanter] Fix single-shard cache consolidation on R2/S3 (#4436)
## Summary
- Skip TensorStore reopen for single-shard cache consolidation — copy
shard contents directly via fsspec instead
- Fixes the `Malformed StorageGeneration` error that breaks CoreWeave CI
tokenization on R2-backed S3
- Adds regression test for single-shard consolidation path
Fixes #4433
## Test plan
- [x] `uv run pytest -q tests/test_consolidate_metadata.py` — 4 passed
(including new single-shard test)
- [x] `uv run pytest -q
tests/processing/tokenize/test_tokenize.py::test_tokenize_full_pipeline_integration
-m slow` — 1 passed
- [x] `./infra/pre-commit.py --fix` — OK
- [ ] CoreWeave CI (`cw-ci-test`) passes on this branch
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent dd549bf commit 7e8b8a8
File tree
2 files changed
+52
-2
lines changed- lib/levanter/src/levanter/store
- tests
2 files changed
+52
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
432 | 441 | | |
433 | 442 | | |
434 | 443 | | |
435 | 444 | | |
436 | 445 | | |
437 | 446 | | |
438 | | - | |
439 | | - | |
440 | 447 | | |
441 | 448 | | |
442 | 449 | | |
| |||
488 | 495 | | |
489 | 496 | | |
490 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
491 | 522 | | |
492 | 523 | | |
493 | 524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
0 commit comments