fix: accept equivalent remote runtime lock formatting

This commit is contained in:
mesalogo
2026-09-09 11:29:37 +08:00
parent e35ea7692f
commit 5782667a40
2 changed files with 17 additions and 10 deletions
@@ -102,6 +102,21 @@ describe('remote Runtime verification metadata loader', () => {
})
})
it('canonicalizes equivalent Runtime lock formatting', async () => {
const fixture = await createFixture()
await writeFile(
fixture.paths.runtimeLockPath,
JSON.stringify(runtimeLock)
)
await expect(
loadRemoteRuntimeVerificationMetadata(fixture.paths)
).resolves.toMatchObject({
runtimeLock,
canonicalRemoteRuntimeLockBytes: canonical(runtimeLock)
})
})
it.each([
{ bytes: Buffer.from('not json\n'), error: 'invalid JSON' },
{