[ci] Green CI on every Hero distribution repo #188
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?
Goal
Every Hero repo that ships in the distribution has green CI on push to
developmentAND on pull-requests targetingdevelopment, so contributors get pass/fail feedback before merge and the org-wide release pipeline (home#187) can be built on a green base.Gates the release-artifacts P0 in home#187: no point adding
release.yamlto a repo whose CI doesn't even build green.Canonical technique — port the proven pattern, don't redesign
After auditing the 8 already-green repos,
hero_routeralready implements the exact distribution pattern home#187 calls for. The fix for the 20 broken/missing repos is a uniform port of that template, not bespoke debugging per repo.Two workflow files, one canonical shape
.forgejo/workflows/build.yaml— fires on push todevelopment+ every PR targetingdevelopment. NO publish.Reference:
hero_agent/.forgejo/workflows/build.yaml(82 lines, reviewed by xmonader).Steps: checkout → install Rust →
cargo fmt --check→cargo clippy -D warnings→make check→make test-unit→make build. No release upload..forgejo/workflows/release.yaml— fires on tagv*push. THIS is the artifact pipeline home#187 needs.Reference:
hero_router/.forgejo/workflows/release.yaml.Steps: checkout @ tag → install musl-dev → cross-compile to
x86_64-unknown-linux-musl(static-pie!) → strip → create Forgejo release → upload each binary in$BINARIESas<BIN>-linux-amd64-musl.Verified working in production
Statically linked → runs on any x86_64 Linux box (Alpine, Ubuntu, Debian, RHEL, TFGrid flist, bare metal). Exactly the "deploy anywhere" target.
Required repo invariants (the contract)
For the canonical workflows to work, each repo needs:
buildenv.shat root exportingBINARIES="bin1 bin2 ..."(release.yaml iterates over this)Makefilewith at minimumcheck,test(ortest-unit),buildtargetsvX.Y.Zsemver (-devsuffix until v1.0)Workflow conventions for THIS sweep
development_mik_1per repo. Same name across all repos for consistency. Don't touchdevelopmentdirectly.build.yaml; reviewers see green/red before merge.Engineering discipline — root-cause every red signal, never paper over
The whole point of green CI is that green = actually works. A green badge on a silently-disabled test is worse than a red badge — it lies. The rule is: when porting the canonical template uncovers a real failure, fix the root cause; don't loosen the check.
cargo clippy -D warningsfails-D warningsfrom the workflowcargo fmt --checkfailscargo fmtonce, commit as a separate prep commit with clear message ("style: cargo fmt") so the CI port PR stays reviewable.#[ignore]with a comment + tracker issue explaining why and when.# Reason: ...comment.x86_64-unknown-linux-gnufor that one repo and document why in the workflow header.dxCLI)Three commitments
hero_X needs follow-up #Y) than to ship a green badge on a broken repo.Always work against latest
origin/developmentheadBefore opening a sweep PR — and again before re-pushing after CI fails —
git fetch origin && git rebase origin/development. If a rebase produces conflicts, first check whether the upstream commits already fixed the bug your PR was targeting: another contributor or session may have landed a parallel fix while your branch was open. If so, abort the rebase and close the PR with a comment pointing to the upstream commit, instead of churning through conflicts on a moot diff. (Logged after hero_foundry PR #16 was superseded mid-rebase by PR #15.)Why this works without slowing us down
Current state — 29 repos audited 2026-04-25
✅ Green on
development(8):hero_skills,hero_router,hero_db,hero_browser,hero_whiteboard,hero_voice,hero_agent,hero_archipelagos.❌ Red on
development(15): see checklist below.❓ Missing CI / never fires on
development(5):hero_collab,hero_livekit,hero_logic,hero_office,hero_codescalers.Out of scope:
hero_zero(legacy docker-era — superseded byhero_demo);mycelium_network(different org —geomind_code).Per-repo work — port the canonical template
For each repo below:
developmentasdevelopment_mik_1.buildenv.shexportBINARIES? DoesMakefilehavecheck/test/build? Add or fix as needed.hero_router/hero_agent, adapt only the binaries list (sourced frombuildenv.shso often no edit needed).development_mik_1 → development→pull_requesttrigger fires → see green/red..forgejo/workflows/, not just the one that fires on the PR. Some repos have multiple workflow files (e.g.test.yaml+build-linux.yaml); a single PR run only tells you about the workflows whose triggers matchpull_request. Check every YAML file's triggers; verify each fires green on its appropriate event (push to development, PR, tag). Lesson learned from hero_proxy #26 → #27:test.yamlwent green on the PR butbuild-linux.yaml(which only fires on push, not PR) was still red post-merge.developmentare ALL green before declaring done. If multiple workflows fire on push, every one of them must be green.❌ Red — needs port (15)
hero_proc— last failed run #365 → fixed by PR #49 (9b13401); CI now green on push + PRhero_proxy— fully green: PR #26 restored Makefile (919c391); PR #27 replaced misconfigured build-linux.yaml with canonical release.yaml (797e906). Both push + PR runs green.hero_embedder— fixed by PR #19 (6a305a8); 17 clippy warnings + jsonwebtoken dev-dep +inputs: Nonefor new hero_proc_sdk pin + restricted build-linux.yaml to tag-only; CI green on push + PR.hero_os— last failed run #479hero_osis— last failed run #419hero_books— last failed run #647hero_code— last failed run #58hero_biz— last failed run #165hero_aibroker— last failed run #274hero_matrixchat— fixed by PR #3 (defde49); deleted 2 stale integration tests (orphaned by SDK refactor — 122 cumulative compile errors), 1 clippy auto-fix, cargo fmt, ported workflow to canonical Hero pattern (was using GitHub-onlyactions-rs/toolchain@v1not on Forgejo mirror). Test-coverage gap tracked at hero_matrixchat#2.hero_slides— fixed by PR #33 (2ce31c3); converted hero_lib path deps to git deps (was breaking CI because workspace assumed sibling-clone layout) + cargo fmt. Repo now buildable from any clean checkout — supports home#187 release artifacts directly.hero_indexer— fixed by PR #15 (1b0d579); 2 real?-in-closure compile errors fixed in examples + 2 clippy auto-fixes + 5 e2e tests#[ignore]'d (need live stack — tracked at hero_indexer#14) + cargo fmt. Both build.yaml + build-linux.yaml green on push.hero_lib_rhai— PARTIAL. lint.yaml green via PR #11 (e69c7b5); tests.yaml still red on every push (real failure, not coping). Tracked at hero_lib_rhai #12 + home#189. Will fully tick when integration tests are fixed.hero_foundry— green ondevelopmentatcc212d3, made green by PR #15 (separate contributor) which restructuredseed_data.rsinto the newhero_foundry_democrate, dissolving the em-dash byte-string compile error organically. Our parallel PR #16 (e21bf5b) was rendered moot mid-rebase and closed. Lesson logged below: always rebase against latestorigin/developmentbefore pushing CI fixes — when a sweep PR conflicts on rebase, check whetherdevelopmenthas already moved past the bug.hero_demo— last failed run #32❓ Missing — needs initial setup (5)
hero_collabhero_logichero_officehero_codescalershero_livekit(workflows present but never fire ondevelopment— investigate triggers)✅ Already green — verify they match the canonical pattern + add release.yaml where missing
hero_skills— post-#131 build.yaml is canonical; needsrelease.yamladded to publish artifacts (gates home#187 P0).hero_router— has both workflows; canonical reference.hero_db— has 4 workflows including release.yaml; verify they match canonical shape.hero_browser— has build + test + build-linux; needs release.yaml.hero_whiteboard— only has ci.yml; needs build.yaml + release.yaml in canonical shape.hero_voice— has build + build-linux; needs release.yaml.hero_agent— has build.yaml (canonical reference); needs release.yaml.hero_archipelagos— has build + build-release; verify build-release matches canonical release.yaml shape.Acceptance criteria
build.yamlandrelease.yamlmatching the canonical patterndevelopmentis ✅pull_requestevents targetingdevelopment(publish/release steps gated to push/tag)vX.Y.Ztag on any Hero repo produces a release with statically-linked Linux binaries as assets (verified by downloading + running)Notes
development_mik_1), so no conflicts.hero_router(canonical release.yaml) andhero_agent(canonical build.yaml).release.yamladded (verify column above) — that's part of unblocking home#187 P0 too.Related
Signed-off-by: mik-tf
makecalls work #26fatmaebrahim referenced this issue from lhumina_code/hero_rpc2026-04-27 11:01:20 +00:00
Moved to hero_demo#39 — see lhumina_code/hero_demo#39