Skip to content

Research bounded flat-page object prefetch - #43

Closed
FujitsuPolycom wants to merge 10 commits into
codex/opaque-page-base-segment-flightfrom
codex/flat-macro-parallel-read
Closed

Research bounded flat-page object prefetch#43
FujitsuPolycom wants to merge 10 commits into
codex/opaque-page-base-segment-flightfrom
codex/flat-macro-parallel-read

Conversation

@FujitsuPolycom

@FujitsuPolycom FujitsuPolycom commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Research implementation

Status: research-only.

SparkCache commit df1202686788995f174e410538e35c2978ebb526 contains a bounded flat-page reader for sparkcache-page-snapshot-manifest/v2. It authenticates the root metadata and ordered contiguous object descriptors before placement, authenticates the first object before parsing its snapshot header, and reads later objects into request-private host buffers with at most four concurrent reads and 256 MiB of retained payload per batch. Objects are copied and submitted in manifest order only after every read in the batch authenticates.

The direct version 2 path preserves the authenticated snapshot_sha256 field but does not recompute that digest over the concatenated byte stream after every object has matched its authenticated SHA-256 descriptor. GPU-free tests cover malformed roots, descriptor order and range drift, object corruption, submission ordering, one-worker behavior, four-reader concurrency, memory bounds, failed-batch cleanup, and timing decomposition.

Serving result

The exact ARM64 image sha256:df4e09a32cdbf1c0e69cc7c4c9e95d890d6c7a1e3eaac84f969912a16fd27dd3, built from SparkCache eabe7fd0c878db7384ef87fe80a1e96b9bedcf67, restored the existing 131,072-token context b4161571df103395e2abae10372a90f35468561ec6c42bf4a7b7f0d0dfda5873 at TP4/DCP1. Every rank structurally verified 813,068,464 bytes in 13 objects. All-rank ranges were:

  • read and authentication: 484.1–528.8 ms;
  • placement: 323.7–330.9 ms, including 293.2–297.7 ms waiting for an arena;
  • final CUDA completion: 129.5–131.6 ms;
  • total cache service: 1,231.7–1,331.2 ms.

The restored response was spark; the deterministic oracle required red. A one-token-changed prompt with the same length recomputed red in 55.141 seconds. Structural validation therefore did not establish semantic correctness. This implementation must not be used as a qualified restore path.

The immutable record is evidence/glm53-flash-dflash7-bf16/flat-v2-four-reader-semantic-rejection-eabe7fd.json. Its GPU-free validation test prevents the receipt from being interpreted as qualification.

Compatibility and deployment status

Cache identity, digest salts, 256-token logical geometry, persisted schemas, snapshot_sha256, CUDA placement ABI, and namespace values are unchanged. Existing version 2 manifests remain structurally readable. Python restore and non-flat restore paths are unchanged.

The candidate image is rejected for deployment. The qualified single-reader artifact remains sha256:35b58a7bf414059c65b8f74e4e4b17ee6a81b7008e1bffbc9bd298b5e08c739e at SparkCache source a1511d26a1fe2b17b24561bc52e376bf7f54b06a. No OCI image or package is published by this PR.

Source identity

  • Review base: a1511d26a1fe2b17b24561bc52e376bf7f54b06a
  • Evaluated implementation: eabe7fd0c878db7384ef87fe80a1e96b9bedcf67
  • Evaluated tree: d88a65ea265a6f212367baa8c4a4970079d6b08a
  • Evaluated SparkCache source SHA-256: d9a7800ce201b0671676fc8d71423947c7b24e4797758db727c06e0e684495fe
  • Documentation and receipt head: df1202686788995f174e410538e35c2978ebb526

Validation

  • Four-reader implementation and receipt tests: 9 passed
  • Full SparkCache suite: 809 passed, 7 skipped
  • Deployment suite: 108 passed, 1 skipped
  • Ruff and git diff --check: passed

The PR remains draft. It does not merge, publish, close, delete, or operate a serving deployment.

Flat page-snapshot v2 restore reads and authenticates at most two later macro objects concurrently, then updates the complete snapshot digest and submits CUDA spans in manifest order. The existing IO-worker setting can reduce the path to one worker; two placement-owned arenas cap larger values. Cache identity and persisted schemas are unchanged. GPU-free overlap, ordering, corruption, one-worker fallback, and full repository suites pass.
@FujitsuPolycom FujitsuPolycom changed the title Read flat page objects with bounded parallelism Research bounded flat-page object prefetch Aug 30, 2026
@FujitsuPolycom

Copy link
Copy Markdown
Owner Author

The bounded flat-page implementation is an ancestor of retained draft PR #44, and PR #41 no longer depends on this branch after its documented merge into #44. Closing this absorbed draft and deleting only its remote head branch.

@FujitsuPolycom
FujitsuPolycom deleted the codex/flat-macro-parallel-read branch August 31, 2026 02:09
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