feat(antd): surface already-stored preflight in prepare-upload + bump ant-cli-v0.2.7#194
Open
Nic-dorman wants to merge 1 commit into
Open
feat(antd): surface already-stored preflight in prepare-upload + bump ant-cli-v0.2.7#194Nic-dorman wants to merge 1 commit into
Nic-dorman wants to merge 1 commit into
Conversation
… ant-cli-v0.2.7 Surface the already-stored preflight on the REST prepare-upload response so external signers can reconcile a (cheaper) payment against the full file size. ant-core's upload engine now excludes chunks already on-network from payment + PUT; antd's response previously reported nothing about how many were skipped. antd core: - Add additive, optional/defaulted `total_chunks` + `already_stored_count` to PrepareUploadResponse, populated on both wave_batch and merkle paths in build_prepare_response (covers /v1/upload/prepare and /v1/data/prepare). - Bump ant-core pin ant-cli-v0.2.6 -> v0.2.7 (self_encryption unchanged). - openapi.yaml documents both fields. 16-SDK REST fan-out: add the two fields (optional, default 0 on older daemons) to each PrepareUploadResult model + REST parser + tests. gRPC client mappings that share the model default the fields to 0 (gRPC proto parity tracked separately). antd-zig needs no change — its multi-chunk prepare returns the raw JSON body (no typed model), so the fields pass through. Docs: external-signer-flow.md, skill.md, llms-full.txt. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Surfaces the already-stored preflight on antd's REST prepare-upload response, plus folds in the
ant-cli-v0.2.7dependency bump.ant-core's upload engine excludes chunks already on-network from payment + PUT, but antd's response previously reported nothing about how many were skipped — so an external signer (e.g. indelible) couldn't reconcile "why am I paying for K chunks when the file is M chunks." This adds two additive, optional, backward-compatible scalar fields:
total_chunks— total chunks including already-storedalready_stored_count— chunks skipped (no payment/PUT)The signer pays for
total_chunks - already_stored_count, so a prepare can legitimately come back cheaper than the raw file size implies.Changes
antd core (Rust)
PrepareUploadResponse, populated on both wave_batch and merkle paths inbuild_prepare_response(covers/v1/upload/prepareand/v1/data/prepare). Single-chunk/v1/chunks/prepareis unchanged — it already hasalready_stored: bool.ant-cli-v0.2.6 → v0.2.7(self_encryptionunchanged at 0.36;PreparedUploadfields verified identical;cargo checkconfirms no API break).openapi.yamldocuments both fields.16-SDK REST fan-out — add the two fields (optional, default 0 on older daemons) to each
PrepareUploadResultmodel + REST parser + tests. gRPC client mappings that share the model default the fields to 0 (gRPC proto parity is a separate follow-up).antd-zigneeds no change: its multi-chunk prepare returns the raw JSON body (no typed model), so the fields pass through.Docs —
docs/external-signer-flow.md,skill.md,llms-full.txt.Testing
Full sweep on the Linux SDK box — antd core + all 16 SDKs green: cargo test/fmt/clippy, and every SDK's unit suite (Go, Python, Rust, JS, C#, Java, Kotlin, Dart, Swift, Lua, Elixir, Zig, PHP, Ruby, MCP).
🤖 Generated with Claude Code