fix(router): spec-compliance probe checks canonical multi-domain endpoints (#119) #123
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_router!123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_router_diag_probe"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the
/api/diagnostics/{service}Spec compliance probe so a healthy, fully-migrated oschema service reports Compliant, and stops flaggingadmin.sock/web.sockas unknown.Root cause
probe_socket(rpc) probed the pre-migration bare endpoints:POST /rpc,GET /openrpc.json,GET /health,GET /.well-known/heroservice.json— all 404 on a migrated service.classify_socketonly knewrpc/ui/rest/openapi/web_*, soadmin.sockand the bareweb.sockfell into "Unknown socket files (not in spec)".Fix (aligned to current
hero_sockets.md)classify_socketnow recognizes canonical roles:admin.sock, bareweb.sock,resp.sock; legacyui.sock→ HTML-UI role.probe_socket(rpc) probes/health.json,/heroservice.json,/api/domains.json,/api/ping, then reads/api/domains.jsonand probes/api/{domain}/openrpc.json+POST /api/{domain}/rpcfor every domain (fallbackmain)./health.json+/heroservice.json; web stays optional (third-party).Tests
classify_socketcanonical roles,parse_domain_names(multi/single/garbage→main),validate_rpc_dispatchenvelope.hero_fake_service): newfunctional/diagnostics.rsasserts compliant, no unknown sockets, every/api/{domain}/rpcprobed & passing.End-to-end verification (live router + two-domain fake service)
cargo fmt --check,cargo clippy --all-targets,cargo test -p hero_router(146) all clean.Closes #119.
🤖 Generated with Claude Code