Skip to content

feat(core)!: model the streaming reader resume position inside stored data-descriptor entries - #690

Merged
bug-ops merged 2 commits into
mainfrom
fix/687-zip-dd-resume-model
Oct 21, 2026
Merged

bug-ops merged 2 commits into
mainfrom
fix/687-zip-dd-resume-model

Conversation

@bug-ops

@bug-ops bug-ops commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Summary

The resume model added with #683 reads only at the end a data-descriptor entry declares in the central directory. A streaming reader of a stored entry can resume earlier, inside the declared range.

verify, list and extract now scan the declared range of a stored entry that carries a data descriptor for a descriptor signature and search from there like a gap, reusing the existing census gap search (HiddenLocalHeader, region DescriptorTail, plus stray record findings). A header may end anywhere before the central directory.

  • Scope: stored entries. Compressed entries (deflate, bzip2, zstd) are still covered only by verify --check-integrity; the stored branch of that check is replaced by the census scan.
  • Accepted false positive, documented in spec 017 and SKILL.md: a ZIP-based file (a JAR or an ODF package, for example) stored whole in an entry that a streaming writer gave a data descriptor; --zip-consistency ignore for trusted producers.
  • Reads are bounded by the existing declared-size budget; each stored data-descriptor entry is read at most about twice its declared size.
  • Cost on a 10000-entry archive: deflate shapes unchanged, stored entries with descriptors pay for the scan (stated in the spec).

skills/exarch-cli/SKILL.md and spec 017 are updated.

Closes #687

… data-descriptor entries

verify, list and extract now scan the declared range of a stored entry
that carries a data descriptor for a descriptor signature and search from
there like a gap, so a header or stray record that a streaming reader
resumes on is reported under Enforce. Compressed entries stay covered by
verify --check-integrity.

BREAKING CHANGE: ZIP archives with a hidden local header or stray record
signature in the declared range of a stored data-descriptor entry are
rejected under Enforce.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benches Benchmark changes core Changes to exarch-core docs Documentation tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zip: streaming-reader resume model for data-descriptor entries is incomplete

1 participant