Skip to content

docs: don't promise a failed paid pointer write went unpaid, in every SDK - #371

Merged
Nic-dorman merged 42 commits into
mainfrom
nic/pointers-payment-wording
Oct 19, 2026
Merged

Nic-dorman merged 42 commits into
mainfrom
nic/pointers-payment-wording

Conversation

@Nic-dorman

@Nic-dorman Nic-dorman commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Hermes' review of #335/#342 caught that Python and MCP promised a failed paid pointer write "was refused before anything was paid". The same false guarantee was in the other 13 SDKs and the shared docs. This PR fixes those, plus the wording fixes Hermes kept open on #339, #365 and #334. Docs, comments and README text only: no code or behaviour changes, and no antd/ changes.

Stacked on #367 (base nic/stack-integration-preview), because these files come from the fan-out PRs. Fixing them in place would have reset 35 approvals. This PR gets retargeted to main once #367 lands.

The facts the wording follows

  • Create/update with the daemon wallet run in this order: refuse a pending prepared write (CONFLICT) and read the pointer (ALREADY_EXISTS / POINTER_FINAL), both before paying. Then pointer_put, which pays first and stores second.
    • So CONFLICT can mean the awaiting-payment refusal (unpaid) or an update that lost to a newer state while in flight (possibly paid). The code alone doesn't say which.
    • POINTER_FINAL is usually a pre-payment refusal, but a write that was in flight when the pointer became final keeps its payment.
  • Transfer checks every peer first, so a shortfall can come before or after paying.
  • The one safe retry is a finalize with retryable true, repeated with the same upload_id against the retained payment.

Changes (13 SDKs + docs; Python and MCP were already right after #335/#342)

  • Per SDK (C++, C#, Dart, Elixir, Go, Java, JS, Kotlin, Lua, PHP, Ruby, Rust, Swift, Zig):
    • POINTER_FINAL and CONFLICT class docs;
    • the update and transfer method docs (C#, Kotlin, Java and PHP described a transfer shortfall as pre-payment; Elixir called CONFLICT pre-payment);
    • README error rows and example prints.
  • Docs: docs/tutorial-pointers.md, llms.txt, llms-full.txt, skill.md, README.md, docs/quickstart-rust.md.
  • Wording Hermes kept open on the reviews:

Deliberately unchanged (true as written)

  • A create of an existing pointer is refused before paying.
  • A pointer that is already final is refused before paying (the live tests' wording).
  • The awaiting-payment CONFLICT is refused before paying.
  • Manifest calls are free.
  • Reads are free to retry.
  • The daemon's InsufficientPeers → SERVICE_UNAVAILABLE comment ("Nothing was paid") stays. In ant-core 0.13.0, the only pointer source of it is pointer_write_group, which runs before quoting or paying. In finalize, worth_retrying catches it first.

Checks

  • antd-py pytest: 584 passed.
  • antd-go: go vet, go build and go test pass.
  • antd-csharp: dotnet build succeeds with 0 warnings.
  • php -l, ruby -c and zig fmt --check are clean on the edited files.
  • git diff --check is clean.
  • Every symbol the new docs link to exists.

Refs V2-1568.

🤖 Generated with Claude Code

…trial/stack-integration

# Conflicts:
#	README.md
#	docs/architecture.md
#	llms-full.txt
#	llms.txt
#	skill.md
…trial/stack-integration

# Conflicts:
#	antd-php/README.md
…trial/stack-integration

# Conflicts:
#	antd-lua/README.md
…rial/stack-integration

# Conflicts:
#	antd-go/README.md
… trial/stack-integration

# Conflicts:
#	antd-ruby/README.md
#	antd-ruby/scripts/generate-protos.sh
…trial/stack-integration

# Conflicts:
#	antd-zig/README.md
#	antd-zig/build.zig
… trial/stack-integration

# Conflicts:
#	antd-dart/CHANGELOG.md
#	antd-dart/README.md
#	antd-dart/example/example.md
#	antd-dart/tool/generate_proto.sh
…rial/stack-integration

# Conflicts:
#	antd-py/scripts/generate_proto.py
#	antd-py/src/antd/_grpc.py
Nic-dorman and others added 11 commits October 16, 2026 10:01
…to trial/stack-integration

# Conflicts:
#	antd-kotlin/examples/src/main/kotlin/com/autonomi/examples/Main.kt
… trial/stack-integration

# Conflicts:
#	antd-rust/Cargo.toml
#	antd-rust/README.md
…to trial/stack-integration

# Conflicts:
#	antd-elixir/README.md
#	antd-elixir/scripts/generate-protos.sh
…trial/stack-integration

# Conflicts:
#	.github/workflows/python-ci.yml
#	antd-mcp/README.md
…nto trial/stack-integration

# Conflicts:
#	ant-dev/src/ant_dev/cli.py
#	ant-dev/src/ant_dev/cmd_example.py
…ether

Text that each fan-out branch wrote without the other in place:
- MCP tool count 29 -> 31 in README.md and llms.txt (19 storage, 10 pointer,
  2 manifest); root README intro mentions manifests.
- antd-csharp: the unknown-example message lists 1-9, 'pointers' and
  'manifests'; README shows `dotnet run -- 9`.
- antd-kotlin README: `all` skips 8 and 9; 8 runnable examples.
- antd-swift: NotSupportedError covers the pointer and manifest methods
  (doc comment and README error table).
- antd-js README: 8 runnable scripts; 09-manifests.ts listed before the
  retry helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ifests.proto

Both fan-out branches renumbered the $N import aliases in the shared .pbgrpc.dart files, so the clean git merge left stale numbers. Regenerated in one protoc call (protoc 25.3, protoc_plugin 22.3.0, tool/generate_proto.sh): manifests $6, pointers $7, upload $8, wallet $9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With both fan-outs in, the server has 31 tools (19 storage, 10 pointer, 2 manifest), and 21 on an SDK without the pointer API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… SDK

A daemon-wallet pointer write pays before it stores, and the store can
still fail after payment, so several error codes cover both unpaid and
possibly-paid outcomes:

- CONFLICT is a pre-payment refusal while a prepared write awaits
  payment, but also an update that lost to a newer state in flight,
  which may already be paid for;
- POINTER_FINAL is usually the pre-payment read check, but a pointer
  that became final while a paid write was in flight is refused by the
  network after paying;
- a transfer's CLOSE_GROUP_SHORTFALL can come before paying (every peer
  is checked first) or after.

The C++, C#, Dart, Elixir, Go, Java, JS, Kotlin, Lua, PHP, Ruby, Rust,
Swift and Zig error-class docs and pointer_update / pointer_transfer
docs now match the antd-py and antd-mcp wording: which cases are refused
before paying, which may already be paid, and to read the pointer (or
its finality) before paying again. The READMEs, tutorial-pointers.md,
llms.txt, llms-full.txt and skill.md say the same. A create of an
existing pointer, the awaiting-payment CONFLICT and the read-time
POINTER_FINAL stay described as refused before paying; manifest calls
stay free.

Also:
- skill.md: the shortfall row names the one safe retry (a retryable
  finalize with the same upload_id); Java's fork class is ForkException.
- llms-full.txt: pointer prepare documents include_signed_quotes and the
  optional signed_quotes; the manifest gRPC limit notes that Dart and
  Elixir set none, since grpc-dart and grpc-elixir 0.11 have none to
  raise.
- README.md, docs/quickstart-rust.md: the Go and Rust pointer and
  manifest examples do read ANTD_BASE_URL.

No behaviour changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Nic-dorman
Nic-dorman changed the base branch from nic/stack-integration-preview to main October 19, 2026 15:38
Main now has the whole pointer and manifest stack plus #376, so this PR's diff against main is just its own wording. Clean merge, no conflicts.
@Nic-dorman
Nic-dorman merged commit a5092ed into main Oct 19, 2026
16 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.

1 participant