feat(storage): read-only direct CompactStore container mmap (G-EM0.1) - #7
Open
jarmen423 wants to merge 1 commit into
Open
Conversation
Wire open_read_only to mmap the CompactStore section via a lifetime-safe Bytes owner, report CompactBacking::ContainerMmap, and fail closed for encrypted or non-mmap-able layouts without silent eager fallback. Writable reopens keep LegacyEager and are not Milestone R evidence.
jarmen423
added a commit
that referenced
this pull request
Aug 2, 2026
Replace ColumnEncoder's Vec<Option<Value>> (~40B/row) with family-specific primitive accumulators seeded from pre-computed geometry. Anonymous retention drops to packed output width (1 bit/bool, bits/uint, 8B/i64, 8B/f64, 4B/dict-code, 4B/vector-component). StreamingColumnEncoder: - from_geometry() locks accumulator family from ColumnGeometry - push() appends to primitive accumulator (no Value buffering) - push_placeholder() emits family-neutral placeholder - finish() builds identical ColumnCodec → byte parity preserved N-vs-4N acceptance test (250K vs 1M nodes): - Delta RssAnon ratio: 0.75x (must be < 2.0) ✓ - Payload ratio: 4.01x (expect ~4x) ✓ - Memory does NOT scale with input — pipeline is bounded GATES: - grafeo-core: 2130 passed - grafeo-storage: 240 passed - grafeo-engine: 1076 passed - n_vs_4n_peak_memory: PASSED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements G-EM0.1 — read-only direct mapped-container ownership for CompactStore reopen.
MmapSection→Bytes::from_ownerbridge (into_bytes)mmap_section+deserialize_from_mapped_bytes(noread_section_data/ full-sectionVeccopy)CompactBacking::ContainerMmap { artifact_id, payload_version, mapped_bytes }CompactStoreuntil last reader drainsStorageError::DirectMmapUnavailablefor encrypted / non-mmap-able / empty sectionsLegacyEager(not Milestone R evidence)Packet
G-EM0.106b318e90e96ecb73d8278a6e02c84c6a4d0cece(integration/g-em0-1-base-f0-r0, accepted F0 + R0)/home/jfrie/agent-memory-hosted/.hermes/handoffs/grafeo-disk-backed/G-EM0.1.mdVerification
All green. Pre-existing:
cargo clippy -D warningsfails on basemissing_errors_docinbuffer/manager.rs(unrelated).Residual (explicit non-claims)
mapped_bytes).