fix: bind RESP TCP on HERO_DB_PORT (default 6378) and serve admin UI on ui.sock #36
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_db!36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/port-6378-and-ui-socket"
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?
Part of the production-readiness pass for hero_db (lhumina_code/home repos_focus_production.md). Two defects found by actually building + running hero_db under hero_proc.
1. RESP TCP port hardcoded to 6379
hero_db_serverhadlet port = "6379".parse().unwrap_or(6378);— a leftover from a "simplified parse expression" commit. It ignoredHERO_DB_PORTand bound 6379, contradicting the documented default 6378 used by the SDK, integration tests, thekill_otherentry, the startup banner, and all docs. Restored the env-var read defaulting to 6378. Also fixed theINFOcommand, which hardcodedtcp_port:6379.2. Admin dashboard unreachable via hero_router
hero_db_adminbound its dashboard onadmin.sock, but hero_router proxies a service's web UI at/<service>/ui/via a socket namedui.sock. So the dashboard was unreachable through the router — even thoughREADME.mdalready documentedhttp://localhost:9988/hero_db/ui/. Renamed the socket toui.sockinservice.toml(the manifest thehero_admin_server!()macro reads), thekill_otherentry,AdminConfig, and docs (CLAUDE.md / README / PURPOSE).Verification
cargo check --workspaceclean;cargo test --workspace --lib --bins→ 41 passed.lab build --release --workspace --install.:6378,INFOreportstcp_port:6378, RESPping/set/getwork, and the dashboard loads (HTTP 200) at/hero_db/ui/through hero_router with a realui.sock.Notes / not included
Cargo.tomlrust-version(lab policy-apply flips 1.96↔1.95.0; left it for a separate decision) or commit.hero/*build artifacts.INFOstill reports a stalehero_db_version:0.2.0; startup warnsresp.sock — already bound by another process(appears even on a clean start).it now works fine
@ -23,3 +23,3 @@├── rpc.sock HTTP/1.1 OpenRPC JSON-RPC 2.0 management (hero_db_server)├── resp.sock RESP2 Redis wire protocol via Unix socket (hero_db_server)└── admin.sock HTTP/1.1 Admin HTML dashboard (hero_db_admin)└── ui.sock HTTP/1.1 Admin HTML dashboard (hero_db_admin)I am not sure about this change, I think we changed this _ui prefix to _admin, Kristof merged dev to main this morning, so I suppose it has the new _admin prefix, no?
@mahmoud wrote in #36 (comment):
it didn't work with admin sock from hero_proc side, it was expecting ui sock.
Superseded by #37. The admin.sock→ui.sock rename here turned out unnecessary: it was an artifact of testing against a stale hero_router (0.2.1). Verified against the latest hero_proc 0.6.0 + hero_router that the original
admin.sockis served correctly at/hero_db/admin/(the ecosystem standardized on admin.sock in hero_proc 8f28cd4). #37 keeps only the real fix — the RESP TCP port (HERO_DB_PORT, default 6378).Pull request closed