Expose repo: Option<String> on ServiceSpec so consumers can resolve service → source repo #120
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_proc#120
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?
Background
We're building hero_cockpit#1 — a per-user control surface that includes a one-click "Upgrade" button per service. The implementation in s138 shells out to
lab build <repo> --download --installand then callshero_proc service.restart.The problem
To build the
lab buildargv, the cockpit needs to know which Forgejo repo owns each service binary. Todayhero_proc_sdk'sServiceConfig/ServiceSpecdoes not expose that information — we knowname,actions,sockets,tags, etc., but not the source repo path.We worked around this by hard-coding a static
service_name → repo_namemap atcrates/hero_cockpit_server/src/repos.rs(26 services across our demo set). This duplicates knowledge that hero_proc already implicitly has via itsservice.tomlingest path, and it must be maintained in lockstep with the demo service set.Proposed change
Add an optional
repofield onServiceSpec:Populated from a corresponding optional
repo = "<owner>/<name>"top-level key inservice.toml.Noneis fine for legacy services; cockpit's static map can be the fallback path.Acceptance criteria
service.tomlschema documentsrepoas optional top-level string (<owner>/<name>or just<name>).ServiceSpec.repois wired throughservice.list_full's response so SDK consumers can read it.repokey still parse and load.Out of scope
Cross-link
8ecce62(s138 — A6 upgrade flow).ServiceSpec.repo.is_none()cases.