Files
PaperClipAI/tests/runner-e2e/codie-latency-diagnostic.test.ts
T
DottaandPaperclip c91f7a6e5f perf(runner): overlap verified sandbox launch assets (#16585)
Native sandbox launch preparation stages fresh harness files and immutable runtime context in sequence. Overlap them only under the verified concurrent-sync capability, settle every started transfer before launch or cleanup, and preserve serial SSH behavior and error priority.

A matched real-Daytona comparison reduces staging from 1,552 ms to 1,017 ms. The larger active-run difference includes model variation and is not attributed to this change. Add an explicit single-attempt diagnostic and synchronize stale Pi evidence metadata with its shipped profile.

Validation: 764 native runner/tracing cases, 2,764 support cases, repository typecheck/build, fresh exact-head full CI/E2E/security and Apex 5/5 pass. Observability remains a silent no-op when no endpoint is configured.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-16 13:35:26 -05:00

25 lines
1.5 KiB
TypeScript

import { describe, expect, it } from "vitest";
import { runnerSuites } from "./catalog.js";
import { effectiveAutomaticRetryLimit } from "./automatic-retry.js";
import { parseRunnerSelectors, selectRunnerExecutions } from "./selectors.js";
describe("explicit native latency diagnostic", () => {
const suiteId = "codie-latency-diagnostic";
it("selects only one explicit real-Daytona cell and stays out of all", () => {
const cells = selectRunnerExecutions(parseRunnerSelectors(["--suite", suiteId]));
expect(cells).toHaveLength(1);
expect(cells[0]).toMatchObject({ profile: { model: "gpt-6.1-sol", generation: "native" }, environment: { id: "daytona" } });
expect(selectRunnerExecutions(parseRunnerSelectors(["--all"])).some(cell => cell.suite.id === suiteId)).toBe(false);
expect(selectRunnerExecutions(parseRunnerSelectors(["--profile", "runner-codex"])).some(cell => cell.suite.id === suiteId)).toBe(false);
});
it("enforces one paid attempt even when the command requests retries", () => {
const [cell] = selectRunnerExecutions(parseRunnerSelectors(["--suite", suiteId]));
expect(effectiveAutomaticRetryLimit(cell!.task, 99)).toBe(0);
});
it("declares the authentication and staging-fidelity limits", () => {
expect(runnerSuites.find(suite => suite.id === suiteId)?.definitionMetadata).toMatchObject({
diagnostic: true, providerAuth: "api_key", stagingAuth: "subscription", companyData: "fresh-fixture", slackDelivery: false, maximumAutomaticRetries: 0,
});
});
});