Auto-publish lab-latest binaries from CI on push-to-development #268
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#268
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
Replace the ad-hoc, currently-broken
.forgejo/workflows/build-linux.yaml(and siblings) across all hero repos with one canonical workflow that runslab build --release --platforms linux-musl-x86_64 --upload --workspace. The workflow fires on push-to-developmentand onv*tag push, populating each repo'slatestrelease on Forgejo. Once in place, every push to development means fresh binaries on Forgejo within ~5–10 min, and any VM (or new herodemo) can be brought up to date with a simplelab build <repo> --download --installloop — no human in the loop, no per-repo manuallab build --upload.Why
Today the publish flow is fully manual. The
lab build --upload/lab build --download --installpair works (validated by populating all ~20latestreleases for herodemo on 2026-05-19), but no automation fires it on push, so every release means a workstation operator running 20 builds by hand. Forgejo Actions infrastructure already exists across the org — every hero_* repo has.forgejo/workflows/build-linux.yamlor similar — but those workflows:v*tag push, never ondevelopmentpushcargo build+curl -X POSTupload, notlab build --upload(so naming + tag are inconsistent —${BIN}-x86_64-unknown-linux-muslvslab's${BIN}-linux-musl-x86_64, and upload tag is the versionv0.1.5rather thanlatest)failure. Auto-fetched verdict viaGET /api/v1/repos/lhumina_code/hero_proc/actions/runs?limit=5.Net: we have the CI surface, we have
lab, but they aren't wired together.Proposed canonical workflow
Single file, ~25 lines, lives at
.forgejo/workflows/lab-publish.yamlin every hero_* repo:That's it.
labhandles platform, naming (${BIN}-linux-musl-x86_64), thelatesttag, md5 sidecars, skip-by-fingerprint, and the policy enforcement that the old workflows didn't.Roll-out plan
hero_procfirst (already has CI surface, mature). Push todevelopment. Verify a green run lands binaries athttps://forge.ourworld.tf/lhumina_code/hero_proc/releases/tag/latest.hero_skills/scripts/— iterates over the 37 repos with existing CI:.forgejo/workflows/{build-linux,build,release,build.yml}.yaml(the broken ones)lab-publish.yamlingit add -A && git commit -m "ci: switch to lab-publish canonical workflow" && git push origin developmentlatestreleases get a green refreshhero_skills/docs/and link fromlabskill bodyGotcha 1 —
install.sh404The lab skill currently advertises
https://forge.ourworld.tf/lhumina_code/hero_skills/raw/branch/development/crates/lab/install.shas the install path. That URL returns 404 today (validated 2026-05-19; was the blocker when trying to installlabon the herodemo VM — had to scp the binary from the workstation instead).Fix: add
install.shatcrates/lab/install.shinhero_skillsondevelopment. The content already exists in the wild (was at this path historically); just needs to be restored or rewritten. Minimal version:Without this fix the proposed CI workflow's "Install lab" step also fails — same root cause.
Gotcha 2 — reusable workflows vs templated copies
Forgejo Actions supports
uses: org/repo/.forgejo/workflows/file.yaml@branchin some versions ("reusable workflows" feature, GHA-compatible).If supported on our Forgejo deployment: the canonical workflow lives in one place (
hero_skills/.forgejo/workflows/lab-publish-reusable.yaml) and every per-repo workflow shrinks to a 3-line caller:37 × 3 lines instead of 37 × 25 lines. One update to
hero_skillspropagates everywhere. No drift.If not supported: fall back to copying the 25-line YAML into each repo (still way better than today's 37 broken ad-hoc workflows). Document the templated form so updates can be re-applied across the org with a single script run.
Check first: run
forgejo --versionon the runner host, orcurl -s https://forge.ourworld.tf/api/v1/versionand cross-reference against the Forgejo changelog for reusable-workflow support (landed in Forgejo 7.x). If yes, prefer the reusable path; if no, templated copies.Definition of done
install.shlands atcrates/lab/install.shondevelopmentbranch ofhero_skills, verified bycurl -sSfL <URL> | headreturning the scriptGET /api/v1/version).forgejo/workflows/lab-publish.yaml(or reusable form) lands inhero_procondevelopment; one push-triggered green run produces fresh musl binaries atreleases/tag/latestlab build --uploadbecomes the bypass case, not the canonical caselabskill body updated with theinstall.shURL workingScope notes
lab build --download --installstep). A follow-up issue could automate "VM auto-pulls latest" via a cron or webhook receiver, but that's outside this scope.hero_zerocontainer-based deploy (different architecture, separateupdate.shflow).service.tomlvalidation already happens insidelab build; no separate CI step needed for that.hero_os/_appWASM target) are handled bylabalready — those targets just fail individually with1 failed, 4 builtand the workflow still publishes the 4 successful binaries.s127 close — post-rollout status (2026-05-19)
Workflow file landed in 31 of 35 D-07 set repos (skipped 4 special-case: hero_voice / hero_os / hero_office / mycelium_network — deferred for separate session-level decisions).
Currently green (binaries auto-publishing on every push to
development): 17 of 31 (55%).In-session bonus fix (s127 final hour):
lab buildpost-process< 512 KB"likely corrupt output" guard is now overridable viaHERO_MIN_BIN_BYTESenv var (default unchanged for local lab; canonical workflow sets0to disable). Unblocked 3 repos (hero_aibroker, hero_compute, hero_lib) that were tripping on legitimately-small Rust binaries. Landed in lab via commit777a7ec.Follow-up issue: per-repo cleanup catalogue at hero_skills#269 — 14 repos with their failure category + fix surface. Repo owners can pick up their own cleanup independently; the workflow file is already in place, so each per-repo fix lands → next push auto-goes-green.
Files shipped this session
crates/lab/install.sh(63e0ef7).forgejo/workflows/lab-publish.yaml(ad537ae→ iterations through4767f67→777a7ec)scripts/wire-lab-publish.sh(7ca5874+ fixb9f7ae0)crates/lab/src/builder/orchestrator.rsenv-overridable size guard (777a7ec)skills/lab/lab.mddrift fix (d660a96)mik-tf referenced this issue from lhumina_research/hero_demo2026-05-19 18:12:49 +00:00
mik-tf referenced this issue from lhumina_code/hero_assistance2026-05-22 13:52:24 +00:00