Pull requests / #752
#752 cache: preserve checkpoints when split allocation fails (depends on #559)
closed · draft · @zengyishou · 0 comments · View on GitHub
Description
## Dependency and review scope **Draft: blocked on #559. Do not merge before #559.** This branch is based on #559 head `f65301b3bfc621229c7d5ddb1e268f652be43a59`. Because GitHub can only target an existing branch in this repository, the current comparison against `main` also includes #559's unmerged changes. The contribution from this PR is the final single commit only; after #559 lands this branch must be rebased and the diff rechecked before marking ready. Review the isolated increment here: [incremental diff](https://github.com/zengyishou/Strata/compare/f65301b3bfc621229c7d5ddb1e268f652be43a59...fix/checkpoint-split-exception-safety). The same increment is also proposed directly to #559's author in [the focused companion PR](https://github.com/blange48/Strata/pull/1). These are alternative review routes for the same change, not patches to apply twice. ## Summary Follow-up to Niko1221/Strata#559, prepared on its `multi-sequence-batching` branch. The checkpoint split currently moves running state before copying identity metadata. If a later allocation throws, the input checkpoints are partially moved and cannot be restored safely. Reserve output storage and prepare identity copies before moving any state. Catch allocation failure at the parking call site and skip parking while retaining the live checkpoints. Add a deterministic allocation-failure regression and register it with the standalone conversation tests. This does not repeat the branch's existing KV reuse, draft ownership, or all-stage compatibility changes. ## Validation - Standalone `conversation_cache_test`: 4,191 checks passed. - Allocation injection: seven failure points preserve the input; successful split can merge back without allocation. - `git diff --check` passes. Tests use synthetic checkpoints and require neither model data nor a GPU. This PR makes no throughput claim.
Related on strata.com
Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.