Commit f9b67cc
committed
ci: make the stale-secrets check able to actually detect stale secrets
The job's own header claims it catches "drift between the secrets and the
working tree ... if the maintainer edited src/*.rs locally and forgot to re-pack
+ refresh the GitHub secrets". It could not. It runs on a fresh checkout where
src/* is gitignored and therefore absent, so `verify --from-env` unpacks the
secrets and compares them against themselves - self-consistent by construction,
and green no matter how old they are.
That gap is not hypothetical. A fix to src/fast_uf.rs sat local-only for over
four hours today while this job reported success on every push: the secrets were
last written at 12:46 and the edit was made at 17:04, so CI and every wheel it
would have built were compiled from source nobody was testing against.
Anchor the core's identity in something that travels with a commit. `pack` now
writes rust_core.sha256 - tracked, unlike src/* - and the new `check-manifest`
subcommand rebuilds the archive from the restored tree and compares. In CI that
runs after `unpack --from-env`, so the restored tree hashes to whatever the
secrets actually hold: if they are older than the last pack the digests differ
and the job fails with the exact commands to fix it.
Verified both directions locally: matching tree exits 0; appending one comment
line to src/fast_uf.rs makes it exit 1 with the mismatch report.
Blast radius is small on purpose - check-manifest gates nothing but this
advisory job, and release-build's publish path still keys off `verify`.1 parent 61158de commit f9b67cc
3 files changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
225 | 270 | | |
226 | 271 | | |
227 | 272 | | |
| |||
271 | 316 | | |
272 | 317 | | |
273 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
274 | 325 | | |
275 | 326 | | |
276 | 327 | | |
| |||
0 commit comments