mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-06 14:02:36 +01:00
Add the Kimi lifecycle and recovery qualification harness. Preserve original grades and cleanup evidence, strict native ownership audits, bounded startup and cleanup, and early rejection of unsupported local fault execution before credentials or resources. Co-Authored-By: Paperclip <noreply@paperclip.ing>
22 lines
989 B
TypeScript
22 lines
989 B
TypeScript
import { expect, type Page } from "@playwright/test";
|
|
import { assertSameKimiPending, type KimiLifecyclePending } from "./kimi-lifecycle-evidence.js";
|
|
|
|
export async function kimiPendingWritePermissionCard(input: {
|
|
page: Page;
|
|
pending: KimiLifecyclePending;
|
|
readPending(): Promise<KimiLifecyclePending>;
|
|
}) {
|
|
const { page, pending, readPending } = input;
|
|
assertSameKimiPending(pending, await readPending());
|
|
const prompt = `Change file: ${pending.scope.target}`;
|
|
const card = page.getByTestId("task-chat-runtime-request")
|
|
.filter({ visible: true })
|
|
.filter({ has: page.getByText(prompt, { exact: true }) });
|
|
await expect(card).toHaveCount(1);
|
|
await expect(card.getByText(prompt, { exact: true })).toBeVisible();
|
|
await expect(card.getByRole("button", { name: "Deny", exact: true })).toBeEnabled();
|
|
await expect(card.getByRole("button", { name: "Allow once", exact: true })).toBeEnabled();
|
|
assertSameKimiPending(pending, await readPending());
|
|
return card;
|
|
}
|