chore: hero_slides hygiene + musl cross-compile fix (fmt + clippy + reqwest-rustls) #45

Merged
mik-tf merged 3 commits from development_mik_slides_fmt into development 2026-05-04 15:41:49 +00:00
Owner

Summary

Bundled hygiene + musl fix for hero_slides — landed locally with a full workspace-gate sweep before push.

Three logically distinct commits, one PR (per "we need clean work" + runner-cycle frugality):

  1. style: cargo fmt --all — 9 files, 229+/117−, formatting only. Fixes chronic cargo fmt --check failures on development (4+ recent runs red).
  2. fix(clippy): resolve 11 lint warnings — 6 files, 116+/122−. Mostly auto-fixed via cargo clippy --fix: 8× collapsible_if, 2× redundant_closure, 1× if_same_then_else (manual fix in deck.rs).
  3. fix(hero_slides_lib): use reqwest+rustls to unblock musl cross-compile — 1-line Cargo.toml change + Cargo.lock regen (-294 net lines). Unblocks the original v0.1.0-rc1 failure at openssl-sys build script.

Why bundled

The first two commits are pre-existing chronic drift, not caused by the musl fix — but test.yaml was failing on every push and would have blocked the musl PR from showing green CI signal. Landing them separately means 3 CI cycles instead of 1, and runners are slow already.

Validation (all local before push)

✓ cargo fmt --all -- --check        (clean)
✓ cargo clippy --workspace --all-targets -- -D warnings  (no warnings)
✓ cargo build --workspace --release  (compiles)

Plus the musl fix specifically was already validated end-to-end on Forgejo Actions run #167 (workflow_dispatch of release.yaml on an earlier tip of this branch): build-linux for x86_64-unknown-linux-musl succeeded in 4 min wall-clock. The combined branch will get a fresh dispatch verification before merge.

Refs

Test plan

  • All 3 workspace gates pass locally
  • Cargo.lock no longer contains openssl-sys / openssl / native-tls
  • Musl build verified via Forgejo Actions dispatch on earlier tip of this branch
  • Re-dispatch build-linux on combined branch tip → expect green
  • After merge: tag v0.1.0-rc2, verify CI build succeeds, verify Forgejo Release shows assets
  • Smoke service_slides install --from-ci --version v0.1.0-rc2 on heroci

Signed-off-by: mik-tf

## Summary Bundled hygiene + musl fix for hero_slides — landed locally with a full workspace-gate sweep before push. Three logically distinct commits, one PR (per "we need clean work" + runner-cycle frugality): 1. **`style: cargo fmt --all`** — 9 files, 229+/117−, formatting only. Fixes chronic `cargo fmt --check` failures on `development` (4+ recent runs red). 2. **`fix(clippy): resolve 11 lint warnings`** — 6 files, 116+/122−. Mostly auto-fixed via `cargo clippy --fix`: 8× collapsible_if, 2× redundant_closure, 1× if_same_then_else (manual fix in deck.rs). 3. **`fix(hero_slides_lib): use reqwest+rustls to unblock musl cross-compile`** — 1-line Cargo.toml change + Cargo.lock regen (-294 net lines). Unblocks the original v0.1.0-rc1 failure at openssl-sys build script. ## Why bundled The first two commits are pre-existing chronic drift, not caused by the musl fix — but `test.yaml` was failing on every push and would have blocked the musl PR from showing green CI signal. Landing them separately means 3 CI cycles instead of 1, and runners are slow already. ## Validation (all local before push) ```text ✓ cargo fmt --all -- --check (clean) ✓ cargo clippy --workspace --all-targets -- -D warnings (no warnings) ✓ cargo build --workspace --release (compiles) ``` Plus the musl fix specifically was already validated end-to-end on Forgejo Actions run [#167](https://forge.ourworld.tf/lhumina_code/hero_slides/actions/runs/167) (workflow_dispatch of `release.yaml` on an earlier tip of this branch): build-linux for `x86_64-unknown-linux-musl` succeeded in 4 min wall-clock. The combined branch will get a fresh dispatch verification before merge. ## Refs - [hero_demo#54](https://forge.ourworld.tf/lhumina_code/hero_demo/issues/54) — `--from-ci` rollout, Phase 2 - [hero_slides#42](https://forge.ourworld.tf/lhumina_code/hero_slides/issues/42) — Phase 2 audit issue (cluster D) - Failed run that surfaced the musl bug: https://forge.ourworld.tf/lhumina_code/hero_slides/actions/runs/164 - Successful dispatch verification: https://forge.ourworld.tf/lhumina_code/hero_slides/actions/runs/167 - Supersedes [#44](https://forge.ourworld.tf/lhumina_code/hero_slides/pulls/44) (musl-only PR, now closed) ## Test plan - [x] All 3 workspace gates pass locally - [x] `Cargo.lock` no longer contains `openssl-sys` / `openssl` / `native-tls` - [x] Musl build verified via Forgejo Actions dispatch on earlier tip of this branch - [ ] Re-dispatch build-linux on combined branch tip → expect green - [ ] After merge: tag `v0.1.0-rc2`, verify CI build succeeds, verify Forgejo Release shows assets - [ ] Smoke `service_slides install --from-ci --version v0.1.0-rc2` on heroci Signed-off-by: mik-tf
style: cargo fmt --all (restore green test.yaml signal)
Some checks failed
Test / test (push) Failing after 2m6s
Test / test (pull_request) Failing after 1m59s
da2e0b9f4f
The repo had drifted from rustfmt — `cargo fmt --check` had been failing
on `development` for at least 4+ recent runs. Multiple contributors had
landed un-formatted commits (auto-syncs, merges from collaborator branches),
and the chronic red CI was masking real failures.

Mechanical `cargo fmt --all` pass. Touches 9 files, 229+/117- lines, all
formatting only — no behavior changes. `cargo check --workspace` passes
identically before and after.

Refs: lhumina_code/hero_demo#54

Signed-off-by: mik-tf
Mostly auto-fixed via `cargo clippy --fix`:
- 8x collapsible_if (let-chains in if conditions)
- 2x redundant_closure (.map_err(|e| HeroSlidesError::Io(e)) -> .map_err(HeroSlidesError::Io))

One manual fix in crates/hero_slides_lib/src/deck.rs:676 — collapsed the
`source_path.is_none() / !has_png` branches that returned identical `true`
into a single `||` condition.

Same chronic-drift root cause as the fmt cleanup in the previous commit:
multiple contributor branches landed without running the workspace gate.

Refs: lhumina_code/hero_demo#54

Signed-off-by: mik-tf
fix(hero_slides_lib): use reqwest+rustls to unblock musl cross-compile
All checks were successful
Test / test (push) Successful in 1m24s
Test / test (pull_request) Successful in 1m23s
e11193a7e6
The CI build for v0.1.0-rc1 (run #164, target x86_64-unknown-linux-musl)
failed at the openssl-sys build script — pkg-config can't cross-link
glibc-built OpenSSL into a musl target binary.

Root cause was hero_slides_lib's reqwest declaration leaving
default-features enabled, which pulls native-tls -> openssl-sys.
Other Hero repos (hero_proc, hero_rpc, etc.) already do this right:
default-features = false + explicit rustls-tls.

Switch hero_slides_lib's reqwest dep to match. cargo update -p reqwest
removes openssl-sys, openssl, and native-tls from Cargo.lock entirely;
adds rustls/hyper-rustls/tokio-rustls.

Verified end-to-end on Forgejo Actions run #167 (workflow_dispatch on
this branch's tip with the fmt+clippy commits below): musl build
passed in 4 min wall-clock.

Refs: lhumina_code/hero_demo#54
Refs: #42

Signed-off-by: mik-tf
mik-tf changed title from style: cargo fmt --all (restore green test.yaml signal) to chore: hero_slides hygiene + musl cross-compile fix (fmt + clippy + reqwest-rustls) 2026-05-04 15:20:37 +00:00
mik-tf merged commit 71221e148d into development 2026-05-04 15:41:49 +00:00
mik-tf deleted branch development_mik_slides_fmt 2026-05-04 15:41:49 +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_slides!45
No description provided.