Fix probe POST /rpc, HTTP-first, MCP socket name lookup, BASE_PATH, 405 fallback #5

Closed
mik-tf wants to merge 0 commits from development_fix_openrpc_http_fallback into development
Owner

Summary

  • Probe POST /rpc instead of POST / (standard hero_rpc pattern)
  • HTTP-first probe order for _server.sock
  • MCP gateway lookup by socket name (not just title)
  • BASE_PATH regex _http -> _ui
  • Handle HTTP 405 and other 4xx/5xx in probe fallback (not just 404)

Ref: lhumina_code/home#3, lhumina_code/home#4

Test plan

  • Rebuild container, verify inspector discovers methods on hero_os_http via GET /openrpc.json
  • MCP /mcp/hero_redis_server works
  • All services healthy
## Summary - Probe POST /rpc instead of POST / (standard hero_rpc pattern) - HTTP-first probe order for _server.sock - MCP gateway lookup by socket name (not just title) - BASE_PATH regex _http -> _ui - Handle HTTP 405 and other 4xx/5xx in probe fallback (not just 404) Ref: lhumina_code/home#3, lhumina_code/home#4 ## Test plan - [ ] Rebuild container, verify inspector discovers methods on hero_os_http via GET /openrpc.json - [ ] MCP /mcp/hero_redis_server works - [ ] All services healthy
When CARGO_TARGET_DIR is set (e.g. in container builds), use it
directly instead of relying on python3 + cargo metadata fallback.
Fixes make install failing in environments without python3.

Co-Authored-By: mik-tf <mik@threefold.io>
Aligns with hero_ecosystem skill requirement: all repos must use
edition = "2024" and rust-version = "1.92".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Take development's standardized Makefile header.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chore: bump rust-version to 1.93 per hero_ecosystem standard
Some checks failed
Build & Test / check (pull_request) Failing after 1s
60f2c2ec27
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: add HTTP fallback for _server.sock probing
Some checks failed
Build & Test / check (pull_request) Failing after 0s
ebf1ab2803
Services named *_server.sock are classified as SocketKind::Openrpc
and only probed with raw JSON-RPC. Many services (hero_auth,
hero_books_server, hero_embedder_server, hero_foundry_server)
actually speak HTTP over Unix socket. When raw JSON-RPC fails,
now falls back to probe_http_socket() before marking unhealthy.

Fixes #3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: make ConnectInfo optional in MCP handler
Some checks failed
Build & Test / check (pull_request) Failing after 1s
072df82c5c
When accessed via hero_proxy (Unix socket forwarding), the
ConnectInfo<SocketAddr> extension is not available, causing
HTTP 500. Make it optional and fall back to "unix" for logging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: probe POST /rpc, HTTP-first, MCP socket name lookup, BASE_PATH
Some checks failed
Build & Test / check (pull_request) Failing after 1s
ec5c1a3367
- Probe POST /rpc instead of POST / for rpc.discover (standard path)
- Fall back to POST / then GET /openrpc.json for legacy services
- Flip _server.sock probe order: HTTP first, raw JSON-RPC fallback
- MCP gateway: lookup by socket name (priority), then title (fallback)
- BASE_PATH regex: match _ui suffix instead of legacy _http

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: handle HTTP 405 and other 4xx/5xx in probe fallback
Some checks failed
Build & Test / check (pull_request) Failing after 1s
b324ff9f62
POST /rpc returns 405 (not 404) on services like hero_os_http that
only have /rpc/{context}. Broaden the check to any HTTP 4xx/5xx
so the fallback to GET /openrpc.json is triggered correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mik-tf changed title from WIP: fix probe POST /rpc, HTTP-first, MCP socket name lookup, BASE_PATH, 405 fallback to Fix probe POST /rpc, HTTP-first, MCP socket name lookup, BASE_PATH, 405 fallback 2026-03-05 01:28:21 +00:00
timur closed this pull request 2026-03-05 07:35:52 +00:00
Some checks failed
Build & Test / check (pull_request) Failing after 1s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_inspector!5
No description provided.