Skip to content

docs(antd-go, antd-rust): pointers example - #341

Merged
Nic-dorman merged 4 commits into
mainfrom
nic/v2-1568-pointers-examples-go-rust
Oct 19, 2026
Merged

Nic-dorman merged 4 commits into
mainfrom
nic/v2-1568-pointers-examples-go-rust

Conversation

@Nic-dorman

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

Copy link
Copy Markdown
Member

Part of the pointer API fan-out. Stacked on #326; review that first.

docs(antd-go, antd-rust): pointers example

antd-go/examples/08-pointers and antd-rust/examples/09-pointers.rs
walk the pointer API end to end: store two small pieces of public data,
create a pointer at the first, update it to the second, read it back
with get and resolve, fetch the bytes it leads to, and print the close
group's finality.

The owner comes from ANTD_POINTER_OWNER, the address of a pointer the
daemon holds a key for and that has never been written. The example
creates that pointer, so an address can be used once, and it stops
before paying for anything when the variable is unset. Like the sibling
examples, both talk to the daemon at the default base URL. Each prints a
note that the create and the update pay, and neither retries a write.
The Rust example is registered in Cargo.toml, and both READMEs list
the new example.

Both ran once against antd on a 10-node devnet, each with its own fresh
owner: create at counter 0, update to counter 1, get and resolve to the
second target, its bytes fetched back, finality open with 7/7 peers
answering. go vet, gofmt, golangci-lint, cargo fmt --check and
cargo clippy --all-targets -D warnings are clean.

docs(antd-go, antd-rust): pointers example reads ANTD_BASE_URL and updates an existing pointer

The pointers examples now match the other SDKs' pointers examples in
two ways. They take the daemon URL from ANTD_BASE_URL and fall back to
the SDK default. The sibling examples are unchanged.

If a create is refused because the owner's pointer already exists, for
example from an earlier run, the example prints a one-line note, points
the pointer at the first target with an update instead, and carries
on. The daemon refuses that create before paying. Re-runs against the
same owner now work. The pays note says the fallback update pays too.

Both re-ran once against antd on a 10-node devnet with ANTD_BASE_URL
set and the owners from their first runs. Each took the already-exists
path: an update to counter 2, then counter 3. Get and resolve pointed
at the second target and its bytes were fetched back. Finality was
open, with 7/7 peers answering. gofmt, go vet, golangci-lint v1.64.8,
cargo fmt --check and cargo clippy --all-targets -D warnings are clean.

Version bumps happen at release time; nothing here bumps a package version.

🤖 Generated with Claude Code

Nic-dorman and others added 2 commits October 15, 2026 11:56
antd-go/examples/08-pointers and antd-rust/examples/09-pointers.rs
walk the pointer API end to end: store two small pieces of public data,
create a pointer at the first, update it to the second, read it back
with get and resolve, fetch the bytes it leads to, and print the close
group's finality.

The owner comes from ANTD_POINTER_OWNER, the address of a pointer the
daemon holds a key for and that has never been written. The example
creates that pointer, so an address can be used once, and it stops
before paying for anything when the variable is unset. Like the sibling
examples, both talk to the daemon at the default base URL. Each prints a
note that the create and the update pay, and neither retries a write.
The Rust example is registered in Cargo.toml, and both READMEs list
the new example.

Both ran once against antd on a 10-node devnet, each with its own fresh
owner: create at counter 0, update to counter 1, get and resolve to the
second target, its bytes fetched back, finality open with 7/7 peers
answering. go vet, gofmt, golangci-lint, cargo fmt --check and
cargo clippy --all-targets -D warnings are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dates an existing pointer

The pointers examples now match the other SDKs' pointers examples in
two ways. They take the daemon URL from ANTD_BASE_URL and fall back to
the SDK default. The sibling examples are unchanged.

If a create is refused because the owner's pointer already exists, for
example from an earlier run, the example prints a one-line note, points
the pointer at the first target with an update instead, and carries
on. The daemon refuses that create before paying. Re-runs against the
same owner now work. The pays note says the fallback update pays too.

Both re-ran once against antd on a 10-node devnet with ANTD_BASE_URL
set and the owners from their first runs. Each took the already-exists
path: an update to counter 2, then counter 3. Get and resolve pointed
at the second target and its bytes were fetched back. Finality was
open, with 7/7 peers answering. gofmt, go vet, golangci-lint v1.64.8,
cargo fmt --check and cargo clippy --all-targets -D warnings are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nic-dorman and others added 2 commits October 15, 2026 15:35
Brings up the CI fixes already on the repin branch (#325): rustls 0.23.46 from main (#344, RUSTSEC-2026-0346..0349) and the notices generator reading .licenses/ (c226153, for granit-parser). No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings up #325's move from the rc.1 pin to the released ant-core 0.13.0 (ant-cli-v0.3.11) and ant-protocol 5.0.0. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Nic-dorman
Nic-dorman marked this pull request as ready for review October 16, 2026 09:07
@Nic-dorman
Nic-dorman changed the base branch from nic/v2-1567-antd-pointer-api to main October 16, 2026 12:46

@dirvine dirvine left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

APPROVE — Go and Rust pointer examples

Reviewed WithAutonomi/ant-sdk #341 at 21504f2a369b32df7f5275923c5a5635d1de7c2b against merge base d66e50df085c26afb0134b6c857afeaef62303ef. Target main at collection: cea236950084f8738106cc37247c148f0b411d18.

No material blocker remains in this PR. All five changed files were source-inspected: both examples, both README additions and the Rust example registration. The examples match their SDK methods, require ANTD_POINTER_OWNER, disclose paid writes, and use an explicit update only when create reports AlreadyExists. They do not automatically retry failed paid writes. Read/resolve/finality calls follow the writes, and each example checks that resolution returns the second target. Go counters are uint64; Rust counters are u64 with is_final on the record, confirmed from the same-head models.

Verified checks

  • Parent rerun at this exact head: cargo check --locked --offline --example 09-pointers passed; this compiles/type-checks the Rust example without executing it.
  • Parent reruns: go vet ./examples/08-pointers/ and go build -o /dev/null ./examples/08-pointers/ passed.
  • Source worker recorded clean Go formatting and rustfmt --edition 2021 --check examples/09-pointers.rs (exit 0); those formatting runs are worker evidence, separate from the parent reruns.
  • GitHub CI read at review: {"SKIPPED": 2, "SUCCESS": 7}. Skipped jobs are not passed jobs.

Panel coverage and limits

3/6 role reviews — partial panel, from two of the three required models. GLM 5.3 correctness and Qwen 3.8 correctness/adversarial returned substantive APPROVE reviews. Both DS4 roles timed out; GLM adversarial ended incomplete. Each missing role received one narrowed retry on the same named model. There is no unresolved material dissent; this is not full team consensus.

The parent checked the panel's SDK-type uncertainty against the actual models and added the Rust compile check above. The examples are illustrative, not a concurrent-writer coordination mechanism. Each run also uploads two public targets before its pointer writes; those uploads can pay too. No example or live-network/payment flow was executed. This verdict does not establish end-to-end payment, resolution or finality behaviour, approve a release, or authorise merging.

@Nic-dorman
Nic-dorman merged commit b11fc84 into main Oct 19, 2026
9 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.

2 participants