Repository navigation
Commit 0ce888c
committed
provenance: publish canonical 40/64-hex forms via build_provenance
subc-protocol 0.17.0 validates build_git_sha as exactly 40 lowercase hex and
build_lock_digest as exactly 64. This module published 12 and 16, which is not a
shorter answer to the same question: an abbreviated sha can never compare equal
to a full one, so a fleet census reads permanent drift where there is only a
format difference. Reported against us as iceteaSA #87.
Three changes, and only the first was forced.
1. Built through build_provenance() rather than as a struct literal. The literal
still compiles, so nothing made this necessary -- it would simply have kept
publishing non-conforming forms with the validation sitting unused one call
away. On a form error the block is omitted rather than defaulted or fatal: a
build that cannot state a conforming fact says nothing, exactly as one that
could not establish the fact at all does.
2. Full sha instead of the 12-char abbreviation. health.metrics.buildCommit keeps
its short form -- it answers a skew question against a local rev-parse and is
documented as carrying a clean sha from a dirty tree, which provenance must
not.
3. Cargo.lock digest is now SHA-256 rather than DefaultHasher. The width was the
reported defect; the algorithm was the worse one. DefaultHasher is explicitly
not guaranteed stable across Rust releases, so the same lockfile could stamp
differently after a toolchain bump -- and this value exists to say whether two
builds resolved the same dependencies. A digest that changes without its input
changing answers that question wrongly while looking correct.
The test now pins 64 lowercase hex explicitly, because the constructor OMITS a
non-conforming value rather than rejecting it: a regression would publish no
digest at all, and absent is indistinguishable from never-stamped.
wire_crate_version is filled by the constructor from the linked crate, so the
local helper is gone. Its assertion stays: the value moved upstream, the claim
this module publishes did not, and a test that stops checking a published field
because a dependency computes it is trusting that dependency to keep meaning what
it meant.1 parent 2ed5a45 commit 0ce888c
4 files changed
Lines changed: 72 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
| |||
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
165 | 183 | | |
166 | | - | |
| 184 | + | |
167 | 185 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 186 | + | |
171 | 187 | | |
172 | 188 | | |
173 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
1071 | 1070 | | |
1072 | 1071 | | |
1073 | 1072 | | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
1096 | 1073 | | |
1097 | 1074 | | |
1098 | 1075 | | |
| |||
1224 | 1201 | | |
1225 | 1202 | | |
1226 | 1203 | | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1230 | 1211 | | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1235 | 1215 | | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1239 | 1220 | | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1249 | 1232 | | |
1250 | 1233 | | |
1251 | 1234 | | |
| |||
1401 | 1384 | | |
1402 | 1385 | | |
1403 | 1386 | | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1404 | 1392 | | |
1405 | | - | |
1406 | | - | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
1407 | 1398 | | |
1408 | 1399 | | |
1409 | 1400 | | |
1410 | 1401 | | |
1411 | 1402 | | |
1412 | 1403 | | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
1413 | 1409 | | |
1414 | 1410 | | |
1415 | 1411 | | |
| |||
0 commit comments