Skip to content

Add envelope widening fixture (#74) - #75

Merged
sehkone merged 2 commits into
mainfrom
sehkone/issue-74
Aug 28, 2026
Merged

Add envelope widening fixture (#74)#75
sehkone merged 2 commits into
mainfrom
sehkone/issue-74

Conversation

@sehkone

@sehkone sehkone commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a test-support payload fixture that rewrites envelope lengths while retaining the private footer layout.
  • Document sparse-file construction and cover bounded and unbounded reader behavior.
  • Keep the fixture unavailable in default-feature builds and leave production writers and readers unchanged.

Closes #74

Test plan

  • Build a signed container, widen both envelope blocks, and confirm bounded reading reports wrong-length metadata without reading either block.
  • Confirm an unbounded package reader attempts the widened envelope and fails instead of accepting empty blocks.
  • Confirm the widened container still exposes its unverified manifest.
  • Confirm a dependent-style test can write the compact fixture sparsely with test-support enabled.
  • Run cargo build, cargo fmt -- --check --config group_imports=StdExternalCrate, both required Clippy configurations, both test configurations, and RUSTDOCFLAGS='-D warnings' cargo doc --no-deps.

Keep malformed-envelope construction inside deploy-core so dependent
metadata tests do not duplicate the private footer layout. The compact
fixture can be written sparsely while bounded readers reject it before
an allocation.

Closes #74
Reject widened envelopes whose total extent cannot fit the container
format, and document the feature's expanded test-only surface.

Part of #74
@sehkone

sehkone commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

[Reviewer Round 1]

Approved — no blocking findings.

The fixture at src/payload.rs keeps the footer layout private, is correctly feature-gated, and constructs the compact prefix/footer form needed for sparse writing. Its tests exercise both bounded non-reading and unbounded envelope access, while the integration test verifies dependent-style public use.

PR #75 correctly uses Closes #74 and includes a test plan.

@sehkone

sehkone commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

[Review Verdict Round 1: APPROVED]

@sehkone

sehkone commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Suggested squash commit

Title

Add envelope widening fixture

Body

Keep malformed-envelope construction inside deploy-core so dependent
metadata tests can cover bounded reads without duplicating private footer
layout. Validate widening inputs and provide compact bytes that consumers
can write sparsely.

Closes #74

@sehkone
sehkone merged commit ffd259c into main Aug 28, 2026
4 checks passed
@sehkone
sehkone deleted the sehkone/issue-74 branch August 28, 2026 11:21
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.

Add a test-support fixture that widens a container's envelope blocks

1 participant