rpc surface not migrated to canonical hero_sockets routes (legacy-only) #137

Open
opened 2026-06-16 11:32:59 +00:00 by mahmoud · 0 comments
Owner

Summary

hero_compute's rpc socket has not been migrated to the canonical hero_sockets.md route surface. It hand-rolls only the legacy / pre-migration endpoints (/health, /.well-known/heroservice.json, /rpc, /openrpc.json) and serves none of the canonical endpoints, so hero_router's Diagnostics → Spec compliance probe reports it Non-compliant.

Update: this supersedes the earlier narrower framing of this issue (just /api/ping) — the real gap is the entire canonical surface.

Canonical surface required (hero_sockets.md)

On rpc.sock:

  • GET /health.json
  • GET /heroservice.json
  • GET /api/domains.json
  • GET /api/ping"pong"
  • GET /api/{domain}/openrpc.json
  • POST /api/{domain}/rpc

Current state

Serves only the legacy set (/health, /.well-known/heroservice.json, /rpc, /openrpc.json); all canonical paths return 404.
Hand-rolled router: crates/my_compute_*_server (explorer/mos/zos rpc servers).

curl --unix-socket ~/hero/var/sockets/hero_compute/rpc.sock http://localhost/health.json   # → 404 (expect 200)
curl --unix-socket ~/hero/var/sockets/hero_compute/rpc.sock http://localhost/api/ping       # → 404 (expect 200 "pong")

Fix

Stop hand-rolling the rpc surface; mount the shared hero_lib canonical router so the full surface (incl. /api/ping) comes for free and can't drift:

  • hero_lifecycle::rpc::mandatory_router(...) / service_root_router(...), or
  • the generated oschema_server build_router(...).

Compliant services (hero_proc, hero_code, hero_router) already do this. hero_browser was the minimal-fix counter-example (commit c6f5abe just added the missing /api/ping); a full migration is preferred here since the whole surface is absent.

Verify

Each canonical path returns 200 over the rpc socket, and the service's Diagnostics tab in hero_router reports compliant (required_fail: 0).

## Summary `hero_compute`'s rpc socket has **not been migrated to the canonical `hero_sockets.md` route surface**. It hand-rolls only the legacy / pre-migration endpoints (`/health`, `/.well-known/heroservice.json`, `/rpc`, `/openrpc.json`) and serves **none** of the canonical endpoints, so hero_router's **Diagnostics → Spec compliance probe** reports it Non-compliant. > **Update:** this supersedes the earlier narrower framing of this issue (just `/api/ping`) — the real gap is the **entire canonical surface**. ## Canonical surface required (`hero_sockets.md`) On `rpc.sock`: - `GET /health.json` - `GET /heroservice.json` - `GET /api/domains.json` - `GET /api/ping` → `"pong"` - `GET /api/{domain}/openrpc.json` - `POST /api/{domain}/rpc` ## Current state Serves only the legacy set (`/health`, `/.well-known/heroservice.json`, `/rpc`, `/openrpc.json`); all canonical paths return `404`. Hand-rolled router: `crates/my_compute_*_server` (explorer/mos/zos rpc servers). ```bash curl --unix-socket ~/hero/var/sockets/hero_compute/rpc.sock http://localhost/health.json # → 404 (expect 200) curl --unix-socket ~/hero/var/sockets/hero_compute/rpc.sock http://localhost/api/ping # → 404 (expect 200 "pong") ``` ## Fix Stop hand-rolling the rpc surface; mount the shared hero_lib canonical router so the full surface (incl. `/api/ping`) comes for free and can't drift: - `hero_lifecycle::rpc::mandatory_router(...)` / `service_root_router(...)`, or - the generated `oschema_server` `build_router(...)`. Compliant services (hero_proc, hero_code, hero_router) already do this. hero_browser was the minimal-fix counter-example (commit `c6f5abe` just added the missing `/api/ping`); a full migration is preferred here since the whole surface is absent. ## Verify Each canonical path returns `200` over the rpc socket, and the service's **Diagnostics** tab in hero_router reports compliant (`required_fail: 0`).
mahmoud changed title from rpc socket missing canonical GET /api/ping (hero_sockets compliance) to rpc surface not migrated to canonical hero_sockets routes (legacy-only) 2026-06-16 11:45:09 +00:00
Sign in to join this conversation.
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_compute#137
No description provided.