[D-10] Test/demo binaries in 4 crates need canonical service infra or removal #139

Open
opened 2026-05-16 00:23:10 +00:00 by mik-tf · 0 comments
Owner

Context

lab infocheck on lhumina_code/hero_lib reports 21 findings across 4 binary-bearing crates, all caused by the workspace shipping demo/test binaries without the canonical herolib_core::service_base!() + service.toml infrastructure that the D-10 service.toml sweep enforces for every Hero service binary.

This issue was opened during hero_proc#102 T1 #1 (hero_lib) and deliberately deferred from the primary cascade-fix PR to keep the load-bearing dep-update unblock small and reviewable. See the linked hero_lib PR for the cascade fix; this issue tracks the follow-up.

Scope — 4 crates, 21 findings

Crate Binaries Findings Notes
crates/ai modeltest (src/bin/modeltest.rs) 5 — missing service.toml + herolib_core dep + service_base!() + validate_service_toml + handle_info_flag Test-only model-catalog probe
crates/ai_direct 4 bins (image_gen_test, nemotron_super, ttstest, modeltest_direct) 5 — same shape as crates/ai All demo/test
crates/clients opencode_tester, opencode_demo 4 — missing service.toml + service_base!() + validate + handle_info (no Cargo.toml dep issue — herolib_core already a dep) Demo bins
crates/web herolib_web 7 — service.toml + herolib_core dep + service_base!() + validate + handle_info + hand-rolled print_info_json to delete + hand-rolled print_startup_info to rewrite or delete Demo server

Total: 4 new service.toml files + 4 main.rs reworks + 3 Cargo.toml herolib_core adds + 2 hand-rolled print_* cleanups in crates/web.

Why this was deferred (not "N/A")

hero_lib/CLAUDE.md declares the repo "library-only" with BINARIES="" in buildenv.sh — meaning none of these binaries are installed to ~/hero/bin/ or supervised by hero_proc. They exist for local development testing. The literal D-10 acceptance criterion 1 ("service.toml present") and 4 ("lab service … --start smoke gate green") therefore have nothing to do in production — but lab infocheck's discovery rule (any src/main.rs or [[bin]] ⇒ canonical infra required) still flags them.

Two ways to close:

  1. Apply the canonical infra to all 4 crates — full D-10 compliance per lab infocheck. Estimated ~150-200 LOC + 4 new service.toml files.
  2. Delete the test/demo binaries entirely — matches the library-only declaration. Risk: someone's local workflow depends on them. At least 3 of the bins already call methods that no longer exist on the current AiClient (e.g. AiClient::from_env, AiClient::direct, AiClient::get), so they're already broken.

Recommend a quick triage pass to choose per-binary: either bring them up to canonical infra, or delete them. Mixed outcome is fine.

Acceptance

  • ~/hero/bin/lab infocheck on lhumina_code/hero_lib reports 0 crate(s) with issues, 0 finding(s) total.
  • cargo build --workspace --release stays clean.
  • Bins are either deleted entirely OR have working --info, --help, service.toml, and service_base!() infra. No partials.

References

  • Parent META: hero_proc#102 — service.toml sweep
  • Decision: D-10 acceptance criteria
  • Skill: hero_service_toml_info — service.toml spec + canonical pattern
  • Skill: herolib_baseservice_base!() macro + handle_info_flag API
  • hero_lib CLAUDE.md BINARIES="" declaration
## Context `lab infocheck` on `lhumina_code/hero_lib` reports **21 findings across 4 binary-bearing crates**, all caused by the workspace shipping demo/test binaries without the canonical `herolib_core::service_base!()` + `service.toml` infrastructure that the [D-10 service.toml sweep](https://forge.ourworld.tf/lhumina_code/hero_proc/issues/102) enforces for every Hero service binary. This issue was opened during [hero_proc#102 T1 #1 (`hero_lib`)](https://forge.ourworld.tf/lhumina_code/hero_proc/issues/102#issuecomment-33327) and deliberately deferred from the primary cascade-fix PR to keep the load-bearing dep-update unblock small and reviewable. See the linked hero_lib PR for the cascade fix; this issue tracks the follow-up. ## Scope — 4 crates, 21 findings | Crate | Binaries | Findings | Notes | |---|---|---|---| | `crates/ai` | `modeltest` (src/bin/modeltest.rs) | 5 — missing service.toml + herolib_core dep + service_base!() + validate_service_toml + handle_info_flag | Test-only model-catalog probe | | `crates/ai_direct` | 4 bins (`image_gen_test`, `nemotron_super`, `ttstest`, `modeltest_direct`) | 5 — same shape as `crates/ai` | All demo/test | | `crates/clients` | `opencode_tester`, `opencode_demo` | 4 — missing service.toml + service_base!() + validate + handle_info (no Cargo.toml dep issue — `herolib_core` already a dep) | Demo bins | | `crates/web` | `herolib_web` | 7 — service.toml + herolib_core dep + service_base!() + validate + handle_info + hand-rolled `print_info_json` to delete + hand-rolled `print_startup_info` to rewrite or delete | Demo server | **Total**: 4 new `service.toml` files + 4 `main.rs` reworks + 3 `Cargo.toml` `herolib_core` adds + 2 hand-rolled `print_*` cleanups in `crates/web`. ## Why this was deferred (not "N/A") `hero_lib/CLAUDE.md` declares the repo "library-only" with `BINARIES=""` in `buildenv.sh` — meaning none of these binaries are installed to `~/hero/bin/` or supervised by `hero_proc`. They exist for local development testing. The literal D-10 acceptance criterion 1 ("service.toml present") and 4 ("`lab service … --start` smoke gate green") therefore have nothing to *do* in production — but `lab infocheck`'s discovery rule (any `src/main.rs` or `[[bin]]` ⇒ canonical infra required) still flags them. Two ways to close: 1. **Apply the canonical infra to all 4 crates** — full D-10 compliance per `lab infocheck`. Estimated ~150-200 LOC + 4 new `service.toml` files. 2. **Delete the test/demo binaries entirely** — matches the library-only declaration. Risk: someone's local workflow depends on them. At least 3 of the bins already call methods that no longer exist on the current `AiClient` (e.g. `AiClient::from_env`, `AiClient::direct`, `AiClient::get`), so they're already broken. Recommend a quick triage pass to choose per-binary: either bring them up to canonical infra, or delete them. Mixed outcome is fine. ## Acceptance - `~/hero/bin/lab infocheck` on `lhumina_code/hero_lib` reports `0 crate(s) with issues, 0 finding(s) total`. - `cargo build --workspace --release` stays clean. - Bins are either deleted entirely OR have working `--info`, `--help`, service.toml, and service_base!() infra. No partials. ## References - Parent META: [hero_proc#102](https://forge.ourworld.tf/lhumina_code/hero_proc/issues/102) — service.toml sweep - Decision: [D-10](https://forge.ourworld.tf/lhumina_code/hero_proc/issues/102#issuecomment-33220) acceptance criteria - Skill: `hero_service_toml_info` — service.toml spec + canonical pattern - Skill: `herolib_base` — `service_base!()` macro + `handle_info_flag` API - hero_lib CLAUDE.md `BINARIES=""` declaration
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/hero_lib#139
No description provided.