fix(cli): align CLI socket dir default with the server's #16

Merged
mahmoud merged 2 commits from development_fix_cli_sock_default into development 2026-04-27 18:30:36 +00:00
Owner

What

hero_codescalers_server defaults --sockname to its SERVICE_NAME constant ("hero_codescalers"), so it creates rpc.sock under $HERO_SOCKET_DIR/hero_codescalers/. The CLI binary in crates/hero_codescalers/src/main.rs was still using the older "hero_codescalers_server" name, so hero_codescalers <subcommand> with no --server flag failed:

Error: Connection error: Failed to connect to
  /root/hero/var/sockets/hero_codescalers_server/rpc.sock:
  No such file or directory

Surfaced today on kristof4 while smoke-testing hero_codescalers jobs-cleanup --dry-run (the new subcommand from PR #14).

Fix

Update sock_dir_name() to use "hero_codescalers" (or "hero_codescalers_<N>" for non-zero instances) and refresh the doc-comment table to match. One file, ten lines.

Verified

All RPC paths (stats, service.start, jobs.list, jobs.cleanup) work end-to-end via the router URL http://[host]:9988/hero_codescalers/rpc after this change is built and installed.

## What `hero_codescalers_server` defaults `--sockname` to its `SERVICE_NAME` constant (`"hero_codescalers"`), so it creates `rpc.sock` under `$HERO_SOCKET_DIR/hero_codescalers/`. The CLI binary in `crates/hero_codescalers/src/main.rs` was still using the older `"hero_codescalers_server"` name, so `hero_codescalers <subcommand>` with no `--server` flag failed: ``` Error: Connection error: Failed to connect to /root/hero/var/sockets/hero_codescalers_server/rpc.sock: No such file or directory ``` Surfaced today on kristof4 while smoke-testing `hero_codescalers jobs-cleanup --dry-run` (the new subcommand from PR #14). ## Fix Update `sock_dir_name()` to use `"hero_codescalers"` (or `"hero_codescalers_<N>"` for non-zero instances) and refresh the doc-comment table to match. One file, ten lines. ## Verified All RPC paths (`stats`, `service.start`, `jobs.list`, `jobs.cleanup`) work end-to-end via the router URL `http://[host]:9988/hero_codescalers/rpc` after this change is built and installed.
hero_codescalers_server defaults --sockname to SERVICE_NAME
("hero_codescalers"), so it creates rpc.sock under
$HERO_SOCKET_DIR/hero_codescalers/. The CLI was still using the older
"hero_codescalers_server" name, so 'hero_codescalers <subcommand>' with
no --server flag failed:

  Error: Connection error: Failed to connect to
  /root/hero/var/sockets/hero_codescalers_server/rpc.sock:
  No such file or directory

Set sock_dir_name() to "hero_codescalers" (or "hero_codescalers_<N>" for
non-zero instances) and update the doc-comment table to match.
- Add `disk_pct` field
- Add `disk_total_gb` field
- Add `disk_used_gb` field
mahmoud merged commit 41102bf5b0 into development 2026-04-27 18:30:36 +00:00
mahmoud deleted branch development_fix_cli_sock_default 2026-04-27 18:30:40 +00:00
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_codescalers!16
No description provided.