feat(antd, antd-go): enrich /health with version + EVM + uptime + build commit#38
Merged
Conversation
…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>
This was referenced May 5, 2026
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>
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.
Summary
/healthand gRPCHealthService.Checknow 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.Client.Health()and gRPCGrpcClient.Health(). All 6.pb.gofiles regenerated.option go_packageto all 6.protofiles so the README's wildcard regen command works without M-flag overrides.peer_countwas 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
HealthStatusmodel updates to expose the new fields to their users — tracked in #37.Test plan
cargo test(antd) — 18 pass, 2 new (HealthResponseJSON 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🤖 Generated with Claude Code