fix(ci): green CI — delete stale integration tests + clippy + cargo fmt #3

Closed
mik-tf wants to merge 2 commits from development_mik_1 into development
Owner

Fifth repo in the home#188 CI sweep.

What was red

The single CI workflow .forgejo/workflows/ci.yml chains: cargo fmt --checkcargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo test --workspace --lib --bins. Three of those four were failing.

  • fmt-check — pre-existing format drift in 7 source files
  • clippy — 122 cumulative errors:
    • 114 from crates/hero_matrixchat_sdk/tests/integration_test.rs — references hero_matrixchat_sdk::MatrixClient which no longer exists (the SDK was refactored to be the OpenRPC client HeroMatrixchatServerClient)
    • 8 from crates/hero_matrixchat_examples/tests/integration.rs — uses MatrixChatClient::new(&path) (no such constructor) and client.health() with no args (now requires HealthInput { profile: None })
    • 1 collapsible_if in hero_matrixchat_server/src/profile.rs (real lint, auto-fixable)
  • test — was actually green; the test runner can't run integration tests in CI (need live hero_matrixchat binary + Matrix server)

Fix

Deleted two stale integration test files

Both files referenced types/methods orphaned by an SDK refactor. They didn't compile. Their deletion does not remove working test coverage — they were already broken.

  • crates/hero_matrixchat_sdk/tests/integration_test.rs (~114 cascading errors from missing MatrixClient import)
  • crates/hero_matrixchat_examples/tests/integration.rs (uses MatrixChatClient::new which doesn't exist, plus tries to spawn a live hero_matrixchat binary that CI doesn't have)

Auto-fix collapsible_if

One cargo clippy --fix-able issue in hero_matrixchat_server/src/profile.rs:30.

cargo fmt --all

Pre-existing format drift across 7 files. Folded in because ci.yml's first step is cargo fmt --check.

What this PR does NOT do

The repo has zero working tests after this cleanup. That gap is genuinely real (the deleted files weren't testing anything — they didn't even compile). Filed follow-up at hero_matrixchat#2 — SDK unit tests + SDK round-trip tests (mock server) + #[ignore]'d E2E tests.

Local verification

cargo fmt --all --check                                ✓
cargo check --workspace                                ✓
cargo clippy --workspace --all-targets -- -D warnings  ✓
cargo test --workspace --lib --bins                    ✓  (0 tests, no failures)

Discipline confirmation

Per home#188 §Engineering discipline:

  • Real fixes for clippy + fmt
  • Deletes are honest cleanup of broken code, not coping (they didn't compile, were orphaned by past API refactor)
  • Filed follow-up issue for the genuine gap (zero real tests)
  • Did NOT silently #[ignore] broken tests (they don't compile)
  • Did NOT preserve broken files with #[allow(...)] (orphaned, not preserved-for-future)

Tracker: home#188 · Follow-up: hero_matrixchat#2

Signed-off-by: mik-tf

Fifth repo in the [home#188](https://forge.ourworld.tf/lhumina_code/home/issues/188) CI sweep. ## What was red The single CI workflow `.forgejo/workflows/ci.yml` chains: `cargo fmt --check` → `cargo check --workspace` → `cargo clippy --workspace --all-targets -- -D warnings` → `cargo test --workspace --lib --bins`. Three of those four were failing. - **fmt-check** — pre-existing format drift in 7 source files - **clippy** — 122 cumulative errors: - 114 from `crates/hero_matrixchat_sdk/tests/integration_test.rs` — references `hero_matrixchat_sdk::MatrixClient` which no longer exists (the SDK was refactored to be the OpenRPC client `HeroMatrixchatServerClient`) - 8 from `crates/hero_matrixchat_examples/tests/integration.rs` — uses `MatrixChatClient::new(&path)` (no such constructor) and `client.health()` with no args (now requires `HealthInput { profile: None }`) - 1 collapsible_if in `hero_matrixchat_server/src/profile.rs` (real lint, auto-fixable) - **test** — was actually green; the test runner can't run integration tests in CI (need live `hero_matrixchat` binary + Matrix server) ## Fix ### Deleted two stale integration test files Both files referenced types/methods orphaned by an SDK refactor. They didn't compile. Their deletion does **not** remove working test coverage — they were already broken. - `crates/hero_matrixchat_sdk/tests/integration_test.rs` (~114 cascading errors from missing `MatrixClient` import) - `crates/hero_matrixchat_examples/tests/integration.rs` (uses `MatrixChatClient::new` which doesn't exist, plus tries to spawn a live `hero_matrixchat` binary that CI doesn't have) ### Auto-fix collapsible_if One `cargo clippy --fix`-able issue in `hero_matrixchat_server/src/profile.rs:30`. ### `cargo fmt --all` Pre-existing format drift across 7 files. Folded in because `ci.yml`'s first step is `cargo fmt --check`. ## What this PR does NOT do **The repo has zero working tests after this cleanup.** That gap is genuinely real (the deleted files weren't testing anything — they didn't even compile). Filed follow-up at [hero_matrixchat#2](https://forge.ourworld.tf/lhumina_code/hero_matrixchat/issues/2) — SDK unit tests + SDK round-trip tests (mock server) + `#[ignore]`'d E2E tests. ## Local verification ``` cargo fmt --all --check ✓ cargo check --workspace ✓ cargo clippy --workspace --all-targets -- -D warnings ✓ cargo test --workspace --lib --bins ✓ (0 tests, no failures) ``` ## Discipline confirmation Per [home#188 §Engineering discipline](https://forge.ourworld.tf/lhumina_code/home/issues/188): - ✅ Real fixes for clippy + fmt - ✅ Deletes are honest cleanup of broken code, not coping (they didn't compile, were orphaned by past API refactor) - ✅ Filed follow-up issue for the genuine gap (zero real tests) - ❌ Did NOT silently `#[ignore]` broken tests (they don't compile) - ❌ Did NOT preserve broken files with `#[allow(...)]` (orphaned, not preserved-for-future) Tracker: [home#188](https://forge.ourworld.tf/lhumina_code/home/issues/188) · Follow-up: [hero_matrixchat#2](https://forge.ourworld.tf/lhumina_code/hero_matrixchat/issues/2) Signed-off-by: mik-tf
fix(ci): green CI — delete stale integration tests + collapse if + cargo fmt
Some checks failed
CI / build (pull_request) Failing after 1s
5dd2254c9a
CI workflow `.forgejo/workflows/ci.yml` runs cargo fmt --check, cargo
check, cargo clippy --all-targets -- -D warnings, and cargo test.  Fmt
was failing on pre-existing format drift; clippy was failing with 122
cumulative errors; tests... weren't really tests.

## Stale integration tests deleted

Two integration test files referenced types/methods that no longer
exist in the SDK after a refactor (HeroMatrixchatServerClient
replaced the old MatrixClient direct-Matrix-protocol client):

- `crates/hero_matrixchat_sdk/tests/integration_test.rs` — used
  `hero_matrixchat_sdk::MatrixClient`, which doesn't exist; cascaded
  into ~114 compile errors.
- `crates/hero_matrixchat_examples/tests/integration.rs` — used
  `MatrixChatClient::new(&path)` (no such constructor) and
  `client.health()` with no args (now requires HealthInput); 8
  cascading errors.  Also tried to spawn a live `hero_matrixchat`
  binary via `Command::new(...).arg("--start")`, which CI's runner
  doesn't have anyway.

Both deletes do NOT remove working test coverage — they remove dead
code that was already broken at compile time.  The repo has zero
real tests today; tracked separately.

## clippy fix (1)

`crates/hero_matrixchat_server/src/profile.rs:30` — collapsible_if
auto-fixed by `cargo clippy --fix`.

## cargo fmt across workspace

Pre-existing format drift in the bin / sdk / server crates.  Folded
in here because ci.yml's first step is `cargo fmt --check`.

## Local verification

```
cargo fmt --all --check  ✓
cargo check --workspace  ✓
cargo clippy --workspace --all-targets -- -D warnings  ✓
cargo test --workspace --lib --bins  ✓ (0 tests — see follow-up)
```

## Out of scope (intentional, separate follow-up)

The repo has **zero working tests** after this cleanup.  Tracked at
#2 —
SDK unit tests + SDK round-trip tests (mock server) + #[ignore]'d
E2E tests against the live stack.  Adding these is real test-design
work; out of scope for "make CI go green via canonical port".

Per home#188 engineering discipline:
-  Diagnosed root cause for every error (stale API references,
  not a runtime/CI issue)
-  Deletes are honest cleanup of code that was already broken,
  not coping
-  Filed follow-up issue for the real gap (no tests)
-  Did NOT silently `#[ignore]` the broken tests (they don't
  even compile)
-  Did NOT preserve the broken files with `#[allow(...)]` —
  they're orphaned from a past architecture

Fifth repo in the home#188 CI sweep.

Tracker: lhumina_code/home#188

Signed-off-by: mik-tf
Author
Owner

PR #3 first CI run hit an infrastructure issue not a code issue. Pushed fc4d0c9 to fix.

Root cause: previous ci.yml used GitHub-Actions-only conventions:

runs-on: ubuntu-latest
uses: actions-rs/toolchain@v1

Forgejo's code.forgejo.org action mirror doesn't have actions-rs/toolchain, so the runner died at the toolchain-install step:

unable to clone 'https://code.forgejo.org/actions-rs/toolchain'
fatal: repository '...' not found: exit status 128

Fix: ported to the canonical Hero pattern (proven on hero_agent + hero_router):

  • runs-on: docker + container: image: ghcr.io/despiegk/builder:latest
  • Install rust via the image's preinstalled rustup (uses whatever stable the image ships)
  • No actions-rs / GitHub-only dependencies

Same enforcement (fmt-check, cargo check, clippy -D warnings, cargo test), different runner shape.

This is an additional commit ON TOP of the test-deletion + clippy + fmt fixes — they were correct, the runner just couldn't get to executing them. Re-running CI now.

PR #3 first CI run hit an infrastructure issue not a code issue. Pushed `fc4d0c9` to fix. **Root cause:** previous `ci.yml` used GitHub-Actions-only conventions: ```yaml runs-on: ubuntu-latest uses: actions-rs/toolchain@v1 ``` Forgejo's `code.forgejo.org` action mirror doesn't have `actions-rs/toolchain`, so the runner died at the toolchain-install step: ``` unable to clone 'https://code.forgejo.org/actions-rs/toolchain' fatal: repository '...' not found: exit status 128 ``` **Fix:** ported to the canonical Hero pattern (proven on hero_agent + hero_router): - `runs-on: docker` + `container: image: ghcr.io/despiegk/builder:latest` - Install rust via the image's preinstalled rustup (uses whatever stable the image ships) - No `actions-rs` / GitHub-only dependencies Same enforcement (fmt-check, cargo check, clippy `-D warnings`, cargo test), different runner shape. This is an additional commit ON TOP of the test-deletion + clippy + fmt fixes — they were correct, the runner just couldn't get to executing them. Re-running CI now.
fix(ci): port ci.yml to canonical Hero pattern (docker runner + builder image)
All checks were successful
CI / build (pull_request) Successful in 53s
fc4d0c9cc2
PR #3 first run failed at infrastructure level — not a code problem.
The previous workflow used GitHub-Actions-only conventions:

  runs-on: ubuntu-latest
  uses: actions-rs/toolchain@v1

Forgejo's `code.forgejo.org` mirror doesn't have `actions-rs/toolchain`,
so the runner died at "Install Rust toolchain" step:

  unable to clone 'https://code.forgejo.org/actions-rs/toolchain'
  fatal: repository '...' not found: exit status 128

Ported to the canonical Hero pattern (already proven in hero_agent and
hero_router):
- runs-on: docker
- container: image: ghcr.io/despiegk/builder:latest
- Install rust via the image's preinstalled rustup (rustup default
  stable → uses whatever the image ships)
- No actions-rs / GitHub-only dependencies
- Single `Setup toolchain` step replaces both `Install Rust toolchain`
  and `Cache cargo registry` steps (the builder image handles caching)

Steps preserved: fmt-check, cargo check, clippy -D warnings, cargo
test. Same enforcement, different runner shape.

Tracker: lhumina_code/home#188
mik-tf closed this pull request 2026-04-26 01:34:34 +00:00
Author
Owner

Squash-merged to development as defde49. Branch deleted. Two real fixes: stale-test cleanup + canonical workflow port. Test-coverage gap tracked at #2.

Squash-merged to `development` as [`defde49`](https://forge.ourworld.tf/lhumina_code/hero_matrixchat/commit/defde49). Branch deleted. Two real fixes: stale-test cleanup + canonical workflow port. Test-coverage gap tracked at [#2](https://forge.ourworld.tf/lhumina_code/hero_matrixchat/issues/2).
All checks were successful
CI / build (pull_request) Successful in 53s

Pull request closed

Sign in to join this conversation.
No reviewers
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_matrixchat!3
No description provided.