Repository navigation
V4.1 Engram file-backed: release verify page cache (fail-closed on residue); batched fetch_rows gather - #12304
Merged
Merged
Conversation
…sidue); batched fetch_rows gather Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…el; receipt carries store_bytes; name the verdict's consumer frontier Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Addressing review 71352 (REQUEST_CHANGES) in the new commit.
— sent from quick-lynx-421 |
… (UnimportedBareProvider) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tructor type built outside its module) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Sep 26, 2026
…es.dag keeps main's any, moved fns stay on std.algebra Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Sep 26, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 26, 2026
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.
Brief: node adhoc-213164f5-0bd (DS4.1, operator-approved 2026-09-25). Two fixes to
FileBackedEngramStorage(dag/gunbc/spark/patches/d2d649e6/engram_file_backed.py.patch). The facts behind them are declared in the newgunbc.spark.v41_engram_file_backed.Fix 1: release the page cache the checksum read leaves behind
posix_fadvise(POSIX_FADV_DONTNEED)over the verified range. It then reads residency back withmincoreover a transient mapping that is never touched, and returnsEngramStoreOpenReceipt(verified_bytes, resident_bytes_after_verify, resident_bytes_after_release).EngramPageCacheResident. There is no toggle; a switch that keeps the cache would be a §5 escape hatch.V41StoreOpenReceipt/v41_open_residency_verdict. The verdict refuses a partial verification and any residue, down to one page.Fix 2: batched fetch_rows
fetch_rowsbuilds one flat index of offset + span and runs a singletorch.index_select(out=)into the staging rows, in request order.nbytesmust equalexpected.record_bytes. That value is newly supplied, fromv41_row_bytes, not minted in the patch. Anything else refuses the whole batch withEngramRowOffsetMisaligned._fetch_rows_per_row, the differential oracle for the instrument. It is never a fallback.v41_gather_rowsrefuses non-record offsets; each row is the store's bytes at av41_row_addressoffset.Claims (
test.claim.spark.v41_engram_file_backed_witness)verification_that_leaves_the_cache_resident_refuses, with positive controla_verified_store_whose_cache_was_released_opens.the_batched_gather_is_the_per_row_records_in_request_order_over_boundary_rows: the batch equalsv41_place_rowrecords at a rank's first and last local rows, out of order and with a repeat. Alsoa_shifted_offset_batch_refuses: an offset shifted +1, one inside the magic, and one past the end.Execution status of these claims: a remote
gunbc runwas OOM-killed (rc=137) on closure load, including for the trivial receipt claim. Their first execution is this PR's floor run; I'll report it here.Python realization, executed locally (torch 2.14 cpu, synthetic store of magic + 200k × 264-byte records)
EngramPageCacheResident, which is RED (a) on the real path.nbytes≠ record all refuse.Instrument (§6: named, not transcribed)
measure_fetch_rows(storage, rows, repeats), alsopython3 engram_file_backed.py --store … --rank-digest-hex … --magic-hex … --record-bytes … --rows N. It reports seconds per call for batched and per-row,bytes_agree, and the open receipt. My first batched version (advanced indexing) was slower than per-row at N=12, the per-token size.index_select(out=)fixed that. Re-run the instrument on a Spark rank for the real figures.Out of scope / frontier
_allocate_weightswiring patch, which is already the named trigger inv41_engram_row_store.🤖 Generated with Claude Code