ci: add build-linux.yaml + close fmt/clippy debt — first release pipeline #4

Merged
mik-tf merged 2 commits from development_mik_build_linux into development 2026-05-06 21:58:06 +00:00
Owner

Summary

First CI/release pipeline for hero_planner. Bucket C item 5 of home#212.

2 commits:

  1. 33f23b6 chore: cargo fmt + close clippy too_many_arguments debtcargo fmt --all across 8 files (no PR-time gate has run before, so latent fmt debt was ~1.2k lines). Module-scope #![allow(clippy::too_many_arguments)] on crates/hero_planner_lib/src/store.rs (10 CRUD methods take 8-11 args — natural shape for the entity-CRUD module). Backfill missing args in store.rs's E2E test for cost_create (test was stale vs commit c7cd110 which added entity_type + entity_id params).

  2. 09831fd ci: add build-linux.yaml — pure-musl template mirroring lhumina_code/hero_office/.forgejo/workflows/build-linux.yaml (session 68). Single-arch x86_64-unknown-linux-musl, --workspace build (5 members, all pure-Rust, no native deps), target-triple asset naming per home#212. Triggers on tag push v* + workflow_dispatch. Two repo-specific adjustments documented in commit body: workspace build instead of -p list, explicit rustup toolchain install 1.93 for rust-toolchain.toml pin (mirrors session 66 hero_agent fix; builder image bundles 1.92).

Consumer service_planner.nu is already wired with --download + x86_64-unknown-linux-musl suffix (preemptively normalized during session 64).

Pre-merge verification

  • cargo fmt --all -- --check: clean
  • cargo clippy --workspace --all-targets --keep-going -- -D warnings: clean
  • cargo build --workspace --release --target x86_64-unknown-linux-musl: green; 3 static-pie ELF musl binaries (hero_planner 8.9MB, hero_planner_ui 3.9MB, hero_planner_web 4.0MB unstripped)

Test plan after squash-merge

  • Tag v0.1.0-rc1 on development, expect 3 assets at <bin>-x86_64-unknown-linux-musl shape on Forgejo Release
  • Heroci smoke: service planner install --download --reset lands all 3 to /root/hero/bin/, ELF verified

Out of scope

Spec drift: commit c7cd110 added kind to the snapshot crates/hero_planner_sdk/src/openrpc.client.generated.rs for RequirementCreateInput / RequirementUpdateInput, but crates/hero_planner_sdk/src/openrpc.json does not list kind in requirement.create / requirement.update params. Generated-file regeneration during clippy revealed the inconsistency. Per D-03 (no-manual-edits-to-autogen), generated files must not be hand-edited; the fix is at the spec layer (openrpc.json). The snapshot file in this PR is reverted to HEAD to keep scope tight; fixing the spec gap is a separate concern.

## Summary First CI/release pipeline for `hero_planner`. Bucket C item 5 of [home#212](https://forge.ourworld.tf/lhumina_code/home/issues/212). 2 commits: 1. **`33f23b6` chore: cargo fmt + close clippy too_many_arguments debt** — `cargo fmt --all` across 8 files (no PR-time gate has run before, so latent fmt debt was ~1.2k lines). Module-scope `#![allow(clippy::too_many_arguments)]` on `crates/hero_planner_lib/src/store.rs` (10 CRUD methods take 8-11 args — natural shape for the entity-CRUD module). Backfill missing args in store.rs's E2E test for `cost_create` (test was stale vs commit `c7cd110` which added `entity_type` + `entity_id` params). 2. **`09831fd` ci: add build-linux.yaml** — pure-musl template mirroring `lhumina_code/hero_office/.forgejo/workflows/build-linux.yaml` (session 68). Single-arch `x86_64-unknown-linux-musl`, `--workspace` build (5 members, all pure-Rust, no native deps), target-triple asset naming per home#212. Triggers on tag push `v*` + `workflow_dispatch`. Two repo-specific adjustments documented in commit body: workspace build instead of `-p` list, explicit `rustup toolchain install 1.93` for `rust-toolchain.toml` pin (mirrors session 66 hero_agent fix; builder image bundles 1.92). Consumer `service_planner.nu` is already wired with `--download` + `x86_64-unknown-linux-musl` suffix (preemptively normalized during session 64). ## Pre-merge verification - cargo fmt --all -- --check: clean - cargo clippy --workspace --all-targets --keep-going -- -D warnings: clean - cargo build --workspace --release --target x86_64-unknown-linux-musl: green; 3 static-pie ELF musl binaries (`hero_planner` 8.9MB, `hero_planner_ui` 3.9MB, `hero_planner_web` 4.0MB unstripped) ## Test plan after squash-merge - Tag `v0.1.0-rc1` on `development`, expect 3 assets at `<bin>-x86_64-unknown-linux-musl` shape on Forgejo Release - Heroci smoke: `service planner install --download --reset` lands all 3 to `/root/hero/bin/`, ELF verified ## Out of scope Spec drift: commit `c7cd110` added `kind` to the snapshot `crates/hero_planner_sdk/src/openrpc.client.generated.rs` for `RequirementCreateInput` / `RequirementUpdateInput`, but `crates/hero_planner_sdk/src/openrpc.json` does not list `kind` in `requirement.create` / `requirement.update` params. Generated-file regeneration during clippy revealed the inconsistency. Per D-03 (no-manual-edits-to-autogen), generated files must not be hand-edited; the fix is at the spec layer (openrpc.json). The snapshot file in this PR is reverted to HEAD to keep scope tight; fixing the spec gap is a separate concern.
Pre-flight hygiene closure for first CI rollout. No PR-time fmt/clippy
gate has run on this repo before, so the workspace had latent debt:

  * cargo fmt --all across hero_planner / hero_planner_lib /
    hero_planner_ui / hero_planner_web
  * #![allow(clippy::too_many_arguments)] at the top of
    crates/hero_planner_lib/src/store.rs — 10 CRUD methods take
    8-11 args (entity fields), which is the natural shape for this
    module. Per-method allow would clutter; module-scope reflects
    intent.
  * Backfill missing args in store.rs's E2E test for cost_create
    (test was stale vs commit c7cd110 which added entity_type +
    entity_id params).

Bundled with the .forgejo/workflows/build-linux.yaml port so the
first green CI run is on already-clean code.

Signed-off-by: mik-tf
First CI/release pipeline for hero_planner. Mirrors the canonical
post-home#212 pure-musl template (most recently used in
lhumina_code/hero_office/.forgejo/workflows/build-linux.yaml,
session 68): docker container ghcr.io/despiegk/builder:latest,
single-arch x86_64-unknown-linux-musl matrix, --workspace build,
target-triple asset naming (<bin>-x86_64-unknown-linux-musl) per
home#212.

Two repo-specific adjustments:

1. Workspace build (-p list omitted). All 5 workspace members are
   pure-Rust with no native-deps; --workspace is safe and follows
   playbook item 18 default.

2. Explicit toolchain pin in Setup step:
     rustup toolchain install 1.93 --profile minimal
     rustup default 1.93
   rust-toolchain.toml pins channel = "1.93", but the builder
   image bundles 1.92; same fix as session 66 hero_agent. Without
   this the build fails on edition or feature mismatches.

Triggers on tag push v* and workflow_dispatch. Publishes to both
Forgejo Releases and the generic package registry. Consumer
service_planner.nu is already wired with --download +
x86_64-unknown-linux-musl suffix (preemptively normalized during
session 64's home#212 sweep).

Closes the producer side of home#212 Bucket C item 5 once the
v0.1.0-rc1 tag lands.

Signed-off-by: mik-tf
mik-tf merged commit 13ae388ef1 into development 2026-05-06 21:58:06 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_planner!4
No description provided.