Skip to content

fix(gravity): identify health probes#245

Merged
jhaynie merged 1 commit intomainfrom
fix/gravity-health-probe-user-agent
May 2, 2026
Merged

fix(gravity): identify health probes#245
jhaynie merged 1 commit intomainfrom
fix/gravity-health-probe-user-agent

Conversation

@jhaynie
Copy link
Copy Markdown
Member

@jhaynie jhaynie commented May 2, 2026

Summary

  • set a distinct User-Agent on Gravity HTTP health probes
  • add a regression test covering the probe User-Agent

Validation

  • go test ./gravity

This lets ion distinguish hadron/gravity reconnect probes from public health checks during tableflip.

Summary by CodeRabbit

  • Chores

    • Updated health probe requests to include an identifying User-Agent header for better request traceability.
  • Tests

    • Added test coverage for health probe User-Agent header validation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d2459196-5d4b-4020-b47b-a4208a91cea1

📥 Commits

Reviewing files that changed from the base of the PR and between f5cf80e and 7038943.

📒 Files selected for processing (2)
  • gravity/grpc_client.go
  • gravity/health_probe_test.go

📝 Walkthrough

Walkthrough

Adds a public constant GravityHealthProbeUserAgent to identify health probe HTTP requests. Updates the health probe HTTP request method to set the User-Agent header to this constant and introduces a test to verify the header is correctly set.

Changes

Health Probe User-Agent Header

Layer / File(s) Summary
Constant Definition
gravity/grpc_client.go
Introduces exported GravityHealthProbeUserAgent constant with value "Agentuity-Gravity-HealthProbe/1.0" to identify health probe requests.
Health Probe Implementation
gravity/grpc_client.go
The doHealthProbe method sets the User-Agent header to the new constant before sending the HTTP request.
Test
gravity/health_probe_test.go
New test TestDoHealthProbeSetsGravityUserAgent verifies that HTTP health probe requests include the correct User-Agent header value.

Review rate limit: 3/5 reviews remaining, refill in 19 minutes and 19 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@jhaynie jhaynie merged commit cf968e8 into main May 2, 2026
3 of 4 checks passed
@jhaynie jhaynie deleted the fix/gravity-health-probe-user-agent branch May 2, 2026 18:39
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