Repository navigation
feat(antd-py): sha256 on upload results and manifest entries (REST + gRPC) - #398
Merged
Merged
Conversation
…gRPC) Carry the antd 0.17.0 sha256 fields (V2-1724) through all four clients (sync and async, REST and gRPC), with identical types and no new methods. Upload results: DataPutResult, DataPutPublicResult, FilePutResult, FilePutPublicResult and FinalizeUploadResult (finalize_upload and finalize_merkle_upload) gain sha256, the plaintext's SHA-256 in hex. It reads None when the REST key is absent, null or "", and when the gRPC field is "" (proto3 zero value), so an older daemon reads as none. Manifests: ManifestEntryInput gains an optional sha256. REST sends the key only when it is set and non-empty; gRPC sets the proto3 optional field only then, so presence is meaningful. The value is passed through as given (no hex, length or case check); the daemon validates it and a bad one surfaces as the existing BadRequestError with the daemon's message. ManifestEntryInfo gains sha256 on build and decode, None when absent or "". Compatibility: the new field is last on every dataclass with a default of None, so existing construction keeps working. No exhaustive-match changes, no version bump, not BREAKING. The gRPC stubs already carried the fields; they regenerate byte-identically with grpcio-tools 1.80.0 and are not touched. Tests: new test_sha256.py (43 tests: mock REST daemon and in-process gRPC services, sync and async, present/absent/empty for every result type, request JSON and proto presence, entry info from build and decode, the bad sha256 400) and test_live_sha256.py (4 tests, gated on ANTD_TEST_URL and ANTD_TEST_SHA_LINK, one paid public upload per transport). Full suite: 627 passed, 16 skipped. Live against antd 0.17.0 on a local devnet: all 4 passed, with the uploaded payload's SHA-256 matching on REST and gRPC. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
MaidSafe-Hermes
approved these changes
Oct 23, 2026
MaidSafe-Hermes
left a comment
There was a problem hiding this comment.
APPROVE — reviewed head b59aec3eb056d12771f24a8929ff6e350e6a9858.
Coverage: 2/2 seats reviewed (sol-1 gpt-6.1-sol xhigh; glm-1 z-ai/glm-5.3). Both seats found no source blocker; this is model agreement, not team consensus.
REST/gRPC upload result parsers and manifest serialization follow the optional-hash rules. CI reports Python and MCP tests successful. The live test remains environment-gated and was not independently run here. No merge performed.
Nic-dorman
marked this pull request as ready for review
October 23, 2026 19:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the sha-fanout round (V2-1724): the SDK side of the sha256 fields antd 0.17.0 added in #347. Targets main; the daemon and antd-go are already released.
Carry the antd 0.17.0 sha256 fields (V2-1724) through all four clients
(sync and async, REST and gRPC), with identical types and no new methods.
Upload results: DataPutResult, DataPutPublicResult, FilePutResult,
FilePutPublicResult and FinalizeUploadResult (finalize_upload and
finalize_merkle_upload) gain sha256, the plaintext's SHA-256 in hex. It
reads None when the REST key is absent, null or "", and when the gRPC
field is "" (proto3 zero value), so an older daemon reads as none.
Manifests: ManifestEntryInput gains an optional sha256. REST sends the key
only when it is set and non-empty; gRPC sets the proto3 optional field
only then, so presence is meaningful. The value is passed through as
given (no hex, length or case check); the daemon validates it and a bad
one surfaces as the existing BadRequestError with the daemon's message.
ManifestEntryInfo gains sha256 on build and decode, None when absent or "".
Compatibility: the new field is last on every dataclass with a default of
None, so existing construction keeps working. No exhaustive-match changes,
no version bump, not BREAKING. The gRPC stubs already carried the fields;
they regenerate byte-identically with grpcio-tools 1.80.0 and are not
touched.
Tests: new test_sha256.py (43 tests: mock REST daemon and in-process gRPC
services, sync and async, present/absent/empty for every result type,
request JSON and proto presence, entry info from build and decode, the bad
sha256 400) and test_live_sha256.py (4 tests, gated on ANTD_TEST_URL and
ANTD_TEST_SHA_LINK, one paid public upload per transport). Full suite:
627 passed, 16 skipped. Live against antd 0.17.0 on a local devnet: all 4
passed, with the uploaded payload's SHA-256 matching on REST and gRPC.
🤖 Generated with Claude Code