Skip to content

feat(antd-ruby): sha256 on upload results and manifest entries (REST + gRPC) - #399

Merged
Nic-dorman merged 1 commit into
mainfrom
nic/v2-1724-sha256-ruby
Oct 23, 2026
Merged

Nic-dorman merged 1 commit into
mainfrom
nic/v2-1724-sha256-ruby

Conversation

@Nic-dorman

Copy link
Copy Markdown
Member

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.

antd 0.17.0 returns the plaintext's SHA-256 (lowercase hex) on uploads and
lets a manifest entry record it (V2-1724). Carry it through both transports.

Upload results: DataPutResult, DataPutPublicResult, FilePutResult,
FilePutPublicResult (POST /v1/data, /v1/data/public, /v1/files,
/v1/files/public) and FinalizeUploadResult (wave and merkle finalize) gain
sha256. A missing key (antd older than 0.17.0) or an empty string (gRPC's
zero value) reads as nil on both REST and gRPC.

Manifests: ManifestEntryInput gains sha256, sent on REST and set on the
gRPC request only when given and non-empty, so presence is meaningful and
the wire never carries null or "". It is passed through unchecked; the
daemon validates it and a bad one surfaces as the existing BadRequestError
with the daemon's message. ManifestEntryInfo gains sha256 from both build
and decode responses, nil when absent or "". The SDK's own unknown-field
refusal now lists sha256 among the accepted keys.

Compatibility: the new member is last on every Struct, defaulting to nil, so
existing construction keeps working. No stubs regenerated (the committed
ones already carry the fields), no version bump.

Tests: test_sha256.rb (REST, 10) and test_grpc_sha256.rb (gRPC, 8) cover
every result type present and absent, manifest build omit and send, entry
info from build and decode, and the bad-request mapping; the full suite is
232 runs, 0 failures. test_live_sha256.rb (ANTD_TEST_URL and
ANTD_TEST_SHA_LINK) passed against antd v0.17.0 over REST and gRPC,
including one public data upload per transport whose sha256 matched the
locally computed digest.

🤖 Generated with Claude Code

…+ gRPC)

antd 0.17.0 returns the plaintext's SHA-256 (lowercase hex) on uploads and
lets a manifest entry record it (V2-1724). Carry it through both transports.

Upload results: DataPutResult, DataPutPublicResult, FilePutResult,
FilePutPublicResult (POST /v1/data, /v1/data/public, /v1/files,
/v1/files/public) and FinalizeUploadResult (wave and merkle finalize) gain
sha256. A missing key (antd older than 0.17.0) or an empty string (gRPC's
zero value) reads as nil on both REST and gRPC.

Manifests: ManifestEntryInput gains sha256, sent on REST and set on the
gRPC request only when given and non-empty, so presence is meaningful and
the wire never carries null or "". It is passed through unchecked; the
daemon validates it and a bad one surfaces as the existing BadRequestError
with the daemon's message. ManifestEntryInfo gains sha256 from both build
and decode responses, nil when absent or "". The SDK's own unknown-field
refusal now lists sha256 among the accepted keys.

Compatibility: the new member is last on every Struct, defaulting to nil, so
existing construction keeps working. No stubs regenerated (the committed
ones already carry the fields), no version bump.

Tests: test_sha256.rb (REST, 10) and test_grpc_sha256.rb (gRPC, 8) cover
every result type present and absent, manifest build omit and send, entry
info from build and decode, and the bad-request mapping; the full suite is
232 runs, 0 failures. test_live_sha256.rb (ANTD_TEST_URL and
ANTD_TEST_SHA_LINK) passed against antd v0.17.0 over REST and gRPC,
including one public data upload per transport whose sha256 matched the
locally computed digest.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@MaidSafe-Hermes MaidSafe-Hermes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

APPROVE — reviewed head 89e04eed80306bbfdbb65186195b2c1d8ad6a8a5.

Coverage: 2/2 seats completed, but both returned UNCERTAIN because generated gRPC stubs and execution results were omitted from their evidence. I checked the committed generated Ruby descriptors at the exact base revision a353f9cfe6e59e83b99fa5ee1345e05cc7ad2a91; they already include SHA-256 fields in data, file, upload and manifest messages, including optional manifest presence. The parent Linear comment reports fanout verification and live devnet tests, but those runs were not independently reproduced here.

The REST/gRPC mappings, omission semantics and models match the contract. No source-confirmed blocker remains. No GitHub checks are reported on this branch. This is a code-review approval only; no merge performed.

@Nic-dorman
Nic-dorman marked this pull request as ready for review October 23, 2026 19:37
@Nic-dorman
Nic-dorman merged commit f8f499a into main Oct 23, 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.

2 participants