mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
test: reconcile merged Runner D contracts
Track the renumbered migration, deduplicate versioned runtime request types, and register the side-panel motion token. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
bb71f4b7f7
commit
98b2a8d0b5
3 files changed
+13
-6
No files matched your search
@@ -1407,11 +1407,11 @@ describeEmbeddedPostgres("applyPendingMigrations", () => {
|
||||
);
|
||||
|
||||
it(
|
||||
"replays migration 0228 when remote agent profiles already exist",
|
||||
"replays migration 0229 when remote agent profiles already exist",
|
||||
async () => {
|
||||
const connectionString = await createTempDatabase();
|
||||
await applyPendingMigrations(connectionString);
|
||||
const hash = await migrationHash("0228_late_landau.sql");
|
||||
const hash = await migrationHash("0229_late_landau.sql");
|
||||
const sql = postgres(connectionString, { max: 1, onnotice: () => {} });
|
||||
try {
|
||||
await sql`DELETE FROM "drizzle"."__drizzle_migrations" WHERE "hash" = ${hash}`;
|
||||
|
||||
@@ -64,6 +64,7 @@ export const MOTION_TOKENS: MotionTokenDef[] = [
|
||||
{ name: "--motion-scroll-pill-enter", group: "States", kind: "time", min: 0, max: 1500, step: 10 },
|
||||
{ name: "--motion-scroll-pill-exit", group: "States", kind: "time", min: 0, max: 1500, step: 10 },
|
||||
{ name: "--motion-pane-glide", group: "States", kind: "time", min: 0, max: 1500, step: 10 },
|
||||
{ name: "--motion-side-panel-tab", group: "States", kind: "time", min: 0, max: 1000, step: 10 },
|
||||
];
|
||||
|
||||
/** Common easing presets offered by the tweak panel's easing picker. */
|
||||
|
||||
@@ -44,12 +44,18 @@ describe("Paperclip task protocol surface registry", () => {
|
||||
it("classifies both runtime request types and all issue-thread request kinds", () => {
|
||||
const requestSchema = schema("request.schema.json");
|
||||
const alternatives = Array.isArray(requestSchema.oneOf) ? requestSchema.oneOf.map(record) : [];
|
||||
const runtimeProperties = record(alternatives.find((candidate) => record(record(candidate.properties).requestKind).const === "runtime")?.properties);
|
||||
const runtimeProperties = alternatives
|
||||
.filter((candidate) => record(record(candidate.properties).requestKind).const === "runtime")
|
||||
.map((candidate) => record(candidate.properties));
|
||||
const issueProperties = record(alternatives.find((candidate) => record(record(candidate.properties).requestKind).const === "issue_thread")?.properties);
|
||||
const expected = [
|
||||
...enumStrings(record(runtimeProperties.type).enum).map((kind) => `runtime.${kind}`),
|
||||
const expected = [...new Set([
|
||||
...runtimeProperties.flatMap((properties) => {
|
||||
const type = record(properties.type);
|
||||
const kinds = typeof type.const === "string" ? [type.const] : enumStrings(type.enum);
|
||||
return kinds.map((kind) => `runtime.${kind}`);
|
||||
}),
|
||||
...enumStrings(record(issueProperties.kind).enum).map((kind) => `issue_thread.${kind}`),
|
||||
].sort();
|
||||
])].sort();
|
||||
expect(Object.keys(TASK_PROTOCOL_REQUEST_SURFACE_REGISTRY).sort()).toEqual(expected);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user