fix(service.toml): unify per-crate manifests to list all hero_code binaries #15
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_code!15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik"
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?
Summary
First repo of the hero_proc#102 workspace-wide
service.toml+lab servicesweep — operational validation-first pass onhero_code(closest-to-compliant T1 repo, the ref-impl forservice_base!()+BUILD_NR+print_startup_banner+prepare_socketsperff95528).Changes in this PR:
bd65631service.tomlto canonical pattern (each crate lists all 3 hero_code binaries with sockets/deps/env, matchinghero_dbata08a1c4). Was: each crate self-only → brokelab servicemulti-binary discovery.065594cserde_jsonfromhero_codeCLI; fix workspace[package.repository]fromhero_code_v2(dead repo, rename leftover) →hero_code.42db0e1D-10 acceptance state — honest report (4/5 met, 1 documented blocked)
service.tomldeserialises intoServiceTomlfor every binary cratelab infocheck)service_base!()+validate_service_toml+handle_info_flag+BUILD_NR+print_startup_banner+prepare_socketswired in everymain.rsff95528(boss landed it the day before this PR)cargo updateruns cleanlyCargo.tomldeps audited / AI-generated cruft strippeduse <crate>::matches undersrc/stripped). Deeper audit deferred.lab service --start+ smoke checks greenhero_code_server: 6/6 (rpc + app sockets) +hero_code_admin: 2/2 (admin) = 8 smoke checks total; verified under lab build #50469 with full dep chainhero_proc → hero_db → hero_aibroker → hero_coderunning. End-to-end integration testeditor_full_flow(incrates/hero_code_integration_tests/tests/editor.rs,#[ignore]d for CI) ALSO passes —cargo test -p hero_code_integration_tests -- --ignored→ 1 passed.Why criterion 3 is blocked (cross-repo cascade — out of hero_code scope)
cargo updateon this workspace moveshero_proc_sdkto@9390937a+(today's API), which changed:JobLogsInputnow requiresattempt: Option<i64>fieldJobLogsOutput.valueisOption<Vec<LogLine>>(was directVec<LogLine>)LogLine.{line, src, stream}areString(wereOption<String>)LogLine.timestamp_msisi64(wasOption<i64>)JobCreateOutput.idisi64(wasOption<i64>)herolib_tools(inhero_lib @ 37125e5) hasn't been updated to match —cargo updatebreaks compile on five sites incrates/tools/src/agent/mod.rs. Workaround: keep committedCargo.lock.Further investigation in s95 surfaced a SECOND cascading drift in the same hero_lib:
herolib_ai(incrates/ai/src/{client.rs,error.rs,lib.rs}) imports SEVEN types —ChatChunkStream,ChatStreamChunk,StreamChoice,StreamDelta,StreamUsage,StreamingClient,StreamError— that no longer exist inhero_aibroker_sdk @ 00197f6(they were structurally removed during the SDK's chat-module refactor — not renames). This requiresherolib_ai'schat_streamAPI to be re-implemented against the newhero_aibroker_sdk::chatsurface or removed entirely.Resolution path (post-merge follow-up): the sweep order pivots to deps-first for T1 —
hero_libbecomes T1 #1, not T1 #5.hero_libPR will land both fixes (herolib_toolsAPI match +herolib_aichat_stream reconciliation), after whichcargo updatehere resolves cleanly and this PR's criterion 3 retroactively goes green.Sweep-arc findings (apply to every subsequent T1+ repo)
Filed for the sweep tracker on #102#33220:
cargo updatelockstep trap. Don'tcargo updatemid-sweep until upstream deps are reconciled in deps-first order. See criterion-3 explanation above.hero_lib → hero_proc → hero_db → hero_aibroker → hero_router → hero_code.hero_code's smoke gate depends onhero_db_server+hero_aibroker_serverbinaries being current; validation-first ordering doesn't survive this.lab service <service-name> --startstarts only one binary. Thehero_service_check_fixskill §6 claims it starts everykind=server|admin|web. Empirically only one starts (the server). Workaround: invoke per-binary (lab service hero_code_admin --startseparately). Verified by inspecting hero_proc service list after invocation — onlyhero_code_serverregistered, nothero_code_admin. Filing as separate hero_skills issue.lab servicedestructive socket cleanup. Whenlabdecidedhero_procwas "not running" (false-negative liveness probe), it deleted~/hero/var/sockets/hero_proc/rpc.sockbefore attempting to spin up a fresh daemon.lab service resetallrecovered cleanly. Filing as separate hero_skills issue.screenis an implicitlabruntime dep.lab service hero_proc --startshells out toscreen -dmS hero_proc_serverto launch the daemon. Recommend bundling intolab flow hostinstall set OR adding tolab install. Filing as separate hero_skills issue.Test plan
lab infocheckexits 0 with3 crate(s) clean, 0 finding(s) totallab build --release --install --workspace: 3/3 binaries built + installed; post-build--info --jsonroundtrip ok (build #4)lab service hero_code_server --start: smoke gate 6/6 (/health,/openrpc.json,/.well-known/heroservice.json, JSON-RPCsystem.pingonrpc.sock+/healthand/.well-knownonhero_code_editor/rpc.sock)lab service hero_code_admin --start: smoke gate 2/2 onadmin.sock(/health,/.well-known/heroservice.json)hero_proc_server,hero_db_server,hero_aibroker_server,hero_code_server,hero_code_admin)cargo test --workspace --release: 50 passed, 0 failedcargo test -p hero_code_integration_tests -- --ignored: 1 passed (editor_full_flow— spawnshero_code_test_*via hero_proc_sdk, exercises editor.* OpenRPC, tears down)feedback_squash_merge_gate.md)After squash-merge
hero_lib(T1 #1 deps-first) — full sweep including the herolib_tools + herolib_ai fixes (local starter commit481bb322already ondevelopment_mikin workspace clone, not pushed).lhumina_code/hero_skills.Signed-off-by: mik-tf
Additional verifications (added at session close)
Re-validated under current lab build #54727 (was originally validated at #50469 before lab refactored mid-session). All three previously-unverified-but-claimed items now actually confirmed:
A. Smoke gate under current lab #54727 — 56/56 ✓
Full bootstrap from
lab service resetall→ bottom-up dep chain:Identical pass-rate as under #50469. Lab churn (service_manager.rs slim of 21 LOC) did not regress smoke gate behavior on this repo.
B. Stop/restart cycle — ✓
Clean shutdown + clean re-bind. No socket-leak / port-conflict / state-corruption.
C. hero_code CLI lifecycle — ✓ + canonical pattern discovery
Important finding:
hero_code --start(usinghero_proc_factoryviaself_start()) is the canonical multi-binary registration — a SINGLE hero_proc service with multiple actions, not separate services per binary. This is whatlab service <service-name> --startshould mirror. Strengthens the case for hero_skills#254 — the fix reference ishero_code/src/main.rs::self_start()callinghero_proc_factory().restart_service(SERVICE_NAME, service, 30).- crates/hero_code/Cargo.toml: drop `serde_json = "1.0"` — no `serde_json::` references anywhere under crates/hero_code/src/. - Cargo.toml: workspace `[package.repository]` was pointing at the dead `lhumina_code/hero_code_v2` repo (leftover from a pre-rename arc). Fixed to the canonical `lhumina_code/hero_code`. D-10 §2 criterion 4 ("Cargo.toml deps audited — AI-generated cruft stripped"). Conservative pass for the first repo of the sweep — only strips deps with zero `use <crate>::` matches under `src/`. More aggressive audit deferred until the deps-first sweep order is locked. Refs: lhumina_code/hero_proc#102 Signed-off-by: mik-tf <logismos@protonmail.ch>mik-tf referenced this pull request from lhumina_code/hero_demo2026-05-16 00:33:48 +00:00