Skip to content

Verify Wasm digest before writing to cache - #3784

Merged
itowlson merged 2 commits into
spinframework:mainfrom
itowlson:verify-wasm-digest-before-writing-to-cache
Nov 16, 2026
Merged

itowlson merged 2 commits into
spinframework:mainfrom
itowlson:verify-wasm-digest-before-writing-to-cache

Conversation

@itowlson

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson
itowlson requested a review from a team November 11, 2026 01:08

@radu-matei radu-matei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you for implementing this!

non-blocking: would this benefit from a test?

Comment thread crates/loader/src/local.rs Resolved
@itowlson

Copy link
Copy Markdown
Contributor Author

@fibonacci1729 Radu's approval pre-dates the rework/consolidation you (rightly) requested, so if you have bandwidth to look again that would be awesome.

@fibonacci1729 fibonacci1729 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 tiny items but other LGTM.

Comment thread crates/loader/src/local.rs Outdated

verified_download_stream(
stm,
&format!("{}:{}", package.name(), package.namespace()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&format!("{}:{}", package.name(), package.namespace()),
&format!("{}:{}", package.namespace(), package.name()),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bloody hell Ivan. Sorry about that, thanks for catching it!

Comment thread crates/loader/src/http.rs Outdated
while let Some(block) = stm.next().await {
let chunk = block
.map_err(Into::into)
.context("Failed to get content from registry")?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.context("Failed to get content from registry")?;
.with_context(|| format!("Failed to get content from {source}"))?;

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson
itowlson force-pushed the verify-wasm-digest-before-writing-to-cache branch from 33494e4 to c18c306 Compare November 16, 2026 19:15
@itowlson
itowlson enabled auto-merge November 16, 2026 19:15
@itowlson
itowlson merged commit 34615ae into spinframework:main Nov 16, 2026
17 checks passed
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.

3 participants