Commit 3409fa1
fix(rust-ci): make the newly-wired GitLab cargo jobs actually pass (#74)
Follow-up to #71, closing the gap I flagged there: the GitLab `cargo-*`
jobs were "reviewed by inspection, not runnable in the sandbox." I have
a working Rust toolchain here, so I actually ran all nine first-party
crates through `cargo build`/`test`/`fmt`. Result: **8 of 9 build clean
once fixed, 1 is a known-optional non-builder**. Three commits:
## 1. `fix(selur): add missing tokio AsyncReadExt import` (`02ff456`)
`services/selur` has **never compiled**. `sign_image` had a
function-local `use tokio::io::AsyncReadExt;`, but `generate_keypair` (a
second call site) also does `file.take(..).read_to_string(..)` without
the trait in scope — so `.take()` resolved to `Iterator::take` on
`tokio::fs::File` and failed (`E0599`/`E0282`). The dormant GitLab jobs
never caught it, and `nif-build.yml` doesn't cover `services/`. Hoisted
the import to module scope, dropped the redundant local one, removed
`mut` from two read-only bindings. `cargo build --release` + `cargo
test` pass.
## 2. `style(rust): cargo fmt all first-party crates` (`1d743b2`)
The `rustfmt` job (not `allow_failure`) runs `cargo fmt -- --check` per
crate; all 8 failed because the code was never fmt-checked while the job
was dormant — same story as the `mix format` sweep in #71, for Rust.
Pure `cargo fmt` output, no logic changes.
## 3. `fix(gitlab-ci): quarantine the non-building quic_transport NIF`
(`89a4c1b`)
`opsm_ex/native/quic_transport` does **not** compile: pinned `h3 0.0.6`
/ `h3-quinn 0.0.7` predate `quinn 0.11`'s now-private `StreamId` field,
and with no committed `Cargo.lock` the fresh resolve breaks. It's an
**optional** QUIC/HTTP3 NIF — `Opsm.Transport.QuicNif` swallows a failed
`:erlang.load_nif` and falls back to HTTP/2 (`nif_loaded?` is hard-coded
`false`), so the Elixir side (807 tests) runs fine without it, and no CI
builds it today. Rather than sink a full pre-1.0 `h3`-ecosystem
migration into optional aspirational code, I removed it from
`$RUST_CRATE_DIRS` and the `rules:`/artifacts lists, with a
`QUARANTINED` header note stating the un-quarantine condition (migrate
the `h3`/`h3-quinn`/`quinn` triple to a compatible set + commit a
lockfile). **Flagged as a follow-up decision for you** — see below.
## Verified (real Rust 1.9x toolchain, this environment)
- All 8 kept crates: `cargo build --release` ✓, `cargo fmt -- --check`
✓; `checky-monkey` tests 4/4, others build clean (0 tests defined)
- `.gitlab-ci.yml` parses; only 2 `quic_transport` mentions remain (both
the header note)
- `just toolchain-check` ✓
## For your call (not done here)
- **quic_transport migration**: the `h3` crate is pre-1.0 and churns
hard (`recv_data` now returns `impl Buf`, send-side API changes, etc.) —
a real migration, not a version bump. Worth doing only if QUIC/HTTP3
transport is on the near-term roadmap; otherwise the quarantine + HTTP/2
fallback is the honest steady state.
- The `cargo-audit`/`cargo-deny` job *bodies* still aren't exercised
here (installing those tools from crates.io for 8 crates wasn't worth
the sandbox time); the build/test/fmt jobs are now genuinely verified.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6bc77f3 commit 3409fa1
10 files changed
Lines changed: 628 additions & 267 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
| |||
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
| 39 | + | |
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
32 | | - | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| |||
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
76 | | - | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| |||
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
97 | | - | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
135 | | - | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
| |||
153 | 160 | | |
154 | 161 | | |
155 | 162 | | |
156 | | - | |
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
| |||
198 | 204 | | |
199 | 205 | | |
200 | 206 | | |
201 | | - | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
| |||
232 | 237 | | |
233 | 238 | | |
234 | 239 | | |
235 | | - | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
244 | 248 | | |
245 | 249 | | |
246 | 250 | | |
247 | | - | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
| |||
0 commit comments