test(memory): keep Phase 0 inventory test-only

This commit is contained in:
Galin Iliev
2026-08-09 22:30:55 -07:00
parent 35d22eb476
commit a960a193d4
5 changed files with 22 additions and 21 deletions
@@ -422,6 +422,7 @@ function collectCoreSourceFiles(): string[] {
normalizedFullPath.includes(".test-utils.") ||
normalizedFullPath.includes(".test-harness.") ||
normalizedFullPath.includes(".test-helpers.") ||
normalizedFullPath.includes(".test-support.") ||
entryName.endsWith("-test-helpers.ts") ||
entryName === "test-manager-helpers.ts" ||
normalizedFullPath.includes(".mock-harness.") ||
@@ -268,28 +268,28 @@ describe("memory authorization SDK contract", () => {
runtime.readAuthorized({ context: deriveContext, plan, handle }),
);
// @ts-expect-error retrieve only permits broker-internal candidate selection.
void runtime.searchAuthorized({
// @ts-expect-error retrieve only permits broker-internal candidate selection.
context: retrieveContext,
plan: retrievePlan,
plan: derivePlan,
query: "query",
limit: 1,
});
// @ts-expect-error retrieve only permits broker-internal candidate selection.
void runtime.readAuthorized({ context: retrieveContext, plan: retrievePlan, handle });
// @ts-expect-error the context and plan must name the same content operation.
void runtime.searchAuthorized({
context: readContext,
plan: derivePlan,
context: deriveContext,
// @ts-expect-error the context and plan must name the same content operation.
plan: readPlan,
query: "query",
limit: 1,
});
const retrievePlanFromAuthorize = runtime.authorize(retrieveContext);
void retrievePlanFromAuthorize.then((plan) => {
// @ts-expect-error retrieve only permits broker-internal candidate selection.
return runtime.searchAuthorized({
context: retrieveContext,
context: deriveContext,
// @ts-expect-error retrieve only permits broker-internal candidate selection.
plan,
query: "query",
limit: 1,
@@ -344,10 +344,10 @@ describe("memory authorization SDK contract", () => {
);
void runtime.statusAuthorized({ context: statusContext, plan: statusPlan });
// @ts-expect-error retrieve may select candidates only inside the broker.
void runtime.writeAuthorized({
// @ts-expect-error retrieve may select candidates only inside the broker.
context: retrieveContext,
plan: retrievePlan,
plan: appendPlan,
mutation: appendMutation,
});
// @ts-expect-error the mutation kind must match the context and plan operation.
@@ -356,18 +356,18 @@ describe("memory authorization SDK contract", () => {
plan: appendPlan,
mutation: importMutation,
});
// @ts-expect-error retrieve may not invoke an import action.
void runtime.importAuthorized({
// @ts-expect-error retrieve may not invoke an import action.
context: retrieveContext,
plan: retrievePlan,
plan: importPlan,
mutation: importMutation,
});
// @ts-expect-error retrieve may not invoke a sync action.
void runtime.syncAuthorized({ context: retrieveContext, plan: retrievePlan });
// @ts-expect-error retrieve may not produce a content-bearing export payload.
void runtime.exportAuthorized({
// @ts-expect-error retrieve may not produce a content-bearing export payload.
context: retrieveContext,
plan: retrievePlan,
plan: exportPlan,
handles: [handle],
});
// @ts-expect-error retrieve may not invoke a status action.
@@ -1,4 +1,4 @@
/** Phase-0 inventory of every known path that can ingest, expose, or derive memory. */
/** Test-only Phase-0 inventory of every known path that can ingest, expose, or derive memory. */
export const MEMORY_AUTHORIZATION_PATH_DISPOSITIONS = [
"authorized",
"blocked-in-enforced-mode",
@@ -8,7 +8,7 @@ import {
MEMORY_AUTHORIZATION_PATH_DISPOSITIONS,
MEMORY_AUTHORIZATION_PATH_INVENTORY,
type MemoryAuthorizationPathInventoryEntry,
} from "./memory-authorization-path-inventory.js";
} from "./memory-authorization-path-inventory.test-support.js";
const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
@@ -78,15 +78,15 @@ describe("type suppression inventory", () => {
"src/infra/kysely-sync.types.test.ts:61:@ts-expect-error Kysely checks order references and selected aliases.",
"src/plugin-sdk/plugin-entry.reply-trigger.test.ts:8:@ts-expect-error Trigger eligibility is only supported for before_agent_reply.",
"src/plugin-sdk/plugin-entry.reply-trigger.test.ts:10:@ts-expect-error An empty trigger list cannot prove that a hook is inactive.",
"src/plugins/contracts/memory-authorization.contract.test.ts:271:@ts-expect-error retrieve only permits broker-internal candidate selection.",
"src/plugins/contracts/memory-authorization.contract.test.ts:273:@ts-expect-error retrieve only permits broker-internal candidate selection.",
"src/plugins/contracts/memory-authorization.contract.test.ts:278:@ts-expect-error retrieve only permits broker-internal candidate selection.",
"src/plugins/contracts/memory-authorization.contract.test.ts:280:@ts-expect-error the context and plan must name the same content operation.",
"src/plugins/contracts/memory-authorization.contract.test.ts:290:@ts-expect-error retrieve only permits broker-internal candidate selection.",
"src/plugins/contracts/memory-authorization.contract.test.ts:347:@ts-expect-error retrieve may select candidates only inside the broker.",
"src/plugins/contracts/memory-authorization.contract.test.ts:283:@ts-expect-error the context and plan must name the same content operation.",
"src/plugins/contracts/memory-authorization.contract.test.ts:293:@ts-expect-error retrieve only permits broker-internal candidate selection.",
"src/plugins/contracts/memory-authorization.contract.test.ts:349:@ts-expect-error retrieve may select candidates only inside the broker.",
"src/plugins/contracts/memory-authorization.contract.test.ts:353:@ts-expect-error the mutation kind must match the context and plan operation.",
"src/plugins/contracts/memory-authorization.contract.test.ts:359:@ts-expect-error retrieve may not invoke an import action.",
"src/plugins/contracts/memory-authorization.contract.test.ts:361:@ts-expect-error retrieve may not invoke an import action.",
"src/plugins/contracts/memory-authorization.contract.test.ts:365:@ts-expect-error retrieve may not invoke a sync action.",
"src/plugins/contracts/memory-authorization.contract.test.ts:367:@ts-expect-error retrieve may not produce a content-bearing export payload.",
"src/plugins/contracts/memory-authorization.contract.test.ts:369:@ts-expect-error retrieve may not produce a content-bearing export payload.",
"src/plugins/contracts/memory-authorization.contract.test.ts:373:@ts-expect-error retrieve may not invoke a status action.",
]);
});