fix(generator): drop hardcoded socket/data paths and legacy indexer fallback #144

Merged
timur merged 2 commits from development_socket_paths_143 into development 2026-05-26 09:17:01 +00:00
Owner

Summary

  • Scaffolded UI AppState::from_env now joins the canonical <service>/rpc.sock instead of the spurious <service>_server/rpc.sock layout (matches service.toml + hero_sockets.md).
  • e2e example generator (generate/e2e.rs) now resolves its data dir under the Hero var tree (<var-root>/osisdb/<domain>_e2e) instead of /tmp/herozero_<domain>_e2e, so lab service --ephemeral keeps the example inside its scratch sandbox.
  • Emitted indexer_reachable() helper in build/find_tests_emit.rs drops the legacy hero_indexer_server.sock fallback — canonical hero_indexer/rpc.sock only.
  • benches/index_perf.rs::indexer_socket_path() drops the same legacy fallback symmetrically.
  • Doc strings on generate_ui_state_rs rustdoc updated to match (<service>/rpc.sock).
  • New regression test test_scaffold_ui_state_uses_canonical_service_socket_path pins the canonical path in the scaffolded state.rs and asserts the legacy _server/rpc.sock form does not appear.

Does not touch hero_lifecycle, ServiceRpcServer/ServiceAdminServer, or the generate_server_main_rs / generate_admin_main_rs binary main.rs templates — those are #142's surface.

Test plan

  • cargo build --workspace clean
  • cargo test -p hero_rpc_generator passes (151 unit + 0 bin + 0 doctest = 151 unit tests)
  • New regression test pins AppState::from_env to <svc>/rpc.sock

#143

## Summary - Scaffolded UI `AppState::from_env` now joins the canonical `<service>/rpc.sock` instead of the spurious `<service>_server/rpc.sock` layout (matches `service.toml` + `hero_sockets.md`). - e2e example generator (`generate/e2e.rs`) now resolves its data dir under the Hero var tree (`<var-root>/osisdb/<domain>_e2e`) instead of `/tmp/herozero_<domain>_e2e`, so `lab service --ephemeral` keeps the example inside its scratch sandbox. - Emitted `indexer_reachable()` helper in `build/find_tests_emit.rs` drops the legacy `hero_indexer_server.sock` fallback — canonical `hero_indexer/rpc.sock` only. - `benches/index_perf.rs::indexer_socket_path()` drops the same legacy fallback symmetrically. - Doc strings on `generate_ui_state_rs` rustdoc updated to match (`<service>/rpc.sock`). - New regression test `test_scaffold_ui_state_uses_canonical_service_socket_path` pins the canonical path in the scaffolded `state.rs` and asserts the legacy `_server/rpc.sock` form does not appear. Does not touch `hero_lifecycle`, `ServiceRpcServer`/`ServiceAdminServer`, or the `generate_server_main_rs` / `generate_admin_main_rs` binary `main.rs` templates — those are #142's surface. ## Test plan - `cargo build --workspace` clean - `cargo test -p hero_rpc_generator` passes (151 unit + 0 bin + 0 doctest = 151 unit tests) - New regression test pins `AppState::from_env` to `<svc>/rpc.sock` https://forge.ourworld.tf/lhumina_code/hero_rpc/issues/143
timur changed title from WIP: fix(generator): drop hardcoded socket/data paths and legacy indexer fallback to fix(generator): drop hardcoded socket/data paths and legacy indexer fallback 2026-05-26 09:16:52 +00:00
timur merged commit a302c6955d into development 2026-05-26 09:17:01 +00:00
timur deleted branch development_socket_paths_143 2026-05-26 09:17:01 +00:00
Sign in to join this conversation.
No reviewers
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_rpc!144
No description provided.