Skip to content

Streaming 3: portable bounded checkpoints with fresh-process resume #207

Open

Description

@DrunkOnJava

Audit: parser call stacks, bit cursors, decompression history, indexes and partial records have no portable representation.

Acceptance:

  • Versioned endian-defined checkpoint includes position, phase, stacks, partial fields/objects, section and decompression context.
  • Restore validates length, checksum, semantic invariants, source identity and limits before allocation.
  • Resume in a new OS process at every reachable suspension without re-reading consumed source bytes.
  • Output delivery is exactly once across checkpoint boundaries; document caller custody of emitted objects.
  • Native/WASM cross-runtime restore; reject incompatible checkpoints.

Depends on byte-demand core and transport contract.

Parent: #204

Implementation checkpoint — October 25, 2026

Foundation implemented in #213: compact versioned §3.2 checkpoints with identity/length/CRC/state validation. Run 40235108179 passed 98 fresh-process byte positions with zero earlier source reads, corrupt/semantic/source mismatch rejection and terminal-failure restore. Full object and decompressor state and cross-runtime execution remain open.

Activity

  1. added
    type:feature
    area:container
    priority:P1
    on Oct 25, 2026
  2. DrunkOnJava commented on Oct 27, 2026

    @DrunkOnJava
    OwnerAuthor

    Status (main 2bab7b2; docs/streaming/README.md). The October 25 checkpoint covers the header state only. Checkpoints now exist for the R13 to R2000 walk (#240), the LZ77 decoder mid-page (#246), the R2004 page and section maps (#276), data pages (#299), the whole R2004-family file (#312, DWGF), its object records (#333, DWGO), the whole R2007 file (#340, DWGR) and its object records (#363), each self-contained and carrying its own marker (DWGF, DWGO, DWGR, DWGQ).

    Cross-runtime restore is no longer open (#301): a no_std wasm32 kernel built from the same grammar files restores a checkpoint a native build made and finishes the walk, and the reverse, for the R2004 maps, sections, whole file and objects and for the R2007 walk and objects (tools/streaming/verify_wasm*.py, in the required Streaming E2E job). On the R2007 walk alone, 349 native checkpoints restored in the kernel finish with the native lines, the kernel's own checkpoint is byte-identical in all 349, and 83 corrupted or wrong-identity checkpoints are refused.

    Still open: the kernel runs under node (V8), not a browser, and the data-page section walk crosses runtimes in one direction only. No streaming state holds a partially decoded object, because no object body is decoded by the streaming grammar (#205). The "Checkpoint contract" section of docs/streaming/README.md still says full object and decompression checkpoints remain open; it predates #246, #333 and #363.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:containerpriority:P1type:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions