fix: harden invalidation registry governance

This commit is contained in:
DongHyeonka
2026-08-01 23:59:11 +09:00
parent 73a50426d6
commit 0eb23875cb
15 changed files with 906 additions and 147 deletions
+8 -15
View File
@@ -2,15 +2,13 @@ import { describe, expect, it, vi } from "vitest";
import { createContractHttpExecutor } from "../../src/adapters/http/http-execution-v3.ts";
import type { InstalledHttpContract } from "../../src/contracts/external-contract-runtime.ts";
import { COMPOSED_CONTRACT_CONTRIBUTIONS } from "../../src/features/installed-contract-contributions.ts";
import {
TEST_CREATE_HTTP_CONTRACT,
TEST_LIST_HTTP_CONTRACT,
} from "../helpers/external-contract-fixture.ts";
const installed = (() => {
const candidate = COMPOSED_CONTRACT_CONTRIBUTIONS.httpByOperationId.get(
"LIST_REFERENCE_RESOURCES",
);
if (!candidate) throw new Error("reference list contract is not installed");
return candidate;
})();
const installed: InstalledHttpContract<unknown, unknown, unknown> =
TEST_LIST_HTTP_CONTRACT;
const scope = Object.freeze({
generation: 1,
@@ -20,13 +18,8 @@ const scope = Object.freeze({
isCurrent: () => true,
});
const createInstalled = (() => {
const candidate = COMPOSED_CONTRACT_CONTRIBUTIONS.httpByOperationId.get(
"CREATE_REFERENCE_RESOURCE",
);
if (!candidate) throw new Error("reference create contract is not installed");
return candidate;
})();
const createInstalled: InstalledHttpContract<unknown, unknown, unknown> =
TEST_CREATE_HTTP_CONTRACT;
function operation(
overrides: Readonly<{