Skip to content

store media by hash and hydrate journal payloads - #441

Merged
xandreeddev merged 2 commits into
mainfrom
media-store
Oct 31, 2026
Merged

xandreeddev merged 2 commits into
mainfrom
media-store

Conversation

@xandreeddev

Copy link
Copy Markdown
Owner

What

  • Add MediaStore, its memory adapter and shipped conformance kit, plus MediaStoreDirectoryLive in the files plugin. Immutable SHA-256 blobs are durably published before journal references.
  • Add withMediaStore with entry/byte-bounded LRU hydration. Exact manifests preserve attachments, queued input, command JSON, nested encoded results, provider results and request-part identities, including occurrence labels and opaque JSON fields.
  • Apply inclusive read ceilings before fork hydration. Retain native file-operation slots until settlement, bound queued admission, and release only a cancelled call's own health probe while preserving commit nonce and ACK behavior.
  • Register physical references as stored format 11. Logical readers/replay still receive inline values, and old inline records remain readable. Physical backups retain the media directory; older unwrapped typed readers need hydrated exports or an updated reader. Session deletion does not collect shared blobs.

Checks

  • Full key-free suite: 3,295 pass, four expected environment skips, zero failures.
  • Frozen install, zero-baseline typecheck, foundry self-check/demo, package build and strict packed verification: pass. The declaration-only follow-up preserves the emitted runtime file byte for byte.
  • Memory/directory media kits and decorated SessionLog kit pass. Focused regressions cover whole-input snapshots, mutable ACK expectations, typed-array bounds/copies, exact JSON literals/metadata, missing/corrupt blobs, LRU budgets and physical IO lifetime/admission.
  • Packed Node/Bun real Agent/files journeys verify each promised media path, logical request replay, legacy inline history, cold restart, fork cutoffs with missing future blobs, shared-blob retention, two SIGKILL publication checkpoints and takeover after a held committed journal ACK. Earlier resolver, retry, failure, cache, overflow, queue and restart fixtures pass.
  • All 34 prior stored-shape hashes and formats 1–10 remain unchanged. Only two physical shapes are added; the development journal changes its format metadata only. Both released fixtures and all three model goldens remain byte-identical.
  • Generated docs stay clean; website/internal links and the required Bun 1.3.6 proxy repeat pass.
  • No live provider calls or credentials are required or used.

Add immutable media stores and a journal decorator that publishes image bytes before references, hydrates exact logical data, and bounds its cache. Keep opaque JSON, occurrence metadata and request-part identities intact; register the physical codec as stored format 11 and preserve existing inline history.

Apply read ceilings before fork hydration, and retain physical file-operation slots through native settlement while bounding queued admission. Cover both storage adapters, mutable boundaries, request replay, cold restart and process loss around blob publication and journal acknowledgments.
Name the decorator's public SessionLog type explicitly so packed declarations use the local port rather than an inferred SDK reference. The emitted runtime module is unchanged.
@xandreeddev
xandreeddev merged commit 6335315 into main Oct 31, 2026
1 check passed
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