[PR #1176] [CLOSED] strata_pack.py build --force: unmake the old pack before writing, so a build that stops part-way is an unfinished build, not a pack (#634 follow-up) #3288

Closed
opened 2026-11-07 14:40:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1176
Author: @Avicennasis
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: fix/pack-force-clears-markers


📝 Commits (1)

  • e1288ad strata_pack.py build --force: unmake the old pack before writing, so a build that stops part-way is an unfinished build, not a pack (#634 follow-up)

📊 Changes

2 files changed (+23 additions, -1 deletions)

View changed files

📝 tools/strata_pack.py (+8 -1)
📝 tools/test_shards.py (+15 -0)

📄 Description

Follow-up to #634 and 4f4c923c's --force, a small one.

--force builds into a directory that already holds a pack, and setup passes it when a pack lost its index.txt or experts.bin. The old pack's files stay until the build overwrites each one, so a forced build that stops part-way (a pack that had lost experts.bin, the rebuild interrupted inside the new one) leaves the old index.txt and manifest.json over a partial experts.bin. setup's "index.txt and experts.bin are there" check accepts that directory and does not build it again.

Now --force removes the pack's markers (manifest.json, index.txt, native_experts.txt) after the mkdir and before the GGUF is opened, so a forced build that stops part-way leaves experts.bin without a manifest.json: an unfinished build, which the next build or setup makes again (your test_unfinished_build_is_rebuilt). The data files are left to the build, which opens each one "wb". A complete forced build ends in the same files as before: manifest.json last, index.txt from pack_index.py after it. tools/test_shards.py passes as a whole; the new test fails on main with the markers still there.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1176 **Author:** [@Avicennasis](https://github.com/Avicennasis) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/pack-force-clears-markers` --- ### 📝 Commits (1) - [`e1288ad`](https://github.com/Niko1221/Strata/commit/e1288ad74dcacaba4d85b5b8ed14d362f51cd2f0) strata_pack.py build --force: unmake the old pack before writing, so a build that stops part-way is an unfinished build, not a pack (#634 follow-up) ### 📊 Changes **2 files changed** (+23 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/strata_pack.py` (+8 -1) 📝 `tools/test_shards.py` (+15 -0) </details> ### 📄 Description Follow-up to #634 and 4f4c923c's `--force`, a small one. `--force` builds into a directory that already holds a pack, and setup passes it when a pack lost its index.txt or experts.bin. The old pack's files stay until the build overwrites each one, so a forced build that stops part-way (a pack that had lost experts.bin, the rebuild interrupted inside the new one) leaves the old index.txt and manifest.json over a partial experts.bin. setup's "index.txt and experts.bin are there" check accepts that directory and does not build it again. Now `--force` removes the pack's markers (manifest.json, index.txt, native_experts.txt) after the mkdir and before the GGUF is opened, so a forced build that stops part-way leaves experts.bin without a manifest.json: an unfinished build, which the next build or setup makes again (your `test_unfinished_build_is_rebuilt`). The data files are left to the build, which opens each one "wb". A complete forced build ends in the same files as before: manifest.json last, index.txt from pack_index.py after it. `tools/test_shards.py` passes as a whole; the new test fails on `main` with the markers still there. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:40:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3288
No description provided.