Skip to content

Hard-fail on provider CID mismatch instead of warn#110

Open
ilchu wants to merge 1 commit into
devfrom
ic/fs-client-cid-verify
Open

Hard-fail on provider CID mismatch instead of warn#110
ilchu wants to merge 1 commit into
devfrom
ic/fs-client-cid-verify

Conversation

@ilchu
Copy link
Copy Markdown
Collaborator

@ilchu ilchu commented Jun 1, 2026

The create_drive function previously logged a tracing::warn! and continued when the provider's returned data_root disagreed with the locally-computed CID, defeating content-addressing's only integrity guarantee.

Now returns a new FsClientError::CidMismatch and refuses to cache or proceed. Adds unit coverage for both the matching and mismatching path via a small verify_cid helper.

`create_drive` previously logged a `tracing::warn!` and continued when the
provider's returned data_root disagreed with the locally-computed CID,
defeating content-addressing's only integrity guarantee. Now returns a
new `FsClientError::CidMismatch` and refuses to cache or proceed. Adds
unit coverage for both the matching and mismatching path via a small
`verify_cid` helper.
@ilchu ilchu self-assigned this Jun 1, 2026
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.

1 participant