chore(hero_aibroker): D-10 sweep — canonical service.toml + cargo update + dep audit #142

Merged
mik-tf merged 1 commit from development_mik into development 2026-05-16 03:05:41 +00:00
Owner

Closes part of hero_proc#102 (T1 #4 deps-first; s99 in the workspace multi-session sweep).

D-10 acceptance — 5/5 met

# Criterion Status
1 lab infocheck exits 0 11 crate(s) clean, 0 finding(s) total (4 main + 7 MCP sub-binaries)
2 Canonical main.rs wiring on all 4 main binaries ✓ already in place (service_base!() + validate_service_toml + handle_info_flag + daemons banner)
3 cargo update clean hero_proc_sdk 432348c0 → a436a20f (s97 PR #103 merge), herolib_core d0d74a3b → 9b5912bf (s96 cascade), hero_rpc 32f41dc1 → f17dcd71, hero_archipelagos 265c0da1 → 18c2f928
4 Cargo.toml deps audited, AI-cruft stripped ✓ 6 zero-match deps removed (see below)
5 lab service <bin> --install --start + smoke hero_aibroker_server smoke 44/44 passed (10 per-domain RPC sockets × 4 probes each + REST × 2 + web × 2); hero_aibroker_admin smoke 2/2 passedno 10s timeout (s95-flagged admin runtime issue resolved via cascade)

What

Canonical 4-binary service.toml pattern

Rewrote all 4 main service.toml files (hero_aibroker_server, hero_aibroker_admin, hero_aibroker, hero_aibroker_services) to the canonical multi-binary pattern: each file lists all 4 sibling binaries (cli + server + admin + services/cmdline) with their sockets/deps/env. Only [service].crate + [service].display differ per crate. Reference impl: hero_db @ a08a1c4 (canonical 3-binary; same pattern extends to 4 here because hero_aibroker_services is a 4th sibling cmdline binary under service.name = "hero_aibroker").

Before: each service.toml listed only its own binary → broke lab service multi-binary discovery (same anti-pattern as hero_proc#103 fixed in s97).

The 7 MCP sub-binaries under crates/mcp/*/ (mcp_ping, mcp_exa, mcp_hero, mcp_scraperapi, mcp_scrapfly, mcp_serpapi, mcp_serper) declare distinct service.name = "mcp_<x>" and stand alone — not folded into the canonical 4 (correct: they are independent service registrations under hero_aibroker_services supervision).

cargo update — s97 + s98 cascade

hero_proc_sdk         432348c0 → a436a20f   (s97 PR #103 merge)
herolib_core          d0d74a3b → 9b5912bf   (s96 PR #140 cascade)
herolib_derive        d0d74a3b → 9b5912bf
hero_rpc_derive       32f41dc1 → f17dcd71
hero_rpc_openrpc      32f41dc1 → f17dcd71
hero_archipelagos_*   265c0da1 → 18c2f928

Conservative dep audit (6 deps stripped)

Only deps with 0 use <dep>::|<dep>:: matches under src/ were stripped:

Crate Deps removed
hero_aibroker_admin futures, tower-http, serde, dirs
hero_aibroker (CLI) serde, serde_json

Nothing safely strippable on hero_aibroker_server (all deps in use) or hero_aibroker_services (lean dep list, all in use).

Test impact

cargo test --workspace --release --no-fail-fast: 123 passed, 24 failed.

The 24 failures are pre-existing on origin/development @ 00197f6 — verified by stash-and-rerun (identical failure list before my changes were applied). They are all in the fake_server test fixture suite + 2 cascade tests:

  • cascade_two_brokers (90s timeout) and mother_calls_each_configured_provider (20s timeout) — multi-broker fixtures.
  • 22 fake_server tests fail at fixture setup: hero_aibroker_server --fake is launched with HERO_PROC_SOCKET=/dev/null/nonexistent to suppress hero_proc lookup, but hero_rpc/crates/openrpc/src/transport.rs:33-40 — added by caa028f fix(transport): die with clear error message when socket is missing or unconnectable — now exits the process on unreachable hero_proc socket paths. Test fixture relies on stale soft-fail behavior of the broker pre-caa028f.

This is an upstream hero_rpc cascade affecting the fake-server fixture in hero_aibroker_test/tests/fake_server.rs and hero_aibroker_examples/tests/{cascade,mother_providers}.rs. Out of D-10 scope for this PR (acceptance is lab service live smoke, which passes 44/44 + 2/2). Recommended follow-up: either (a) fix the fixture to provide a real hero_proc UDS, or (b) make --fake mode skip hero_proc lookup entirely. Filed as latent issue for the next aibroker-touching session.

No new failures introduced by my changes.


Signed-off-by: mik-tf

Closes part of [hero_proc#102](https://forge.ourworld.tf/lhumina_code/hero_proc/issues/102) (T1 #4 deps-first; s99 in the workspace multi-session sweep). ## D-10 acceptance — 5/5 met | # | Criterion | Status | |---|---|---| | 1 | `lab infocheck` exits 0 | ✓ `11 crate(s) clean, 0 finding(s) total` (4 main + 7 MCP sub-binaries) | | 2 | Canonical `main.rs` wiring on all 4 main binaries | ✓ already in place (`service_base!()` + `validate_service_toml` + `handle_info_flag` + daemons banner) | | 3 | `cargo update` clean | ✓ `hero_proc_sdk` 432348c0 → a436a20f (s97 PR #103 merge), `herolib_core` d0d74a3b → 9b5912bf (s96 cascade), `hero_rpc` 32f41dc1 → f17dcd71, `hero_archipelagos` 265c0da1 → 18c2f928 | | 4 | `Cargo.toml` deps audited, AI-cruft stripped | ✓ 6 zero-match deps removed (see below) | | 5 | `lab service <bin> --install --start` + smoke | ✓ `hero_aibroker_server` **smoke 44/44 passed** (10 per-domain RPC sockets × 4 probes each + REST × 2 + web × 2); `hero_aibroker_admin` **smoke 2/2 passed** — **no 10s timeout** (s95-flagged admin runtime issue resolved via cascade) | ## What ### Canonical 4-binary service.toml pattern Rewrote all 4 main `service.toml` files (`hero_aibroker_server`, `hero_aibroker_admin`, `hero_aibroker`, `hero_aibroker_services`) to the canonical multi-binary pattern: **each file lists all 4 sibling binaries** (cli + server + admin + services/cmdline) with their sockets/deps/env. Only `[service].crate` + `[service].display` differ per crate. Reference impl: `hero_db @ a08a1c4` (canonical 3-binary; same pattern extends to 4 here because `hero_aibroker_services` is a 4th sibling cmdline binary under `service.name = "hero_aibroker"`). Before: each `service.toml` listed only its own binary → broke `lab service` multi-binary discovery (same anti-pattern as hero_proc#103 fixed in s97). The 7 MCP sub-binaries under `crates/mcp/*/` (mcp_ping, mcp_exa, mcp_hero, mcp_scraperapi, mcp_scrapfly, mcp_serpapi, mcp_serper) declare distinct `service.name = "mcp_<x>"` and **stand alone** — not folded into the canonical 4 (correct: they are independent service registrations under hero_aibroker_services supervision). ### cargo update — s97 + s98 cascade ``` hero_proc_sdk 432348c0 → a436a20f (s97 PR #103 merge) herolib_core d0d74a3b → 9b5912bf (s96 PR #140 cascade) herolib_derive d0d74a3b → 9b5912bf hero_rpc_derive 32f41dc1 → f17dcd71 hero_rpc_openrpc 32f41dc1 → f17dcd71 hero_archipelagos_* 265c0da1 → 18c2f928 ``` ### Conservative dep audit (6 deps stripped) Only deps with 0 `use <dep>::|<dep>::` matches under `src/` were stripped: | Crate | Deps removed | |---|---| | `hero_aibroker_admin` | `futures`, `tower-http`, `serde`, `dirs` | | `hero_aibroker` (CLI) | `serde`, `serde_json` | Nothing safely strippable on `hero_aibroker_server` (all deps in use) or `hero_aibroker_services` (lean dep list, all in use). ## Test impact `cargo test --workspace --release --no-fail-fast`: **123 passed, 24 failed**. The 24 failures are **pre-existing on origin/development @ `00197f6`** — verified by stash-and-rerun (identical failure list before my changes were applied). They are all in the `fake_server` test fixture suite + 2 cascade tests: - `cascade_two_brokers` (90s timeout) and `mother_calls_each_configured_provider` (20s timeout) — multi-broker fixtures. - 22 fake_server tests fail at fixture setup: `hero_aibroker_server --fake` is launched with `HERO_PROC_SOCKET=/dev/null/nonexistent` to suppress hero_proc lookup, but [`hero_rpc/crates/openrpc/src/transport.rs:33-40`](https://forge.ourworld.tf/lhumina_code/hero_rpc/src/branch/development/crates/openrpc/src/transport.rs#L33) — added by `caa028f` `fix(transport): die with clear error message when socket is missing or unconnectable` — now exits the process on unreachable hero_proc socket paths. Test fixture relies on stale soft-fail behavior of the broker pre-`caa028f`. This is an upstream `hero_rpc` cascade affecting the fake-server fixture in `hero_aibroker_test/tests/fake_server.rs` and `hero_aibroker_examples/tests/{cascade,mother_providers}.rs`. **Out of D-10 scope** for this PR (acceptance is `lab service` live smoke, which passes 44/44 + 2/2). Recommended follow-up: either (a) fix the fixture to provide a real hero_proc UDS, or (b) make `--fake` mode skip hero_proc lookup entirely. Filed as latent issue for the next aibroker-touching session. **No new failures introduced by my changes.** --- Signed-off-by: mik-tf
chore(hero_aibroker): D-10 sweep — canonical service.toml + cargo update + dep audit
All checks were successful
Build and Test / build-and-test (pull_request) Successful in 7m33s
277a1e41a2
Closes part of lhumina_code/hero_proc#102
(T1 #4 deps-first; s99 in the workspace multi-session sweep).

## What

- Rewrite all 4 main `service.toml` files (`hero_aibroker_server`,
  `hero_aibroker_admin`, `hero_aibroker`, `hero_aibroker_services`) to the
  canonical N-binary pattern: each file lists all 4 sibling binaries
  (cli + server + admin + services/cmdline) with their sockets/deps/env.
  Only `[service].crate` + `[service].display` differ per crate.
  Reference impl: `hero_db @ a08a1c4`.
- The 7 MCP sub-binary `service.toml` files under `crates/mcp/*/` already
  declare distinct `service.name` (`mcp_ping`, `mcp_exa`, etc.) and stand
  alone — not folded into the canonical 4 (correct: they are independent
  service registrations).
- `cargo update` picks up the s97 + s98 cascade: `hero_proc_sdk` 432348c0
  → a436a20f (s97 PR #103 merge), `herolib_core` d0d74a3b → 9b5912bf
  (s96 PR #140 cascade), `hero_rpc` 32f41dc1 → f17dcd71, `hero_archipelagos`
  265c0da1 → 18c2f928.
- Strip 6 zero-match deps (conservative audit; only 0-hit deps under `src/`):
  - `hero_aibroker_admin`: `futures`, `tower-http`, `serde`, `dirs`
  - `hero_aibroker` (CLI): `serde`, `serde_json`

`main.rs` wiring already correct on all 4 binaries (`service_base!()` +
`validate_service_toml` + `handle_info_flag` + (daemons) banner).

## D-10 acceptance (all 5 met)

1. `lab infocheck`: `11 crate(s) clean, 0 finding(s) total` (4 main + 7 MCP).
2. `main.rs` canonical wiring in place on all 4 binaries.
3. `cargo update` clean; lockfile reflects latest Proc SDK + `herolib_core`
   + `hero_rpc` + `hero_archipelagos`.
4. `Cargo.toml` deps audited; 6 zero-match deps stripped.
5. `lab service hero_aibroker_server --install --start` → **smoke 44/44
   passed** (10 per-domain RPC sockets × 4 probes + REST × 2 + web × 2);
   `lab service hero_aibroker_admin --install --start` → **smoke 2/2
   passed** (no 10s timeout — s95-flagged issue resolved via cascade).

## Test impact

`cargo test --workspace --release --no-fail-fast` net:
- **123 passed**, 24 failed (all pre-existing on origin/development `00197f6`;
  verified by stash-and-rerun: identical failure list).
- The 24 failures are the `fake_server` test fixture suite + cascade tests:
  `hero_aibroker_server --fake` is launched with `HERO_PROC_SOCKET=
  /dev/null/nonexistent` to suppress hero_proc lookup, but `hero_rpc`'s
  `transport.rs:33-40` socket-access pre-flight (added by `caa028f`,
  `fix(transport): die with clear error message`) now exits the process
  on unreachable hero_proc socket paths. Test fixture relies on stale
  soft-fail behavior. **Pre-existing upstream cascade**, out of D-10 scope
  for this PR.
- No new failures introduced by my changes.

Signed-off-by: mik-tf <logismos@protonmail.ch>
mik-tf merged commit 94e6b76d9a into development 2026-05-16 03:05:41 +00:00
mik-tf deleted branch development_mik 2026-05-16 03:05:41 +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_aibroker!142
No description provided.