fix: enforce optional manifest fields

This commit is contained in:
golem
2026-08-21 03:00:23 -06:00
parent c6bf8a683f
commit 54c893fdb7
4 changed files with 73 additions and 1 deletions
+13
View File
@@ -56,6 +56,19 @@ test("finalizer confirms a nested public actor manifest and preserves omitted Ba
});
});
test("finalizer accepts an Anvil manifest with omitted optional rpcUrl and preserves its absence", async () => {
await withFixture(async (root) => {
const pending = manifest({ deploymentBlock: 0 });
delete pending.rpcUrl;
await writeJson(join(root, "deployments", "pending.json"), pending);
await writeBroadcast(root, pending);
const output = await finalizeDeployment({ root, rpc: fakeRpc() });
assert.equal(Object.hasOwn(output.manifest, "rpcUrl"), false);
assert.equal(Object.hasOwn(await readJson(output.path), "rpcUrl"), false);
});
});
test("validator rejects the legacy parallel actor and explorer schema", () => {
assert.throws(
() => validateManifest(legacyManifest()),