Commit 3fe3b13
fix: format debt, GitLab CI wiring, and the (never-actually-run) live-download install path (#71)
Three items from the sitrep backlog, done as five separate commits. The
last two turned into a real chain of discovery — wiring a CI job to
exercise the live-download path surfaced that `opsm runtime install`
has, as far as I can tell, **never actually completed a real install
against a real nickel binary**, for three independent reasons stacked on
top of each other.
## 1. `style: run mix format across the tree` (`ef87e0b`)
226 files were unformatted, leaving the Mustfile's `format` check
permanently red with nothing enforcing it. Pure `mix format` output, no
manual edits.
## 2. `fix(gitlab-ci): fix root-relative rules:exists paths` (`10588f8`)
Every `mix-*`/`cargo-*` job in `.gitlab-ci.yml` was permanently dormant:
`mix.exs` lives in `opsm_ex/`, and the Rust code is nine independent
first-party crates (`opsm-ui/tui`, two `opsm_ex/native` NIFs, six
`services/*`) — no root `Cargo.toml` for `rules: exists:` to ever match.
`mix-*` jobs now target `opsm_ex/`; `cargo-*` jobs loop over a
`$RUST_CRATE_DIRS` list. Verified: YAML parses, `mix format`'s own check
(now green) confirms the job would pass, `just toolchain-check` passes.
## 3–5. The live-download chain
Task was "add a `workflow_dispatch` job for the live-download tests"
(`8d0e373`). Getting a real nickel binary onto a runner to test it
locally surfaced two more bugs, both now fixed and **verified against a
real 47MB zig install**:
- **`fix(nickel): unbreak the entire runtime plugin corpus`**
(`3f67294`) — 84 of 95 `.ncl` files failed to even typecheck against the
canonical nickel 1.16.0 pinned in `opsm.toml [runtime]`. All 84 failures
traced to one shared file, two bugs: `runtime-plugin.ncl` had three
fields with `default` before `doc` in the annotation chain (nickel
1.16's grammar requires the reverse — confirmed via minimal repro), and
every plugin destructured its import as `let { RuntimePlugin, .. } =
import ...` against a module whose export is the bare contract value,
not a record — the destructuring could never match. Both are
one-line-per-field-or-file mechanical fixes. All 95 files now typecheck;
all 94 `runtime/core/*.ncl` plugins now fully `nickel export` to JSON.
- **`fix(verified-http): forward receive_timeout and :into to Req`**
(`f9b926e`) — with nickel now working, the install still failed:
`Opsm.Verified.Http.do_get/2` never forwarded `opts[:into]` to
`Req.get/2` at all, so `Manager.download_archive/1`'s
`VerifiedHttp.get(url, into: File.stream!(dest))` silently buffered the
response in memory instead of streaming to disk, returned `{:ok, _}`,
and `extract_archive/3` got handed a file that was never written. Also
found in the same function: `do_get`/`do_post` read `opts[:timeout]`,
but every call site in the codebase (~480 occurrences) passes
`receive_timeout:` — Req's actual option name — so every custom timeout
anywhere in OPSM has been silently discarded in favor of the 30s
default. Both fixed.
- **`feat(e2e): add a live-download job`** (`8d0e373`) — the actual
dispatch job: Rust toolchain (pinned 1.97.0) → `cargo install
nickel-lang-cli --version 1.16.0` (confirmed to exist at that version on
crates.io) → `mix test integration_test.exs --include external_api
--include live_download`.
## Verified (OTP 28.3.1 / Elixir 1.19.5, real `nickel-lang-cli` 1.16.0
built from source)
- `mix format --check-formatted` — clean
- `mix compile --warnings-as-errors` — clean
- Full default suite — 807/807
- `sh scripts/toolchain.sh check` — clean
- All 95 `.ncl` files nickel-typecheck; all 94 `runtime/core/*` fully
export
- **`mix test test/opsm/runtime/integration_test.exs --include
external_api --include live_download` — 15/15, 0 failures**, with a cold
cache: real download from ziglang.org, extract, `which/1`,
`current_version/1`, `remove/1`, reinstall idempotency
- `.gitlab-ci.yml` / `.github/workflows/e2e.yml` YAML parse clean
The GitLab `cargo-*` job bodies aren't runnable in this sandbox (no
GitLab remote, and installing `cargo-audit`/`cargo-deny` from crates.io
for 9 crates wasn't worth the time here) — reviewed by inspection
against the confirmed crate list and the already-working per-crate
pattern in `nif-build.yml`.
🤖 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 fee4046 commit 3fe3b13
313 files changed
Lines changed: 9400 additions & 5448 deletions
File tree
- .github/workflows
- opsm_ex
- lib/opsm
- api
- clients
- crypto
- post_quantum
- federation
- git
- har
- manifest
- network
- package
- registries
- registry_gateway
- runtime
- security
- slsa
- storage
- trust
- verified
- test
- aspect
- e2e
- integration
- opsm
- crypto
- federation
- git
- har
- integration
- live
- manifest
- network
- package
- registries
- runtime
- security
- slsa
- verified
- property
- runtime
- contract
- core
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
17 | 39 | | |
18 | 40 | | |
19 | 41 | | |
20 | 42 | | |
21 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
22 | 46 | | |
23 | 47 | | |
24 | 48 | | |
| |||
39 | 63 | | |
40 | 64 | | |
41 | 65 | | |
42 | | - | |
43 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
44 | 72 | | |
45 | 73 | | |
46 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
47 | 83 | | |
48 | 84 | | |
49 | 85 | | |
50 | 86 | | |
51 | | - | |
52 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
53 | 93 | | |
54 | 94 | | |
55 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
56 | 104 | | |
57 | 105 | | |
58 | 106 | | |
59 | 107 | | |
60 | 108 | | |
| 109 | + | |
61 | 110 | | |
62 | 111 | | |
63 | 112 | | |
64 | 113 | | |
65 | 114 | | |
66 | 115 | | |
67 | | - | |
| 116 | + | |
68 | 117 | | |
69 | 118 | | |
70 | 119 | | |
| |||
74 | 123 | | |
75 | 124 | | |
76 | 125 | | |
77 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
78 | 131 | | |
79 | 132 | | |
80 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
81 | 142 | | |
82 | 143 | | |
83 | 144 | | |
84 | 145 | | |
85 | 146 | | |
86 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
87 | 152 | | |
88 | 153 | | |
89 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
90 | 163 | | |
91 | 164 | | |
92 | 165 | | |
93 | 166 | | |
94 | 167 | | |
| 168 | + | |
95 | 169 | | |
96 | 170 | | |
97 | 171 | | |
98 | | - | |
| 172 | + | |
99 | 173 | | |
100 | 174 | | |
101 | 175 | | |
102 | 176 | | |
| 177 | + | |
103 | 178 | | |
104 | 179 | | |
105 | 180 | | |
106 | 181 | | |
107 | 182 | | |
108 | | - | |
| 183 | + | |
109 | 184 | | |
110 | 185 | | |
111 | 186 | | |
| |||
114 | 189 | | |
115 | 190 | | |
116 | 191 | | |
117 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
118 | 197 | | |
119 | 198 | | |
120 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
121 | 208 | | |
122 | 209 | | |
123 | 210 | | |
124 | 211 | | |
| 212 | + | |
125 | 213 | | |
126 | 214 | | |
127 | 215 | | |
128 | 216 | | |
129 | 217 | | |
130 | | - | |
| 218 | + | |
131 | 219 | | |
132 | 220 | | |
133 | 221 | | |
134 | 222 | | |
135 | 223 | | |
136 | 224 | | |
137 | 225 | | |
138 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
139 | 231 | | |
140 | 232 | | |
141 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
142 | 242 | | |
143 | 243 | | |
144 | 244 | | |
145 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
146 | 254 | | |
147 | 255 | | |
148 | 256 | | |
149 | 257 | | |
| 258 | + | |
150 | 259 | | |
151 | 260 | | |
152 | 261 | | |
153 | 262 | | |
154 | 263 | | |
155 | | - | |
| 264 | + | |
156 | 265 | | |
157 | 266 | | |
158 | 267 | | |
| |||
0 commit comments