Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(scripts): include expected tree hash in parity error

Steven Enamakelc697a47395c3
diff --git a/scripts/lib/module-pins.mjs b/scripts/lib/module-pins.mjs
index e7211c0300..eeb7c6d37a 100644
--- a/scripts/lib/module-pins.mjs
+++ b/scripts/lib/module-pins.mjs
@@ -254,7 +254,7 @@ export function validateTestOnlySourceParity({
.sort().join(""));
const releaseTreeHash = treeHash(releaseEntries);
const candidateTreeHash = treeHash(candidateEntries);
- if (releaseTreeHash !== proof.unchangedTreeSha256 || candidateTreeHash !== proof.unchangedTreeSha256) throw new Error(`other source, manifest, lock, build input, or gitlink differs from the release tree (${releaseTreeHash}/${candidateTreeHash})`);
+ if (releaseTreeHash !== proof.unchangedTreeSha256 || candidateTreeHash !== proof.unchangedTreeSha256) throw new Error(`other source, manifest, lock, build input, or gitlink differs from the release tree (${releaseTreeHash}/${candidateTreeHash} expected ${proof.unchangedTreeSha256})`);
const binding = proof.binding;
if (!binding || Object.keys(binding).sort().join(",") !== "moduleBlob,modulePath,testPath" || !/^[0-9a-f]{40}$/.test(binding.moduleBlob)) throw new Error("module binding proof is malformed");