[refactor] Rust _server / _ui binaries should read config from hero_proc secrets, not std::env #223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
Per the
hero_proc_metaskill's canonical rule: all_uiand_serverprocesses must read configuration exclusively from hero_proc secrets, never from OS env or config files.Today this is widely violated across the Hero stack — most
hero_*_serverandhero_*_uiRust binaries usestd::env::var(…)(often viadotenvyor hand-rolled config readers) for tokens, API keys, external URLs, context names, socket dirs, and feature flags. This bypasses hero_proc's centralized secret store and forces operators to ship config via~/.bashrc/ per-serviceenvblocks / TOML files /service_*.nu$envreads.Sibling of:
Umbrella tracker: see #225.
Audit shape
grep -rn 'std::env::var\|env!\|option_env!\|dotenvy' lhumina_code/hero_*/crates/{hero_*_server,hero_*_ui}/src/— produce a per-binary table of which env vars each reads.hero_proc_sdkRUST_LOG,HOSTNAME,HOME) → keep as-isstd::env::var("FOO")withhero_proc_sdk::secret_get("FOO")(or the right SDK call), wrap in a typed config struct.hero_demo/docs/ops/DEPLOYMENT.md.Scope (initial pass — full inventory pending)
Confirmed offenders surfaced during sessions 50–68:
hero_office:ONLYOFFICE_JWT_SECRET,CONNECTOR_EXTERNAL_URL,OO_UPSTREAM_BASE,DEFAULT_CONTEXT,HERO_SOCKET_DIRhero_agent:AIBROKER_API_ENDPOINT(and likely OpenRouter/Groq keys)hero_aibroker: provider API keyshero_books: AI provider keyshero_voice: ONNX paths (ORT_DYLIB_PATH), STT/TTS provider keysReal number is likely 30+ secrets across the 21 services with
--downloadwired today. First task of the issue:grepand tabulate.Sequencing
After home#212 binary rollout completes (currently 22/29 = 76%). Same sequencing as the nu-side companion home#222.
Acceptance criteria
std::env::varreads of config-shaped values in anyhero_*_server/hero_*_uicrate. Runtime-shaped reads (RUST_LOG etc.) remain documented exceptions.DEPLOYMENT.md.hero_proc secret set.hero_proc secret set …andservice all install --download && service all startbrings up a working stack with no~/.bashrcedits, no per-service env blocks.References
~/.claude/skills/hero_proc_meta/SKILL.md— canonical META env-from-secrets rule~/.claude/skills/hero_proc_secrets/SKILL.md— secret store API~/.claude/skills/hero_proc_sdk/SKILL.md— Rust SDK for secret_getmik-tf referenced this issue from lhumina_code/hero_demo2026-05-06 21:42:24 +00:00