Finish removing the override_env / HERO_X_SOCKET pattern (hero_proc + my_init reliance, then the macro option in hero_blueprint/hero_lib) #312

Open
opened 2026-06-21 15:56:54 +00:00 by sameh-farouk · 0 comments
Member

Finish removing the deprecated override_env / HERO_X_SOCKET pattern from openrpc_client!. A per-client env socket override is "possible but not good practice" (Kristof, 2026-06) — clients should fall back to the canonical default socket path, or use connect_socket(path) when a non-default socket is genuinely needed.

Already done

  • Skill deprecated: hero_skills skills/blueprint/herolib_macros/herolib_openrpc.md (override_env removed from the docs, points to connect_socket).
  • 17 consumers cleaned + merged to development: the 16 no-reliance SDKs (my_compute_holo, hero_agent, hero_books, hero_cockpit, hero_code, hero_codescalers, hero_embedder_provider, hero_gpu, hero_logic, hero_matrixchat, hero_orchestrator, hero_os_tfgrid_deployer, hero_planner, hero_slides, hero_voice, hero_voice_provider) + hero_collab. (hero_shrimp was a false positive — allow_override_env budget field, unrelated.)

Remaining — two reliance cases (need a deliberate replacement, NOT a blind removal)

These services actively set and rely on their socket env var (dev/test/deploy), so removing override_env there breaks real workflows. Replace with connect_socket(path) + an explicit --socket <path> flag.

  • hero_procHERO_PROC_SOCKET — referenced in crates/hero_proc_admin/docs/{cli_reference,paths}.md, plus dev/test override flows (e.g. the ai_direct_test functional test, troubleshooting "set HERO_PROC_SOCKET=<path>").
  • my_init (geomind) → MY_INIT_SOCKET — heavier: README.md, docs/reference/paths.md, scripts/install.sh, tests/playground/run-tui.sh, tests/scripts/harness.sh.

Last — remove the macro option itself (only AFTER the two above)

Remove the override_env parse/emit from the macro + its runtime helper. Doing this earlier breaks any consumer still passing override_env ("unknown option override_env"):

  • hero_blueprint/crates/derive/src/openrpc_client.rs (parse + emit)
  • hero_lib/crates/macros/src/openrpc_client.rs (+ lib.rs) (parse + emit)
  • hero_lib/crates/core/src/base/paths.rs:224 resolve_socket_path_with_override + hero_lib/crates/hero_lifecycle/src/base.rs:254 (the two runtime fns it emits calls to) — drop, or keep the fn but stop emitting calls.

Sequence / gate

  1. skill + 17 consumers (done).
  2. hero_proc + my_init: migrate to connect_socket(path) + --socket flag (owners' call on the exact UX).
  3. only then: remove the macro option from hero_blueprint + hero_lib (×2 macro homes + ×2 runtime fns).

Owners: hero_proc / my_init for step 2; hero_lib + hero_blueprint maintainers for step 3.

Finish removing the deprecated **`override_env` / `HERO_X_SOCKET`** pattern from `openrpc_client!`. A per-client env socket override is "possible but not good practice" (Kristof, 2026-06) — clients should fall back to the canonical default socket path, or use `connect_socket(path)` when a non-default socket is genuinely needed. ## Already done - **Skill deprecated:** `hero_skills` `skills/blueprint/herolib_macros/herolib_openrpc.md` (override_env removed from the docs, points to `connect_socket`). - **17 consumers cleaned + merged to `development`:** the 16 no-reliance SDKs (`my_compute_holo`, `hero_agent`, `hero_books`, `hero_cockpit`, `hero_code`, `hero_codescalers`, `hero_embedder_provider`, `hero_gpu`, `hero_logic`, `hero_matrixchat`, `hero_orchestrator`, `hero_os_tfgrid_deployer`, `hero_planner`, `hero_slides`, `hero_voice`, `hero_voice_provider`) + `hero_collab`. (`hero_shrimp` was a false positive — `allow_override_env` budget field, unrelated.) ## Remaining — two reliance cases (need a deliberate replacement, NOT a blind removal) These services actively **set and rely on** their socket env var (dev/test/deploy), so removing `override_env` there breaks real workflows. Replace with `connect_socket(path)` + an explicit `--socket <path>` flag. - **`hero_proc` → `HERO_PROC_SOCKET`** — referenced in `crates/hero_proc_admin/docs/{cli_reference,paths}.md`, plus dev/test override flows (e.g. the `ai_direct_test` functional test, troubleshooting "set `HERO_PROC_SOCKET=<path>`"). - **`my_init` (geomind) → `MY_INIT_SOCKET`** — heavier: `README.md`, `docs/reference/paths.md`, `scripts/install.sh`, `tests/playground/run-tui.sh`, `tests/scripts/harness.sh`. ## Last — remove the macro option itself (only AFTER the two above) Remove the `override_env` parse/emit from the macro + its runtime helper. Doing this earlier breaks any consumer still passing `override_env` ("unknown option `override_env`"): - `hero_blueprint/crates/derive/src/openrpc_client.rs` (parse + emit) - `hero_lib/crates/macros/src/openrpc_client.rs` (+ `lib.rs`) (parse + emit) - `hero_lib/crates/core/src/base/paths.rs:224` `resolve_socket_path_with_override` + `hero_lib/crates/hero_lifecycle/src/base.rs:254` (the two runtime fns it emits calls to) — drop, or keep the fn but stop emitting calls. ## Sequence / gate 1. ✅ skill + 17 consumers (done). 2. [ ] `hero_proc` + `my_init`: migrate to `connect_socket(path)` + `--socket` flag (owners' call on the exact UX). 3. [ ] only then: remove the macro option from hero_blueprint + hero_lib (×2 macro homes + ×2 runtime fns). Owners: hero_proc / my_init for step 2; hero_lib + hero_blueprint maintainers for step 3.
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/home_lhumina#312
No description provided.