fix(core): a pin bump should not fail a test about serialization
`a_manifest_round_trips_through_its_on_disk_form` asserted `Some("0.16.0")` against a
manifest whose tool versions `write_manifest` derives from the real ledger — so bumping the
one pin Dependabot exists to bump broke a test that is about neither ruff nor versions.
It broke on `main`, not in the PR. Dependabot opened the ruff bump on 2026-08-10 and its CI
went green there; the health module landed on 08-12. A merge whose checks predate the code
they would have caught is a shape worth naming: green on the PR is a statement about the
base it was cut from.
Now read out of `pins()`, which is where the number lives. What the test pins is that the
tools map survives the round trip — the value it carries is the ledger's business.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0c1457639a
commit
dbd362fd4d
1 file changed
+12
-1
@@ -1017,7 +1017,18 @@ mod tests {
|
||||
|
||||
let read = read_manifest(&dir).expect("written manifest is readable");
|
||||
assert_eq!(read.pins_hash, "abc");
|
||||
assert_eq!(read.tools.get("ruff").map(String::as_str), Some("0.16.0"));
|
||||
// Compared against the ledger rather than a literal. This assertion used to name
|
||||
// `0.16.0`, which made a Dependabot bump of a pin Dependabot exists to bump fail a test
|
||||
// about serialization — and it failed on `main`, because that PR's CI predates the health
|
||||
// module. What is being pinned here is that the tools map survives the round trip, not
|
||||
// which version is in it.
|
||||
let pinned = pins()
|
||||
.expect("ledger parses")
|
||||
.into_iter()
|
||||
.find(|p| p.name.to_string() == "ruff")
|
||||
.map(|p| p.version.to_string())
|
||||
.expect("the ledger pins ruff");
|
||||
assert_eq!(read.tools.get("ruff"), Some(&pinned));
|
||||
}
|
||||
|
||||
/// The camelCase spelling is the shape a future IPC surface would inherit, so pin it now —
|
||||
|
||||
Reference in new issue
Block a user