Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions src/core/enums.lockstep.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ import {
RETENTION_CLASSES,
TEMPORAL_CLASSES,
} from "./enums.js";
import { MemoryEdgeRelSchema, MemoryEdgeRefTypeSchema } from "./schemas/entity-edge.js";
import {
LineageClassSchema,
ProvenanceModeSchema,
RetentionClassSchema,
TemporalClassSchema,
} from "./schemas/document.js";
import { type } from "arktype";

const MIGRATIONS_DIR = join(import.meta.dir, "../../migrations");

Expand Down Expand Up @@ -65,27 +57,3 @@ describe("enum lockstep: TS constants match migration CHECK constraints", () =>
expect(sorted(lastCheckInList(sql, constraint))).toEqual(sorted(values));
});
});

describe("enum lockstep: arktype accepts every SSOT value and rejects unknown", () => {
// "produced_by" is in neither the rel set nor the ref-type sets, so it is
// a safe unknown-value probe for both schemas.
it.each([
["MemoryEdgeRelSchema", MemoryEdgeRelSchema, EDGE_RELS, "produced_by"],
[
"MemoryEdgeRefTypeSchema",
MemoryEdgeRefTypeSchema,
["document", "version", "chunk", "entity", "native"],
"produced_by",
],
["LineageClassSchema", LineageClassSchema, LINEAGE_CLASSES, "thread"],
["ProvenanceModeSchema", ProvenanceModeSchema, PROVENANCE_MODES, "guessed"],
["TemporalClassSchema", TemporalClassSchema, TEMPORAL_CLASSES, "forecast"],
["RetentionClassSchema", RetentionClassSchema, RETENTION_CLASSES, "forever"],
] as const)("%s accepts its SSOT values and rejects unknown", (_name, schema, valid, invalid) => {
for (const value of valid) {
const out = schema(value);
expect(out instanceof type.errors ? out.summary : out).toBe(value);
}
expect(schema(invalid) instanceof type.errors).toBe(true);
});
});
56 changes: 0 additions & 56 deletions src/core/schemas/adapted-document.test.ts

This file was deleted.

45 changes: 0 additions & 45 deletions src/core/schemas/chunk.test.ts

This file was deleted.

93 changes: 0 additions & 93 deletions src/core/schemas/claim-bearing.test.ts

This file was deleted.

91 changes: 0 additions & 91 deletions src/core/schemas/document.test.ts

This file was deleted.

Loading
Loading