Skip to content

OSS-336: Stream bulk storage with verified recovery - #471

Merged
athNdev merged 8 commits into
mainfrom
codex/storage-streaming
Nov 17, 2026
Merged

athNdev merged 8 commits into
mainfrom
codex/storage-streaming

Conversation

@athNdev

@athNdev athNdev commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Bulk storage used whole-file byte slices and one base64 JSON line, so local and worker paths could not meet the advertised large-world limits. Add protocol v2 with acknowledged 256 KiB chunks, sequence/chunk/whole-stream SHA-256 verification, bounded channel parsing, 16 handles/session, explicit cancellation and transactional file promotion. Whole-file helpers now enforce 8 MiB consistently; older workers refuse streaming with an upgrade message.

Migrate backup/restore/ZIP output and extraction, local worldstore backup, binary upload/copy/download/manual packs, and staged modpack publication. File listing remains metadata-only. Staged rollback now stores verified old files plus a versioned manifest on the owning node before live writes, rather than retaining all file bodies in memory. Interrupted recovery directories block retries; ordinary abort removes only its owned temporary, and failed commits/rollback preserve recovery artifacts. ADR 0013 and the recovery runbook describe ownership, limits and OS durability boundaries.

Validation includes real 130 MiB local/shared/process-worker roundtrips with sampled bounded controller heap, process ZIP create/extract and deterministic manifest backup/restore, checksum/sequence/oversized-frame/cancellation fault injection against the real worker binary, partial-write/rename-failure target preservation, and 130 MiB staged apply/undo with corrupt-recovery refusal. The production Docker SDK attach/demultiplex path passes 130 MiB against an isolated HTTP engine fixture serving the confined worker; this is not a live-daemon/container qualification. A 12 MiB upload/copy/download RPC regression crosses the new helper limit. Existing staging and RPC suites pass. Full Go tests and vet pass on the merged review head cfd1d09; the follow-up Windows upload cleanup regression passes on 7fde460. Knowledge lint: 56 concepts, 37 retrieval queries pass.

Controller and worker images must upgrade together. Metadata/ZIP directory structures still scale with entry counts. Same-directory rename and file sync do not establish cross-platform power-loss durability; ambiguous commit disconnects require inspecting target/staging before retrying. No production Docker or persistent user-data changes were performed.

Jira: OSS-336. Draft pending CI and independent review.

@athNdev
athNdev marked this pull request as ready for review November 17, 2026 11:25
@athNdev
athNdev merged commit ae555ed into main Nov 17, 2026
12 checks passed
@athNdev
athNdev deleted the codex/storage-streaming branch November 17, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant