repo fix #7
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_collab#7
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?
check & fix where needed this repo based on
skills
/hero_crates_best_practices_check
/hero_sockets
/hero_proc_service_selfstart
Implementation Spec for Issue #7 — repo fix
Objective
Audit and fix the
hero_collabrepository to fully comply with three HERO skills:/health,/manifest,/openrpc) on all services--start/--stopflags viahero_proc_sdkCurrent State (Findings)
Makefile$HOME/hero/var/sockets/<name>.sock— correct convention/healthand/openrpc.json; missing/manifest(uses/.well-known/heroservice.jsoninstead)--start/--stopflagsscripts/run.shRequirements
From hero_crates_best_practices_check:
Makefilewith targets:build,run,install,cleanhero_procfor process supervision (self-start pattern)From hero_sockets:
GET /health,GET /manifest,GET /openrpcover their Unix sockethero_collab_serverneeds a second HTTP axum listener (dual-socket approach to preserve backward compat with raw JSON-RPC)From hero_proc_service_selfstart:
--start/--stopas first flags inmain()--startcallshero_proc_sdkto self-register and start--stopcallshero_proc_sdkto self-deregister and stopFiles to Modify/Create
Cargo.toml(workspace)clapandhero_proc_sdkto workspace dependenciescrates/hero_collab_server/src/main.rs--start/--stopclap flags + second axum HTTP listener with/health,/manifest,/openrpccrates/hero_collab_server/Cargo.tomlclap,axum,hero_proc_sdkdepscrates/hero_collab_ui/src/main.rs--start/--stopself-start handlingcrates/hero_collab_ui/src/routes.rs/manifestroute (rename from/.well-known/heroservice.json), add/openrpcaliascrates/hero_collab_ui/Cargo.tomlhero_proc_sdkdepcrates/hero_collab_web/src/main.rs--start/--stopflags +/health,/manifest,/openrpcroutescrates/hero_collab_web/Cargo.tomlclap,hero_proc_sdkdepscrates/hero_collab_server/Makefilecrates/hero_collab_ui/Makefilecrates/hero_collab_web/MakefileImplementation Steps
Step 1 — Workspace deps: add
clapandhero_proc_sdkFiles:
Cargo.tomlDependencies: none
Step 2 — hero_collab_web: add mandatory HTTP endpoints +
--start/--stopFiles:
crates/hero_collab_web/src/main.rs,crates/hero_collab_web/Cargo.tomlDependencies: Step 1
Step 3 — hero_collab_ui: fix
/manifestroute + add/openrpcaliasFiles:
crates/hero_collab_ui/src/routes.rsDependencies: none (parallel with Step 2)
Step 4 — hero_collab_ui: add
--start/--stopself-startFiles:
crates/hero_collab_ui/src/main.rs,crates/hero_collab_ui/Cargo.tomlDependencies: Step 1
Step 5 — hero_collab_server: add
--start/--stop+ HTTP listener for mandatory endpointsFiles:
crates/hero_collab_server/src/main.rs,crates/hero_collab_server/Cargo.tomlDependencies: Step 1
Step 6 — Create per-crate Makefiles (all three)
Files:
crates/hero_collab_server/Makefile,crates/hero_collab_ui/Makefile,crates/hero_collab_web/MakefileDependencies: none (can run in parallel with Steps 2–5)
Acceptance Criteria
cargo checkpasses with no errors--startand--stopflags work on all three binariesGET /health,GET /manifest,GET /openrpcreturn valid responses for all three servicesMakefileexists withbuild,run,install,cleantargets for each binary cratemake buildandmake runstill workNotes
hero_proc_sdkmay need a path/git dependency — implementing agent must verify availabilityhero_collab_serveruses raw JSON-RPC socket; recommend dual-listener (keep existing + add HTTP axum socket) for backward compatibility$HOME/hero/var/sockets/is already correct — no changes neededscripts/run.shhandles current registration; after self-start is implemented, consider simplifying the scriptBuild Check Results
Command:
cargo checkStatus: PASSED
Date: 2026-03-20
All crates in the workspace compiled successfully with no errors or warnings.
Implementation Complete ✅
All changes from the approved spec have been implemented and
cargo checkpasses with 0 errors.Changes Made
Cargo.toml(workspace)clap = { version = "4", features = ["derive"] }as workspace dependencyhero_proc_sdk = { git = "https://forge.ourworld.tf/lhumina_code/hero_proc.git", branch = "development" }as workspace dependencycrates/hero_collab_ui/Cargo.tomlclapto{ workspace = true }hero_proc_sdk = { workspace = true }crates/hero_collab_ui/src/main.rs--startand--stopflags toArgsstructself_start()andself_stop()functions usinghero_proc_sdkArgs::parse()now happens before tracing init; self-start/stop handled before any server codecrates/hero_collab_ui/src/routes.rs/manifestroute (canonical path, alongside existing/.well-known/heroservice.json)/openrpcroute (canonical path, alongside existing/openrpc.json)crates/hero_collab_web/Cargo.tomlclap,hero_proc_sdk,anyhowworkspace dependenciescrates/hero_collab_web/src/main.rs--startand--stopclap flagsself_start()andself_stop()functions usinghero_proc_sdk/health,/manifest,/openrpcroute handlersmain()return type toanyhow::Result<()>crates/hero_collab_server/Cargo.tomlclap,axum,tower,hyper,hyper-util,hero_proc_sdkdependenciescrates/hero_collab_server/src/main.rs--startand--stopclap flagsself_start()andself_stop()functions usinghero_proc_sdkhero_collab_server_http.sock) with/health,/manifest,/openrpcendpoints served via axumNew files created:
crates/hero_collab_server/Makefile— per-crate Makefile withbuild,run,install,cleantargetscrates/hero_collab_ui/Makefile— per-crate Makefile withbuild,run,install,cleantargetscrates/hero_collab_web/Makefile— per-crate Makefile withbuild,run,install,cleantargetsBuild Results
cargo check— ✅ PASSED (0 errors, 0 warnings)Acceptance Criteria
cargo checkpasses with no errors--startand--stopflags available on all three binariesGET /health,GET /manifest,GET /openrpconhero_collab_uiandhero_collab_websocketsGET /health,GET /manifest,GET /openrpconhero_collab_server_http.sockMakefilewithbuild,run,install,cleanfor all three binary crateshero_crates_best_practices_check,hero_sockets,hero_proc_service_selfstartImplementation committed:
2eeee63Browse:
2eeee63