lab download paths hard-code release tag "latest" but CI publishes latest-<branch> #321
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_skills#321
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?
Summary
lab's Forge download paths hard-code the release tag"latest", but thecanonical release CI (
lab-release.yaml, onmainof the hero_* repos)publishes per-branch tags:
latest-main,latest-development,latest-integration. As a result,lab service <repo> --downloadandlab build --downloadquery a release tag that those repos never produce, soprefetch fails to find any platform assets.
Where the tag is hard-coded
All three sites in
crates/lab/src/service/acquire.rs(onmain):acquire.rs:285—forge_prefetch_repo()→download_release_assets_for_labels(..., "latest", ...)acquire.rs:385—fetch_remote_asset_text(..., "latest", ...)(the.md5cache probe)acquire.rs:433—download_release_assets(..., "latest", ...)(thelab build --downloadpath)These resolve to
GET /api/v1/repos/{owner}/{repo}/releases/tags/latest(
crates/lab/src/repo/releases.rs:270), i.e. a tag literally namedlatest.What the release CI actually publishes
.forgejo/workflows/lab-release.yaml(canonical, present onmainof e.g.hero_planner) sets:So a push to
maincreates/updateslatest-main, neverlatest.Impact
lab service <repo> --download/lab build --downloadagainst any repousing
lab-release.yamldies with "no platform assets found" — the taglatestdoes not exist.lab install lab(scripts/lab_install.sh) is unaffected: it queriesthe
/releases/latestendpoint (latest non-prerelease, by asset name), nota tag named
latest, solatest-main(prerelease=false) is returnedcorrectly. The bug is specific to the tag-name lookups above.
Suggested fix
Make the download tag branch-aware instead of a constant. Options:
latest-<channel>where<channel>defaults tomainand is overridable (e.g.
--channelflag /HERO_RELEASE_CHANNELenv),mirroring how the CI derives
latest-${ref_name}.latest, thenlatest-main, then the/releases/latestendpoint.
Option 1 is preferred — it matches the publish convention exactly and is
explicit about which channel a download pulls from.
Notes
mainproduces a release consumable bylabdownload subcommands. The hero_skills ownlab-publish.yamlstill usesthe bare
latesttag, so its own binaries happen to match; the mismatchsurfaces for repos migrated to
lab-release.yaml'slatest-<branch>scheme.