Skip to content

Streaming 1: replace whole-file parsing with explicit byte-demand states #205

Open

Description

@DrunkOnJava

Audit at ece6adf: src/reader.rs:101 and :128 call fs::read; DwgFile retains the complete input and read_section/object_stream materialize whole sections. No suspend/resume state exists. Version::from_magic also rejects AC1012 (existing #119).

Acceptance:

  • Each transition declares exact offset and remaining byte demand; insufficient bytes suspend without consuming beyond that demand.
  • Every container, compression and object path R13–AC1032 migrates off the legacy full-buffer reader.
  • Fixed chunk cap, bounded aggregate parser state and explicit limits; no allocation depends on untrusted size before validation.
  • Unsupported/ambiguous layouts are typed errors, never fabricated success.
  • Real-file measurements through the public entry point, including partial fields and terminal states.

First deliverable is the hand-written state machine. The spec compiler is a later upgrade, per Griffin's final sequencing instruction.

Parent: #204

Implementation checkpoint — October 25, 2026

Foundation implemented in #213: §3.2 header grammar for AC1012/AC1014/AC1015, fixed storage, exact byte demands, strict CRC/sentinel and locator checks. This does not complete container, compression or object migration. The canonical fixture integrity defect has its own issue #214.

Activity

  1. added
    type:feature
    area:container
    priority:P1
    on Oct 25, 2026
  2. 30 remaining items

  3. DrunkOnJava commented on Oct 27, 2026

    @DrunkOnJava
    OwnerAuthor

    Status (main 2bab7b2; docs/streaming/README.md and CHANGELOG.md [Unreleased]). The October 25 checkpoint covers only the §3.2 header (#213). Landed since:

    The required Streaming E2E job runs these on real drawings; its manifests in tools/streaming/*-corpus.json name all 52 pinned drawings.

    Still open: the streaming grammar frames records but decodes no object body, so entities, tables and objects still come from the legacy whole-section reader, and the acceptance item that every container, compression and object path migrates off the legacy full-buffer reader is not met. docs/streaming/task-ledger.md on main (last updated 2026-10-26) still lists the R2004+ walk and the object records as pending and needs the same refresh.

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