Integrate per-domain OSIS split into hero_zero build & deploy pipeline #117

Closed
opened 2026-04-13 14:00:40 +00:00 by mik-tf · 1 comment
Owner

Background

Timur's commit 3b52af0 on hero_osis splits the monolithic hero_osis_server into 17 per-domain binaries:

  • hero_osis_identity, hero_osis_business, hero_osis_calendar, hero_osis_communication, hero_osis_files, hero_osis_projects, hero_osis_settings, hero_osis_network, hero_osis_finance, hero_osis_code, hero_osis_ai, hero_osis_flow, hero_osis_base, hero_osis_ledger, hero_osis_media, hero_osis_job, hero_osis_embedder

Each domain gets its own OServer instance and socket: $HERO_SOCKET_DIR/hero_osis_<domain>/rpc.sock

The old monolithic hero_osis_server binary and main.rs are deleted.

What needs to change

1. hero_zero build pipeline

docker/build-local.sh currently builds -p hero_osis_server — needs to build all 17 per-domain binaries.

2. Service TOMLs

Replace single hero_osis.toml with 17 per-domain TOMLs, each starting its own binary.

3. Profiles

profiles/user.toml needs entries for all 17 domain servers (and hero_osis_ui).

4. OSIS UI proxy

hero_osis_ui/src/routes.rs rpc_call_inner() currently connects to a single hero_osis/rpc.sock. Needs to route to the correct per-domain socket based on the method prefix (e.g. Contact.listhero_osis_identity/rpc.sock, Company.listhero_osis_business/rpc.sock).

5. Entrypoint seeding

docker/entrypoint.sh waits for hero_osis/rpc.sock — needs to wait for all domain sockets (or at least the critical ones like identity, business).

6. WASM client / islands

hero_os WASM islands that call OSIS need to know which domain socket to target. The proxy routes may need updating.

7. Seed data

The hero_osis_seed binary may need updating for per-domain seeding.

Context from Session 20

In session 20 we:

  • Fixed OSIS custom RPC dispatch (service methods like AuthService.get_challenge) — 4 commits to hero_rpc
  • Fixed context-aware type_dispatch in unified_server.rs (P0 — contexts were all routing to the last one)
  • Fixed OServer context registry (all --contexts now registered, not just root)
  • Fixed OSIS UI proxy to use HTTP instead of raw JSON-RPC
  • Fixed entrypoint socket path
  • Migrated ALL repos to directory socket convention (#116)
  • Build was 21/21

All these fixes are still valid — the per-domain OServer instances each use unified_server.rs which has our dispatch fixes.

Reference

  • hero_osis commit: 3b52af0 by Timur Gordon
  • hero_osis issue: lhumina_code/hero_osis#22
  • Session 20 dispatch fixes: hero_rpc commits 2f90341, 91c30ef, cefba5a, 8d406b5, 5f7720b
  • Socket convention: #116
## Background Timur's commit `3b52af0` on hero_osis splits the monolithic `hero_osis_server` into 17 per-domain binaries: - `hero_osis_identity`, `hero_osis_business`, `hero_osis_calendar`, `hero_osis_communication`, `hero_osis_files`, `hero_osis_projects`, `hero_osis_settings`, `hero_osis_network`, `hero_osis_finance`, `hero_osis_code`, `hero_osis_ai`, `hero_osis_flow`, `hero_osis_base`, `hero_osis_ledger`, `hero_osis_media`, `hero_osis_job`, `hero_osis_embedder` Each domain gets its own OServer instance and socket: `$HERO_SOCKET_DIR/hero_osis_<domain>/rpc.sock` The old monolithic `hero_osis_server` binary and `main.rs` are deleted. ## What needs to change ### 1. hero_zero build pipeline `docker/build-local.sh` currently builds `-p hero_osis_server` — needs to build all 17 per-domain binaries. ### 2. Service TOMLs Replace single `hero_osis.toml` with 17 per-domain TOMLs, each starting its own binary. ### 3. Profiles `profiles/user.toml` needs entries for all 17 domain servers (and hero_osis_ui). ### 4. OSIS UI proxy `hero_osis_ui/src/routes.rs` `rpc_call_inner()` currently connects to a single `hero_osis/rpc.sock`. Needs to route to the correct per-domain socket based on the method prefix (e.g. `Contact.list` → `hero_osis_identity/rpc.sock`, `Company.list` → `hero_osis_business/rpc.sock`). ### 5. Entrypoint seeding `docker/entrypoint.sh` waits for `hero_osis/rpc.sock` — needs to wait for all domain sockets (or at least the critical ones like identity, business). ### 6. WASM client / islands hero_os WASM islands that call OSIS need to know which domain socket to target. The proxy routes may need updating. ### 7. Seed data The `hero_osis_seed` binary may need updating for per-domain seeding. ## Context from Session 20 In session 20 we: - Fixed OSIS custom RPC dispatch (service methods like AuthService.get_challenge) — 4 commits to hero_rpc - Fixed context-aware type_dispatch in unified_server.rs (P0 — contexts were all routing to the last one) - Fixed OServer context registry (all --contexts now registered, not just root) - Fixed OSIS UI proxy to use HTTP instead of raw JSON-RPC - Fixed entrypoint socket path - Migrated ALL repos to directory socket convention (https://forge.ourworld.tf/lhumina_code/home/issues/116) - Build was 21/21 All these fixes are still valid — the per-domain OServer instances each use unified_server.rs which has our dispatch fixes. ## Reference - hero_osis commit: `3b52af0` by Timur Gordon - hero_osis issue: lhumina_code/hero_osis#22 - Session 20 dispatch fixes: hero_rpc commits `2f90341`, `91c30ef`, `cefba5a`, `8d406b5`, `5f7720b` - Socket convention: https://forge.ourworld.tf/lhumina_code/home/issues/116
Author
Owner

Per-domain OSIS split integrated (#117)

Changes

hero_zero (2e665c4):

  • build-local.sh / build-services.sh / preflight.sh: build all 17 per-domain binaries instead of monolithic hero_osis_server
  • 17 new service TOMLs (hero_osis_identity.toml, hero_osis_communication.toml, etc.)
  • hero_osis.toml now UI-only (runs hero_osis_ui binary)
  • Profiles: per-domain entries in user/core/tester
  • entrypoint.sh: wait for hero_osis_identity/rpc.sock, seed via identity socket directly, rpc.sock→ui.sock symlink for hero_router compatibility
  • depends_on updated: hero_os, hero_biz, hero_supervisor → hero_osis_identity
  • Smoke/integration tests updated

hero_osis (c4a2630):

  • routes.rs: method_to_domain() maps RPC methods to correct per-domain socket; strips domain prefix from 3-part methods
  • main.rs: /:context POST catch-all for hero_router's /ui/rpc/ rewrite, /rpc default handler

Verified

  • All 17 domain services + UI running (~282MB total)
  • hero_sockets compliant: /health, /.well-known/heroservice.json, /openrpc.json, POST /rpc on each domain socket
  • Gateway routing works: 3-part methods (identity.contact.list), 2-part (AuthService.get_challenge), cross-domain (calendar.event.list)
  • Seeding works via identity socket
  • Smoke tests: 96/124 pass (all OSIS tests pass, failures are pre-existing)

Memory

17 OServer processes: ~282MB total (range 5-31MB per process). Well within 16GB VM budget.

## Per-domain OSIS split integrated (#117) ### Changes **hero_zero** (`2e665c4`): - `build-local.sh` / `build-services.sh` / `preflight.sh`: build all 17 per-domain binaries instead of monolithic `hero_osis_server` - 17 new service TOMLs (`hero_osis_identity.toml`, `hero_osis_communication.toml`, etc.) - `hero_osis.toml` now UI-only (runs `hero_osis_ui` binary) - Profiles: per-domain entries in user/core/tester - `entrypoint.sh`: wait for `hero_osis_identity/rpc.sock`, seed via identity socket directly, `rpc.sock→ui.sock` symlink for hero_router compatibility - `depends_on` updated: hero_os, hero_biz, hero_supervisor → `hero_osis_identity` - Smoke/integration tests updated **hero_osis** (`c4a2630`): - `routes.rs`: `method_to_domain()` maps RPC methods to correct per-domain socket; strips domain prefix from 3-part methods - `main.rs`: `/:context` POST catch-all for hero_router's `/ui/rpc/` rewrite, `/rpc` default handler ### Verified - All 17 domain services + UI running (~282MB total) - hero_sockets compliant: `/health`, `/.well-known/heroservice.json`, `/openrpc.json`, `POST /rpc` on each domain socket - Gateway routing works: 3-part methods (`identity.contact.list`), 2-part (`AuthService.get_challenge`), cross-domain (`calendar.event.list`) - Seeding works via identity socket - Smoke tests: 96/124 pass (all OSIS tests pass, failures are pre-existing) ### Memory 17 OServer processes: ~282MB total (range 5-31MB per process). Well within 16GB VM budget.
Sign in to join this conversation.
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/home#117
No description provided.