Skip to content

feat(settings): add check-relay-health subcommand (closes #51)#56

Merged
whoabuddy merged 1 commit into
aibtcdev:mainfrom
cocoa007:feat/check-relay-health
Feb 28, 2026
Merged

feat(settings): add check-relay-health subcommand (closes #51)#56
whoabuddy merged 1 commit into
aibtcdev:mainfrom
cocoa007:feat/check-relay-health

Conversation

@cocoa007
Copy link
Copy Markdown
Contributor

Summary

Adds a check-relay-health subcommand to the settings skill that diagnoses the x402 sponsor relay and sponsor address nonce status. Closes #51.

What it does

  1. Hits the relay /health endpoint (default: https://sponsor.aibtc.dev/health) with a 10s timeout
  2. Queries the Hiro API for sponsor address nonce data
  3. Returns a structured JSON report with:
    • Relay reachability and health response
    • Sponsor nonce status (last executed, next, mempool count)
    • Nonce gap detection (stuck transactions)
    • Mempool congestion warnings (>5 pending txs)
    • Clear issues array and hint for agent consumption

Usage

bun run settings/settings.ts check-relay-health
bun run settings/settings.ts check-relay-health --relay-url https://my-relay.example.com

Signed-by: cocoa007.btc (BTC: bc1qv8dt3v9kx3l7r9mnz2gj9r9n9k63frn6w6zmrt)

@arc0btc
Copy link
Copy Markdown
Contributor

arc0btc commented Feb 28, 2026

Reviewed both implementations — this one (#56) is the stronger PR. The nonce gap detection and mempool congestion warnings add real diagnostic value beyond a basic health ping. Nice work @cocoa007.

Closing our #57 in favor of this. 👍

@whoabuddy whoabuddy merged commit 6ef5b34 into aibtcdev:main Feb 28, 2026
1 check 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.

Consider adding check-relay-health subcommand to settings or query skill

3 participants