Skip to content

feat(antd, antd-go): enrich /health with version + EVM + uptime + build commit#38

Merged
Nic-dorman merged 2 commits into
mainfrom
feat/antd-health-enrichment
May 4, 2026
Merged

feat(antd, antd-go): enrich /health with version + EVM + uptime + build commit#38
Nic-dorman merged 2 commits into
mainfrom
feat/antd-health-enrichment

Conversation

@Nic-dorman
Copy link
Copy Markdown
Collaborator

@Nic-dorman Nic-dorman commented May 4, 2026

Summary

  • antd's REST /health and gRPC HealthService.Check now report 6 diagnostic fields: version, evm_network, uptime_seconds, build_commit (short git SHA from build.rs), payment_token_address, payment_vault_address. Cargo bump 0.3.0 → 0.4.0.
  • antd-go SDK extended to parse and expose the new fields on both REST Client.Health() and gRPC GrpcClient.Health(). All 6 .pb.go files regenerated.
  • Side cleanup: added option go_package to all 6 .proto files so the README's wildcard regen command works without M-flag overrides.

peer_count was deliberately not added (management direction). The /health change is wire-compatible: old SDK clients silently ignore the new fields; new clients see zero values from old daemons.

Why

Indelible (and any operator curling /health) needs to spot mainnet/devnet misconfiguration at boot rather than 30 chunks into an upload. Surfacing evm_network + payment contract addresses closes the footgun where antd defaulted to a devnet RPC during a prior mainnet test.

Follow-up

The other 14 language SDKs need matching HealthStatus model updates to expose the new fields to their users — tracked in #37.

Test plan

  • cargo test (antd) — 18 pass, 2 new (HealthResponse JSON serialization, empty-string fields for unconfigured EVM)
  • go test ./... (antd-go) — pass; both REST and gRPC mock servers extended to populate + assert all 6 fields
  • End-to-end smoke test against indelible:18080 — daemon-side curl returns all fields populated; SHA round-trips correctly

🤖 Generated with Claude Code

Nic-dorman and others added 2 commits May 4, 2026 17:00
…ld commit

antd: extend HealthCheckResponse and HealthResponse with version,
evm_network, uptime_seconds, build_commit, payment_token_address,
payment_vault_address. AppState now captures started_at and a snapshot
of the resolved EVM preset/addresses at startup. build.rs writes the
short git SHA into ANTD_BUILD_COMMIT (empty when built outside a git
checkout). gRPC HealthServiceImpl takes Arc<AppState> instead of just a
network string. Cargo version 0.3.0 -> 0.4.0.

antd-go: regenerate all proto stubs against the updated schema and
parse the new fields in REST + gRPC Health(). Add `option go_package`
to every proto so the README's wildcard regen command works without
M-flag overrides.

openapi.yaml HealthResponse schema updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI's antd-rust API contract test compiles a mock HealthService against
the proto types in this crate, so adding fields to HealthCheckResponse
breaks the mock until antd-rust's HealthStatus model is extended too.
Use ..Default::default() to fill the new fields with empty values for
now. The full SDK update (parsing, exposing on the model, tests) is
tracked in issue #37 alongside the other 14 languages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nic-dorman Nic-dorman merged commit 1ba4f2e into main May 4, 2026
3 checks passed
@Nic-dorman Nic-dorman deleted the feat/antd-health-enrichment branch May 4, 2026 16:17
Nic-dorman added a commit that referenced this pull request May 6, 2026
Mirrors antd-go v0.5.0 / antd-py: HealthStatus now carries version,
evm_network, uptime_seconds, build_commit, payment_token_address, and
payment_vault_address. Each gets #[serde(default)] so deserialization
tolerates pre-0.4.0 daemon responses that omit them. The struct also
derives Default so the older mock literal pattern keeps working.

REST Client::health pulls each field from the JSON map (str_field for
strings, .as_u64() for uptime). gRPC GrpcClient::health populates from
the regenerated HealthCheckResponse getters.

Mock fixtures in tests.rs (REST) and grpc_tests.rs (gRPC) now populate
all 6 fields explicitly, replacing the ..Default::default() placeholder
added in #38. Existing test_health and test_grpc_health assertions
extended to cover them.

Builds on the mock-only fix from #38 (which kept CI green while we
extended antd's HealthCheckResponse). This commit completes the SDK
update for antd-rust.

cargo test: 53 pass.

Part of #37.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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