mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2098] [CLOSED] disk park: the profile tag carries the engine version, and the blob carries the tag #3859
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3859
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2098
Author: @leocoic
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:f-disk-park-0143📝 Commits (10+)
56c51e9gitignore: keep the disk-park working residue out of gitd7870e6serve: a failed conversation checkpoint restore no longer exits the enginec88e7e3conversation cache: hand the evicted entry to the caller instead of dropping it792444cdisk park: a disk tier under the parked-conversation cache381e845serve: wire the disk park tier into the request path9b4160amerge origin/main (v0.1.43) into f-disk-parkaf5456adisk park: the out-of-range blob case was not testing an out-of-range offset598d2f8merge f-disk-park (the disk-park defect fixes) into f-disk-park-014365426f0serve: after non-finite logits this request does not read K/V back from the disk tier8364deadisk park: the profile tag carries the engine version, and the blob carries the tag📊 Changes
41 files changed (+11525 additions, -16 deletions)
View changed files
📝
.gitignore(+13 -0)📝
CMakeLists.txt(+18 -1)➕
bench/results/2026-10-12-rtx3090-disk-park-tag-gate/README.md(+61 -0)➕
bench/results/2026-10-12-rtx3090-disk-park-tag-gate/checksums.sha256(+3 -0)➕
bench/results/2026-10-12-rtx3090-disk-park-tag-gate/data/summary.json(+43 -0)➕
bench/results/2026-10-12-rtx3090-disk-park-tag-gate/provenance.json(+36 -0)📝
include/strata/core/conversation_cache.hpp(+27 -3)➕
include/strata/core/disk_park_blob.hpp(+130 -0)➕
include/strata/core/disk_park_bridge.hpp(+181 -0)➕
include/strata/core/disk_park_digest.hpp(+94 -0)➕
include/strata/core/disk_park_image.hpp(+113 -0)➕
include/strata/core/disk_park_logs.hpp(+309 -0)➕
include/strata/core/disk_park_session.hpp(+258 -0)➕
include/strata/core/disk_park_spool.hpp(+109 -0)➕
include/strata/core/disk_park_store.hpp(+204 -0)➕
include/strata/core/p13_blob_compact.hpp(+257 -0)➕
include/strata/core/p13_draft_kv.hpp(+212 -0)➕
include/strata/core/p13_pooled.hpp(+134 -0)➕
include/strata/core/p13_session_id.hpp(+196 -0)📝
serve/server.py(+59 -0)...and 21 more files
📄 Description
Title
disk park: the profile tag carries the engine version, and the blob carries the tag
Summary
The parked tier had no idea which engine wrote it.
DiskParkProfile::tag()hashed model / kv format / context / rope only, so 62 GB of pages stored by 0.1.41 are read back verbatim by 0.1.43 — after any version that changes numerics, that is recurrent state computed by the previous routing. The blob layer was worse:checkpoints.bincarries no tag at all and is one file shared by every tag directory.Both layers now carry the version. This branch also lands the disk park tier itself (a disk tier under the parked-conversation cache) and the fixes found while building it.
What changed
disk_park_digest.hpp/.cpp/_test.cpp—describe()now includesSTRATA_VERSION(andSTRATA_DISK_PARK_KEYfor a manual key); the field table goesv1→v2, so a version bump opens a newtag-XXXXXXXX/directory instead of reusing the old one.disk_park_blob.hpp/.cpp/_test.cpp— magicSKB1→SKB2. The profile tag is written into the file header at@8(those 4 bytes were reserved padding, so the 16-byte header and 32-byte entry header keep their exact layout — no record moves) and into every entry header at@+4(which used to hold aversionfield nothing read back). On a tag mismatch the layer is neither read nor appended to, the old file is moved with a single rename tocheckpoints.bin.tag-XXXXXXXX.stale(bytes untouched, not deleted) and a fresh file for the current tag is opened;STRATA_BLOB_STALE=offdisables it instead. The scan skips entries whose tag does not match, which is safe because each entry carries its own length.p13_blob_compact.hpp+tools/park-gc.cpp—p13_session_dirsused to sweeproot/tag-*/*/, mixing live keys from every tag into one blob.park-gcnow reads the tag from the blob header (--tagoverrides) and compacts only that tag's session dirs.generate.cpp— both the snapshot layer and the blob layer getdisk_park.profile().tag().conversation_cache.hpp+ serve — an evicted entry is handed to the caller instead of dropped; a failed checkpoint restore no longer exits the engine; after non-finite logits a request does not read K/V back from the disk tier.tools/p13-park-sweep.sh— the default park root comes from$HOMEinstead of one machine's home path; systemd units should setEnvironment=STRATA_PARK_STREAM=…explicitly.Version-gate commit alone: 9 files, +175 / −32. Whole branch: 11 commits, 35 files.
Extra Notes
Tested on the 3090 with
strata 0.1.43: snapshot dir renamedtag-A812110E→tag-AA00AEC7— the tag algorithm changed, the numerics did not, so 68 GB was not re-stored. After restart the first requests showhit_rate 0.90–0.92withprompt_readof only 686–1326. The oldcheckpoints.binwas archived rather than relabelled (its records were written by 0.1.41 before 13:27 and by 0.1.43 after, so relabelling it would be a lie); the new file has headerSKB2with tagAA00AEC7.Tests: blob 68 (new version-gate section) / digest 28 / spool 64 / logs 98 / session 136 / bridge 54 / image 19 = 467 checks, 0 failures.
For anyone with existing caches: the new engine will not read an old
tag-XXXXXXXX/directory. If the numerics did not change across the upgrade, rename the directory to the new tag (no re-store). If they did, let it cold start — that is exactly what this gate is for.checkpoints.binin the oldSKB1format is unreadable by design: archive it or delete it.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.