text stringlengths 3 8.33k | repo stringclasses 52
values | path stringlengths 6 141 | language stringclasses 35
values | sha stringlengths 64 64 | chunk_index int32 0 273 | n_tokens int32 1 896 |
|---|---|---|---|---|---|---|
import { describe, expect, test } from "vitest";
import {
buildRepairAttemptFixture,
buildRepairLoopRouteFixture,
buildRepairLoopSummary,
evaluateRepairAttemptOutcome,
evaluateStaleRepairDependencies,
} from ".";
describe("Phase 15 repair-loop read model", () => {
test("builds a workspace-safe failed-to-re... | diplomarbeit-os | apps/studio/src/domain/repair-loop/read-model.test.ts | TypeScript | baee2a815d1f2cd6bcefdea1852e05b45508d8131200cff40634c6b656ec2b2b | 0 | 855 |
import type {
RepairAttemptOutcome,
RepairAttemptRecord,
RepairLoopSummary,
RepairRoute,
StaleRepairRecord,
} from "./types";
export function buildRepairLoopSummary(input: {
readonly runId: string;
readonly routes: readonly RepairRoute[];
readonly attemptsByRouteKey: Readonly<Record<string, readonly Re... | diplomarbeit-os | apps/studio/src/domain/repair-loop/read-model.ts | TypeScript | c1aa770982c1862ed33256f9060c393068acb37c6bef68e89b6093b56964b438 | 0 | 370 |
import { describe, expect, test } from "vitest";
import {
buildRepairAttemptFixture,
buildRepairLoopRouteFixture,
evaluateRepairAttemptOutcome,
planRepairRerunScope,
} from ".";
describe("Phase 15 REPAIR-03 repair rerun scope", () => {
test("plans affected verification checks and evidence for rerun", () => {... | diplomarbeit-os | apps/studio/src/domain/repair-loop/rerun.test.ts | TypeScript | 10eda2f86c489d9e39bbdf71f3fe8cf743fbdcedc09e65b3a91864bc673330c3 | 0 | 766 |
import { evaluateRepairEscalation } from "./routing";
import type {
RepairAttemptOutcome,
RepairAttemptRecord,
RepairRoute,
RepairRerunScope,
} from "./types";
export function planRepairRerunScope(route: RepairRoute): RepairRerunScope {
return {
routeKey: route.routeKey,
ownerKey: route.ownerKey,
... | diplomarbeit-os | apps/studio/src/domain/repair-loop/rerun.ts | TypeScript | 1dd71d04141c0a44028c93be1f40eb2d6598d350bbb4b05c26790ec49bea9018 | 0 | 552 |
import { readFile } from "node:fs/promises";
import { describe, expect, test } from "vitest";
import {
createRepairFindingFromSource,
evaluateRepairEscalation,
repairOwnerKeyValues,
routeRepairForFinding,
type RepairAttemptRecord,
type RepairFindingSource,
} from ".";
describe("Phase 15 REPAIR-02 repair ro... | diplomarbeit-os | apps/studio/src/domain/repair-loop/routing.test.ts | TypeScript | d06364dac46258ac7116c85b05add12856c6c3cb9b8ad76c5b9ffcd7369bfc76 | 0 | 896 |
state: "escalated",
terminal: true,
attemptsUsed: 2,
remainingAttempts: 0,
reason: "retry-budget-exhausted",
lastFailedEvidenceKey: "verification:test:failed-2",
suggestedOwnerKey: "reviewer",
});
});
test("marks successful repair attempts as resolved", () => {
const rou... | diplomarbeit-os | apps/studio/src/domain/repair-loop/routing.test.ts | TypeScript | d98da4f90af743bf56704716ef88c39ed397da6781beafad24b8f5453a3f5e05 | 1 | 502 |
import type {
RepairAttemptRecord,
RepairEscalation,
RepairFinding,
RepairOwnerKey,
RepairRoute,
RepairRouteStatus,
} from "./types";
const defaultMaxAttempts = 2;
export function routeRepairForFinding(finding: RepairFinding): RepairRoute {
const ownerKey = ownerForFinding(finding);
const status = rou... | diplomarbeit-os | apps/studio/src/domain/repair-loop/routing.ts | TypeScript | d8f75a9524310fb309f79faf970c503f1a716bc71c57ce9065b44b488d6cc673 | 0 | 896 |
readMetadataString(finding: RepairFinding, key: string): string | null {
const value = finding.metadata[key];
return typeof value === "string" && value.length > 0 ? value : null;
}
function lastFailedEvidenceKey(attempts: readonly RepairAttemptRecord[]): string | null {
return (
attempts
.slice()
... | diplomarbeit-os | apps/studio/src/domain/repair-loop/routing.ts | TypeScript | 54aeed7922de34f0cdc2f30898f568355fe3e8974895880994cffecd9f3cecbc | 1 | 158 |
import { describe, expect, test } from "vitest";
import { evaluateStaleRepairDependencies, type RepairDependencyKey } from ".";
describe("Phase 15 REPAIR-04 stale dependency policy", () => {
test("marks verification, browser, descriptor, and workspace evidence stale after a revision change", () => {
const stale ... | diplomarbeit-os | apps/studio/src/domain/repair-loop/staleness.test.ts | TypeScript | 958f72738d9aa5aec14474329df627a05b55cafb6561b3a2f8b7a986a92ad5f5 | 0 | 896 |
records: [
dependencyRecord("verification:test", "evidence", "verification-policy", "policy-current"),
],
});
expect(stale.staleRecords).toEqual([]);
});
});
function dependencyRecord(
recordKey: string,
recordType: "evidence" | "artifact" | "finding" | "repair" | "workspace-step",
depen... | diplomarbeit-os | apps/studio/src/domain/repair-loop/staleness.test.ts | TypeScript | a9fa223b5ecc12611520a3af41dd2af7a8802aa3b20716b92aab7ecac3b3f608 | 1 | 114 |
import type {
ChangedRepairDependency,
RepairDependentRecord,
RepairStalenessResult,
StaleRepairRecord,
} from "./types";
export function evaluateStaleRepairDependencies(input: {
readonly changedDependencies: readonly ChangedRepairDependency[];
readonly records: readonly RepairDependentRecord[];
}): Repair... | diplomarbeit-os | apps/studio/src/domain/repair-loop/staleness.ts | TypeScript | f75e665fbc1b8d3030dded7cd4b7a0c00cb7dd2c2c2360bce9578814ee937235 | 0 | 160 |
import type { FindingStatus, JsonObject, RepairStatus, ValidityState } from "../state/types";
export const repairFindingSourceKindValues = [
"verification-check-failure",
"browser-smoke-failure",
"citation-gap",
"artifact-inconsistency",
"reviewer-finding",
"infrastructure-unavailable",
"infrastructure-u... | diplomarbeit-os | apps/studio/src/domain/repair-loop/types.ts | TypeScript | e3ddae73c51a57e7cf34d9d0f647515cea0e721daab073074eba4010df08649d | 0 | 896 |
RepairDependencyKey = (typeof repairDependencyKeyValues)[number];
export const repairDependentRecordTypeValues = [
"evidence",
"artifact",
"finding",
"repair",
"coherence-review",
"workspace-step",
] as const;
export type RepairDependentRecordType = (typeof repairDependentRecordTypeValues)[number];
expor... | diplomarbeit-os | apps/studio/src/domain/repair-loop/types.ts | TypeScript | e31e751a5a4e585a067259c385ec800f0a679dbbf0f77b48ac8c978b1858057d | 1 | 304 |
import { describe, expect, test } from "vitest";
import { buildFirstRepairLoopWorkspaceModel } from ".";
describe("Phase 15 repair-loop workspace composition", () => {
test("REPAIR-01 through REPAIR-05 compose failed, stale, and escalated repair state", () => {
const model = buildFirstRepairLoopWorkspaceModel();... | diplomarbeit-os | apps/studio/src/domain/repair-loop/workspace.test.ts | TypeScript | fa85a9315d1e9f225277a5c6ab81d14dcdd686fcc98374842a3fe58e44caf524 | 0 | 896 |
);
});
test("uses stable durable relationships and safe product descriptors only", () => {
const model = buildFirstRepairLoopWorkspaceModel();
const verificationFinding = model.currentRunState.findings.find(
(finding) =>
finding.findingKey ===
"finding:verification-check-failure:verif... | diplomarbeit-os | apps/studio/src/domain/repair-loop/workspace.test.ts | TypeScript | bfcc47f8daecdf599b1969137fd14fbe1f3683fa30eeb2da52da8a8b0754dee5 | 1 | 385 |
import type { Evidence, Finding, Repair } from "../../db/schema";
import { reconstructCurrentRunState } from "../state/reconstruct";
import type { DurableRunRecords } from "../state/repository";
import type { JsonObject, RepairStatus } from "../state/types";
import {
buildFirstWalkingSliceWorkspaceModel,
type First... | diplomarbeit-os | apps/studio/src/domain/repair-loop/workspace.ts | TypeScript | 06545f5b6ad2da5b0cde045ab110c7c210fc31fea04de72c835ddb8a20e25be1 | 0 | 896 |
-revision",
dependencyValue: staleRevisionKey,
validity: "valid",
},
],
}).staleRecords,
}),
};
}
type RepairLoopWorkspaceCase = {
readonly finding: RepairFinding;
readonly route: RepairRoute;
readonly attempts: readonly RepairAttemptRecord[];
readonly outc... | diplomarbeit-os | apps/studio/src/domain/repair-loop/workspace.ts | TypeScript | 35a9c215ab4bddae87568c1d77347fd0f494db0695002cf947db6aa366f24613 | 1 | 896 |
run.id, item.finding, item.outcome, index),
),
],
repairs: [
...records.repairs,
...cases.map((item, index) =>
buildRepairRecord(records.run.id, item.finding, item.outcome, index),
),
],
};
}
function buildRepairLoopEvidence(runId: string): readonly Evidence[] {
return [... | diplomarbeit-os | apps/studio/src/domain/repair-loop/workspace.ts | TypeScript | 7095583dadf6ba053309d7d7fb2c82507e85ee5f6c10b8fd31b932f5f83f3a59 | 2 | 896 |
createdAt: at(index),
updatedAt: at(index),
} as Finding;
}
function buildRepairRecord(
runId: string,
finding: RepairFinding,
outcome: RepairAttemptOutcome,
index: number,
): Repair {
const repairKeys = [
"repair:verification-test-required-check",
"repair:browser-home-flow-layout-stale-evidenc... | diplomarbeit-os | apps/studio/src/domain/repair-loop/workspace.ts | TypeScript | 76a20ab968c768ba7555fcf7a3afc56262291e3a8f9de0e9b2a1b147eddbfa73 | 3 | 553 |
import { describe, expect, test } from "vitest";
import {
assertSandboxCapabilityProfile,
browserbaseCapabilityProfile,
e2bHostedSandboxCapabilityProfile,
getSandboxCapabilityProfile,
localDockerSandboxCapabilityProfile,
negotiateSandboxCapabilities,
sandboxCapabilityKeyValues,
sandboxCapabilitySupportS... | diplomarbeit-os | apps/studio/src/domain/sandbox/capabilities.test.ts | TypeScript | 61ffa22002c0d1c1c1d103a7e63209e02d151f53f1a7e06486215a9a15ea1cc3 | 0 | 896 |
([
expect.objectContaining({
capabilityKey: "command.argv-execution",
support: "unsupported",
}),
]),
);
expect(browser.deferred.map((row) => row.capabilityKey)).toContain("hosted-browser-session");
});
test("reports unavailable, approval-required, and deferred sta... | diplomarbeit-os | apps/studio/src/domain/sandbox/capabilities.test.ts | TypeScript | 0a86c21b013d58f5df156ed9314c93451bba6756061f3af78b43f6f2a23eeabd | 1 | 513 |
import type { SandboxProviderCandidateKey, SandboxProviderClass } from "./types";
export const sandboxCapabilitySupportStateValues = [
"supported",
"unsupported",
"unavailable",
"requires-approval",
"deferred",
] as const;
export type SandboxCapabilitySupportState = (typeof sandboxCapabilitySupportStateValue... | diplomarbeit-os | apps/studio/src/domain/sandbox/capabilities.ts | TypeScript | 2525a4e4678f076b5ecde5a6aff446dd7b2e85e7b9a5cc5fb838a4b0ecacc308 | 0 | 896 |
,
providerKey: "docker-local-cli",
providerClass: "local-container",
displayName: "Local Docker CLI",
status: "active-live",
liveCommandExecution: true,
evidenceSourceLabels: ["Phase 10 Docker provider", "Context7 Docker CLI docs 2026-06-28"],
replacementNotes: [
"Current live backend for argv-backed ... | diplomarbeit-os | apps/studio/src/domain/sandbox/capabilities.ts | TypeScript | 93fd909c16bd64d55cae8de4adea6aa2654fa9d2685538e61f041d6d224a349d | 1 | 896 |
.export", "package", "Package export belongs to Phase 24."),
unsupported("desktop.automation", "desktop", "Desktop automation is not supported."),
unsupported("device.simulation", "device", "Device simulation is not supported."),
unsupported(
"hosted-browser-session",
"hosted-browser",
"Ho... | diplomarbeit-os | apps/studio/src/domain/sandbox/capabilities.ts | TypeScript | f119c290293e95fbf9447b55595838a0189370c7d91fd297cd0ffca97fac3418 | 2 | 896 |
);
validateRequirements(input.requiredCapabilities);
const rowsByKey = new Map(
input.profile.capabilityRows.map((row) => [row.capabilityKey, row] as const),
);
const satisfied: SandboxCapabilityNegotiationRow[] = [];
const missing: SandboxCapabilityNegotiationRow[] = [];
const approvalRequired: Sandbox... | diplomarbeit-os | apps/studio/src/domain/sandbox/capabilities.ts | TypeScript | 1462a80d51c1e1f313af57c9776332f3d50d3b3142403adbe507a8168d0f1614 | 3 | 896 |
{
throw new Error("Sandbox capability negotiation input is too large");
}
const seen = new Set<string>();
for (const requirement of requirements) {
validateSandboxCapabilityRequirement(requirement);
if (seen.has(requirement.requirementKey)) {
throw new Error(`Duplicate sandbox capability requir... | diplomarbeit-os | apps/studio/src/domain/sandbox/capabilities.ts | TypeScript | 01fdd536fb3762829e1a26081b5269cc4510d26174fb317b44dd06eadac01bef | 4 | 650 |
import { describe, expect, test } from "vitest";
import { buildSandboxCommandFixture } from "./fixtures";
import { buildDockerRunArguments } from "./docker-command";
import type { SandboxExecutionPolicy } from "./types";
function valuesAfterFlag(args: readonly string[], flag: string): string[] {
const values: string... | diplomarbeit-os | apps/studio/src/domain/sandbox/docker-command.test.ts | TypeScript | 25a4a5518907c207f2a97f1ba07055ea2adbe045871dedaaa805c2947aee29bb | 0 | 896 |
).not.toContain("SECRET_TOKEN=must-not-cross");
expect(args.slice(-4)).toEqual(["operator-approved-image:latest", "bun", "run", "test"]);
});
test("rejects flag-shaped and unsafe Docker image references before argv construction", () => {
const command = buildSandboxCommandFixture();
const unsafeImages ... | diplomarbeit-os | apps/studio/src/domain/sandbox/docker-command.test.ts | TypeScript | 3e235ca5471d0a5e413a90a36ace45bf4f40bebee725c9e9fdb63a891f7971d8 | 1 | 561 |
import { createHash } from "node:crypto";
import path from "node:path";
import type { SandboxCommandInput, SandboxExecutionPolicy, SandboxWorkspaceMount } from "./types";
import { validateSandboxCommandInput } from "./validators";
export type DockerRunArgumentsOptions = {
readonly input: SandboxCommandInput;
reado... | diplomarbeit-os | apps/studio/src/domain/sandbox/docker-command.ts | TypeScript | 3c92e19adddae604bfdc84669933297aa9d18ba1063cdd216006c7dfb034f200 | 0 | 896 |
, descriptor);
const relative = path.relative(root, resolved);
if (relative.startsWith("..") || path.isAbsolute(relative)) {
throw new Error("Docker mount source must stay inside the configured workspace root");
}
if (resolved.includes(",")) {
throw new Error("Docker mount source must not contain comma... | diplomarbeit-os | apps/studio/src/domain/sandbox/docker-command.ts | TypeScript | a56f1b6c2b9f0dc14354f4b6d26c10fdca5be4b149481768b25cb7006af976f9 | 1 | 625 |
import { readFile } from "node:fs/promises";
import { describe, expect, test } from "vitest";
import type { GeneratedRepositoryContractRecords } from "../generated-repository/repository";
import {
generatedRepositoryFixtureIds,
generatedRepositoryFixtureTimestamp,
} from "../generated-repository/fixtures";
import {... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.test.ts | TypeScript | 2dec87783f8078ce891f0c7e1255c731f61d502730d7ecd7c01cc652eeffab05 | 0 | 896 |
commandArgv: ["bun", "run", "test"],
workingDirectoryDescriptor: "generated/reference-app",
status: "succeeded",
exitCode: 0,
failureClass: null,
unavailableReason: null,
workspaceDescriptor: "sandbox-workspaces/run-900-test-command",
workspaceSnapshotDescriptor: "sandbox-works... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.test.ts | TypeScript | 7cf7d158e85469ddaae56b57132c99dc6f7631d04dd1c3ac1b2ce2e2733fc422 | 1 | 896 |
: "generated/other-app",
timestamp,
});
const provider = createFakeProvider(providerResult({ status: "succeeded", exitCode: 0 }));
const dependencies = createFakeDependencies({
records: {
...records,
repositories: [otherRepository, ...records.repositories],
revisions: [ot... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.test.ts | TypeScript | 14dcd7bb0514c88e0fad32c4d40923a00434b4c54478b63ae9f262b2d7cf668b | 2 | 896 |
,
}),
expectedStatus: "failed",
expectedFailureClass: "execution_failed",
expectedUnavailableReason: null,
},
{
name: "cancelled",
providerResult: providerResult({
status: "cancelled-by-policy",
exitCode: null,
stderr: "cancelled ... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.test.ts | TypeScript | 292dc6951ca5f0b8154485db5f49de2e52a7c659b56620f7fbedd216aa7ade9b | 3 | 896 |
const timestamp = new Date(generatedRepositoryFixtureTimestamp);
const repository = {
id: generatedRepositoryFixtureIds.repository,
runId: generatedRepositoryFixtureIds.run,
taskId: generatedRepositoryFixtureIds.task,
artifactId: null,
repositoryKey: "phase-09-reference-generated-repository",
... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.test.ts | TypeScript | 0d6a6ac0b11760c0c3a831b7f5aa482ae43e9d8cdf79a2655db2bb6689452ae4 | 4 | 896 |
(`Missing command fixture: ${commandKey}`);
}
return command;
}
function requireRevision(
records: GeneratedRepositoryContractRecords,
): GeneratedRepositoryContractRecords["revisions"][number] {
const revision = records.revisions[0];
if (revision === undefined) {
throw new Error("Missing revision fixtur... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.test.ts | TypeScript | 27d22929fba2e210e27ef04fab1ab03572b13dc803bc252f6b53e8054d8f1bc5 | 5 | 896 |
boundary",
capabilities: ["command-execution", "bounded-logs", "deterministic-teardown"],
calls,
checkAvailability: async () => availability,
execute: async (input) => {
calls.push(input);
const result = results[Math.min(calls.length - 1, results.length - 1)];
if (result === undefined... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.test.ts | TypeScript | 52c72e1326cb8cc200af505364d73ece05aff7f2efcbe557036045e5f9ad2b7c | 6 | 511 |
import type { Database } from "../../db/client";
import type {
GeneratedRepositoryCommandSpecRecord,
GeneratedRepositoryRecord,
GeneratedRepositoryRevisionRecord,
} from "../../db/schema";
import {
readGeneratedRepositoryContractRecords,
type GeneratedRepositoryContractRecords,
} from "../generated-repository... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.ts | TypeScript | 2ce13b3fd77430bef4e1b54faf32b42cd918d0493ec905e9a2964d36c5913c0f | 0 | 896 |
providerResult,
cleanup,
});
const persisted = await dependencies.createSandboxExecutionRecordForRun(
input.db,
input.runId,
executionInput,
);
return {
status: "persisted",
rejectionReason: null,
providerResult,
records: persisted,
cleanup,
};
... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.ts | TypeScript | 49c70080b67e8f39dbff4572be74938a976e27dbdf041e76d27d864ea320fb7f | 1 | 896 |
));
}
return {
accepted: true,
repository,
revision,
command,
};
}
function ensureDescribedCommandWithArgv(command: GeneratedRepositoryCommandSpecRecord): void {
if (command.supportStatus !== "described") {
throw new Error(
`generated repository command ${command.commandKey} is ${com... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.ts | TypeScript | e9363b212cc3472adac2e99a25139b741a76415b0ba4c8a64bf60e66041cf830 | 2 | 896 |
persistence.",
metadata: {
providerStatus: result.status,
},
},
{
sequence: 2,
logKey: "provider-stderr",
stream: "stderr",
content: result.stderr,
maxContentBytes: policy.logs.maxBytes,
safetySummary: "Provider stderr normalized before persistence.",
... | diplomarbeit-os | apps/studio/src/domain/sandbox/execution-service.ts | TypeScript | 0a91c9ca13551cad099f1611dc71dc0b6f573d4542d6527ebabbd495eb134774 | 3 | 705 |
import type {
SandboxCommandInput,
SandboxExecutionPolicy,
SandboxProviderCandidate,
SandboxProviderDecision,
} from "./types";
const providerCandidates: readonly SandboxProviderCandidate[] = [
{
key: "docker-local-cli",
name: "Local Docker CLI / Engine",
providerClass: "local-container",
pha... | diplomarbeit-os | apps/studio/src/domain/sandbox/fixtures.ts | TypeScript | 3395eef7ec5a2f38dd5e3f15f632a69828509458c7c8861492590eb94ded397c | 0 | 896 |
-source Firecracker project.",
maintenance:
"Maintained for serverless and microVM use cases, but local host support must be verified.",
replacementCost:
"High because kernel, rootfs, networking, and lifecycle management are new infrastructure.",
},
{
key: "webcontainers",
name: "WebCont... | diplomarbeit-os | apps/studio/src/domain/sandbox/fixtures.ts | TypeScript | 5c736a89162b18ca8be8ace38662a04582437a3d2bfd056deb458a4016048843 | 1 | 896 |
},
{
key: "browserbase-browser",
name: "Browserbase",
providerClass: "hosted-browser-evidence",
phase10Disposition: "deferred-evidence-path",
isolation: "Hosted browser sessions isolate browser automation, not backend command execution.",
browserSupport:
"Strong hosted browser automation... | diplomarbeit-os | apps/studio/src/domain/sandbox/fixtures.ts | TypeScript | 2ce533e4acb8f4d05af7707f6e8bf85d461c3a17e02078d6348dc888a3a3345b | 2 | 896 |
Map provider lifecycle, logs, and resource metadata into SandboxExecutionResult.",
},
{
providerKey: "modal-sandbox",
trigger: "Use when cloud execution and managed resources become necessary.",
adapterImpact: "Add a hosted adapter and cloud secret-boundary proof.",
},
{
... | diplomarbeit-os | apps/studio/src/domain/sandbox/fixtures.ts | TypeScript | 4b99c41a8980b5faf2ad542919ceaba649db1bbf38f2386f83a15d3b2685f9d5 | 3 | 410 |
export * from "./capabilities";
export * from "./docker-command";
export * from "./execution-service";
export * from "./fixtures";
export * from "./log-redaction";
export * from "./local-docker-provider";
export * from "./repository";
export * from "./types";
export * from "./validators";
export * from "./workspace";
| diplomarbeit-os | apps/studio/src/domain/sandbox/index.ts | TypeScript | 70ab475d897a308719eff976fcdccef997ccd619f9cceab81ce2901ce289f999 | 0 | 100 |
import { describe, expect, test } from "vitest";
import { buildSandboxCommandFixture, buildSandboxExecutionPolicyFixture } from "./fixtures";
import {
buildDockerParentEnv,
createLocalDockerSandboxProvider,
readDockerAvailability,
} from "./local-docker-provider";
const liveOptInEnvName = "DIPLOMARBEIT_DOCKER_SA... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.integration.test.ts | TypeScript | d37b55e6a3f80a098406c79e9553a7d9b3743fdf523d83c6227c9d0a89dbb259 | 0 | 474 |
import { describe, expect, test } from "vitest";
import { buildSandboxCommandFixture } from "./fixtures";
import {
createLocalDockerSandboxProvider,
readDockerAvailability,
type DockerProcessRunner,
type DockerProcessRunnerCommand,
} from "./local-docker-provider";
function createRunner(
handler: (command: D... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.test.ts | TypeScript | 95174618d5e0ba4e975ae61e1b167b14c6b05f436379d37ace5a154c2417be2e | 0 | 896 |
: "true",
PUBLIC_API_ORIGIN: "http://127.0.0.1:3100",
SECRET_TOKEN: "must-not-cross",
},
parentEnv: {
PATH: "/usr/bin",
HOME: "/Users/julia",
SECRET_TOKEN: "host-secret",
DIPLOMARBEIT_TEST_DATABASE_URL: "postgres://secret",
},
now: () => new Date("... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.test.ts | TypeScript | 2a9d2fe8c87f97f5e531a18fcb9c47854943cc4b95dd2b1dbaee0ba0c3336f63 | 1 | 896 |
toContain("CREDENTIAL : [redacted]");
expect(`${result.stdout}\n${result.stderr}`).not.toContain(tokenValue);
expect(`${result.stdout}\n${result.stderr}`).not.toContain(databaseValue);
expect(`${result.stdout}\n${result.stderr}`).not.toContain(quotedApiValue);
expect(`${result.stdout}\n${result.stderr}`... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.test.ts | TypeScript | 33e85b363f40a7062f8adbe8026bcc9b47edba423212cba09570d563daebab75 | 2 | 896 |
).toBe("failed");
expect(result.metadata).toMatchObject({
timedOut: true,
teardownReason: "docker-remove-failed",
});
expect(fake.calls.map((call) => call.args[0])).toEqual([
"--version",
"info",
"image",
"run",
"rm",
]);
});
test("reports unavailable when ... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.test.ts | TypeScript | 75582cea850e3052fbfd9ddd894141325ce0220234e256d16de7abb1b87caed9 | 3 | 600 |
import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
import process from "node:process";
import {
buildDockerContainerName,
buildDockerRunArguments,
validateDockerImageReference,
} from "./docker-command";
import { redactSandboxSecretLikeValues } from "./log-redaction";
import type {
... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.ts | TypeScript | 4370c039e6e03a2157dfe516b684902092222116e8d3ee565c233e2c7b580ac1 | 0 | 896 |
env: parentEnv,
timeoutMs: input.policy.resources.timeoutMs,
maxOutputBytes: input.policy.logs.maxBytes,
purpose: "run",
});
const teardown = await teardownTimedOutContainer({
input,
runner,
parentEnv,
containerName,
timedOut: runResult.timedOu... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.ts | TypeScript | 049bf471107665d9bad8d4a48d3add231451acb780da47397c7735de1fd30867 | 1 | 896 |
spawn(command.executable, [...command.args], {
env: { ...command.env } as NodeJS.ProcessEnv,
shell: false,
windowsHide: true,
});
const timer = setTimeout(() => {
timedOut = true;
child.kill("SIGKILL");
}, command.timeoutMs);
child.stdout?.on("data", (chunk: Buffer) => {
... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.ts | TypeScript | 078332bf00d17cde7db3a5b6ad239132b7fde0a4b1a92c218006b08a5f35ff98 | 2 | 896 |
): string {
const withoutAnsi = input.policy.logs.stripAnsi ? stripAnsiColorSequences(value) : value;
const redacted = input.policy.logs.redactSecretLikeValues
? redactSandboxSecretLikeValues(withoutAnsi)
: withoutAnsi;
return appendBounded("", redacted, input.policy.logs.maxBytes);
}
function stripAnsi... | diplomarbeit-os | apps/studio/src/domain/sandbox/local-docker-provider.ts | TypeScript | ba302db63dd286a04abb616723380732e2d6de6fcd29f420112afb895a9789ae | 3 | 328 |
const secretAssignmentPattern =
/\b([A-Z0-9_]*(?:SECRET|TOKEN|PASSWORD|PRIVATE_KEY|API_KEY|DATABASE_URL|CREDENTIAL)[A-Z0-9_]*)(\s*[:=]\s*)(?:"[^"\r\n]*"|'[^'\r\n]*'|[^\s;]+)/gi;
export function redactSandboxSecretLikeValues(value: string): string {
return value.replace(secretAssignmentPattern, "$1$2[redacted]");
}... | diplomarbeit-os | apps/studio/src/domain/sandbox/log-redaction.ts | TypeScript | 8b3f42a30267aeddbdeb9b6c79a65ba1cf6f9ebdfd8cbf94008b218de07ff4b6 | 0 | 123 |
import { describe, expect, test } from "vitest";
import type { Database } from "../../db/client";
import {
type GeneratedRepositoryCommandSpecRecord,
type GeneratedRepositoryRecord,
type GeneratedRepositoryRevisionRecord,
type Run,
type SandboxExecutionLogRecord,
type SandboxExecutionRecord,
type Task,
... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.test.ts | TypeScript | 1c27c7c9b2f5dd64f086217d2a5d842d92505c618821b99081c40f7904fd34e4 | 0 | 896 |
: "sandbox command ok",
redactionStatus: "not-needed",
truncated: false,
});
expect(readback.logs[1]?.sanitizedContent).toContain("[redacted]");
expect(readback.logs[1]?.sanitizedContent).not.toContain("top-secret-value");
expect(readback.logs[1]?.contentByteCount).toBeLessThanOrEqual(48);
... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.test.ts | TypeScript | 730b1e68431640839050f1bf5e5a59fa3302051bbe692c3368ad29a3527177ef | 1 | 896 |
}),
match: /revision.*repository/i,
},
{
name: "command spec for another revision",
db: createRecordingDatabase({ commandSpecRevisionId: crossRevisionId }),
match: /command spec.*revision/i,
},
];
for (const invalid of invalidCases) {
await expect(
... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.test.ts | TypeScript | 8ee621b4ab520897a3f5467c9043af31ed3d69bb82161c5df0dd716ecb8bd3ab | 2 | 896 |
?: string;
readonly commandSpecRunId?: string;
readonly commandSpecRepositoryId?: string;
readonly commandSpecRevisionId?: string;
readonly existingExecutions?: readonly SandboxExecutionRecord[];
readonly existingLogs?: readonly SandboxExecutionLogRecord[];
} = {},
): RecordingDatabase {
const c... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.test.ts | TypeScript | 9ccc9bec0463ee1a3ceb46bb64e1e00c8e65244eb3084d8764eac93b87004206 | 3 | 896 |
() {
return Promise.resolve(storedValues);
},
};
},
};
},
delete(table: unknown) {
return {
where() {
deleteRows(table, stored, generatedRepositoryFixtureIds.run);
calls.push({
operation: "delete",
table:... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.test.ts | TypeScript | 62b9e0f405e54590657b8c18a1970beb552726523c36b73e25d9f20ffc82a38e | 4 | 896 |
Date(generatedRepositoryFixtureTimestamp);
const input = sandboxExecutionInput({ executionKey });
return {
id: input.id,
runId: input.runId,
taskId: input.taskId,
taskAttemptId: input.taskAttemptId,
generatedRepositoryId: input.generatedRepositoryId,
generatedRepositoryRevisionId: input.gen... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.test.ts | TypeScript | 4ed1874a9716f68a1ac92b24b6bb306a4ffd811593e956f1be0e41b8bbea7a84 | 5 | 733 |
import { asc, eq } from "drizzle-orm";
import type { Database } from "../../db/client";
import {
type GeneratedRepositoryCommandSpecRecord,
type GeneratedRepositoryRecord,
type GeneratedRepositoryRevisionRecord,
type Run,
type SandboxExecutionLogRecord,
type SandboxExecutionLogRecordInsert,
type SandboxEx... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.ts | TypeScript | a3ccc2aca5a5553ff5c13d670822de783039f1fba77d4631da77030f09107317 | 0 | 896 |
,
runId: string,
): Promise<SandboxExecutionRecordsForRun> {
ensureNonBlank(runId, "Run ID");
const executionRows = (await db
.select()
.from(sandboxExecutions)
.where(eq(sandboxExecutions.runId, runId))
.orderBy(asc(sandboxExecutions.startedAt), asc(sandboxExecutions.executionKey))) as
| San... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.ts | TypeScript | 46616ecf59377767696fd2bccd5855274d4a12a49ec8549ff5534989ae4ab691 | 1 | 896 |
[input.commandKey, "sandbox command key"],
[input.commandKind, "sandbox command kind"],
[input.workingDirectoryDescriptor, "sandbox working directory descriptor"],
[input.workspaceDescriptor, "sandbox workspace descriptor"],
] as const) {
ensureNonBlank(value, label);
}
if (input.commandArgv.leng... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.ts | TypeScript | f0a6b446f24160d88d2709887fbfdbf20ee2bfb6ab17badaf160c3467d892e4c | 2 | 896 |
input.workspaceSnapshotDescriptor,
teardownStatus: input.teardownStatus,
teardownRemoveContainer: policy.teardown.removeContainer,
teardownRemoveWorkspace: policy.teardown.removeWorkspace,
teardownKillOnTimeout: policy.teardown.killOnTimeout,
startedAt: new Date(input.startedAtIso),
completedAt:... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.ts | TypeScript | 6c733457908f66fbdab7fd4f6baa6f7a77114ddb06432111569dfe3a01d4ee7e | 3 | 896 |
startedAt?.getTime() ?? Number.MAX_SAFE_INTEGER;
const secondStartedAt = second.startedAt?.getTime() ?? Number.MAX_SAFE_INTEGER;
return firstStartedAt - secondStartedAt || first.executionKey.localeCompare(second.executionKey);
}
function compareSandboxLogs(
first: SandboxExecutionLogRecord,
second: SandboxExe... | diplomarbeit-os | apps/studio/src/domain/sandbox/repository.ts | TypeScript | f96d2ed26018fffb136bd7be8b0d290a5e6461173dc20f4b30bc3ef09eb015a6 | 4 | 341 |
import { getTableConfig } from "drizzle-orm/pg-core";
import { describe, expect, test } from "vitest";
import {
generatedRepositoryCommandSpecs,
generatedRepositories,
generatedRepositoryRevisions,
runs,
sandboxExecutionLogs,
sandboxExecutionRecordTables,
sandboxExecutions,
sandboxExecutionTableNames,
... | diplomarbeit-os | apps/studio/src/domain/sandbox/schema.test.ts | TypeScript | fbb69344941c5fe8ce2bfe02a1e3d0be72f90204d53c34d44794a93afc8b3c12 | 0 | 896 |
sandbox_executions_reset_strategy_not_blank",
"sandbox_executions_resource_metadata_object",
"sandbox_executions_safe_workspace_descriptor",
"sandbox_executions_safe_workspace_snapshot_descriptor",
"sandbox_executions_status_allowed",
"sandbox_executions_status_not_blank",
"sandbox_e... | diplomarbeit-os | apps/studio/src/domain/sandbox/schema.test.ts | TypeScript | 38750bde0f1b47b93fb35c81d379db62f3e54a0aeffb5301f826f70b3150555f | 1 | 511 |
export type SandboxJsonPrimitive = string | number | boolean | null;
export type SandboxJsonValue =
| SandboxJsonPrimitive
| readonly SandboxJsonValue[]
| { readonly [key: string]: SandboxJsonValue };
export type SandboxJsonObject = { readonly [key: string]: SandboxJsonValue };
export const sandboxProviderCandid... | diplomarbeit-os | apps/studio/src/domain/sandbox/types.ts | TypeScript | ee7f7d4a82504004857088754f1f2d9b8e4ebd37c4fa176886e0d589ffeefac2 | 0 | 896 |
environment: SandboxEnvironmentPolicy;
readonly networkMode: SandboxNetworkMode;
readonly privileged: boolean;
readonly resources: SandboxResourceLimits;
readonly logs: SandboxLogPolicy;
readonly reset: SandboxResetPolicy;
readonly teardown: SandboxTeardownPolicy;
};
export type SandboxCommandInput = {
r... | diplomarbeit-os | apps/studio/src/domain/sandbox/types.ts | TypeScript | ad4b54da54928f1486a1723313b5f7abada365576806cf32de284dda331f0592 | 1 | 251 |
import { describe, expect, test } from "vitest";
import { buildSandboxCommandFixture, buildSandboxProviderDecisionFixture } from "./fixtures";
import {
sandboxNetworkModeValues,
sandboxProviderCandidateKeyValues,
type SandboxExecutionPolicy,
} from "./types";
import { validateSandboxCommandInput, validateSandboxE... | diplomarbeit-os | apps/studio/src/domain/sandbox/validators.test.ts | TypeScript | e43c75cb040803f4d37defbbaef6ce4622a7cb8cc462720e0a9ffdaeb68045f7 | 0 | 896 |
run test",
argv: null,
}),
).toThrow(/argv/i);
});
test("SBOX-02 rejects protected command descriptors before provider calls", () => {
const command = buildSandboxCommandFixture();
expect(() =>
validateSandboxCommandInput({
...command,
workingDirectory:
".... | diplomarbeit-os | apps/studio/src/domain/sandbox/validators.test.ts | TypeScript | 42efac4d500265b402bccc7a73258fd220e468da019fb0b1b74f9373eb6b8865 | 1 | 896 |
variable/i);
expect(() =>
validateSandboxExecutionPolicy({
...policy,
environment: { ...policy.environment, allowedVariableNames: ["SECRET_TOKEN"] },
}),
).toThrow(/secret/i);
expect(() =>
validateSandboxExecutionPolicy({ ...policy, networkMode: "host" as never }),
).to... | diplomarbeit-os | apps/studio/src/domain/sandbox/validators.test.ts | TypeScript | 27edb6eb335bc064fedc348b8cdf7ce6307e14e2477631edb5c66ee32c81e8db | 2 | 419 |
import { validateRootRelativeDescriptor } from "../generated-repository/validators";
import {
sandboxMountModeValues,
sandboxNetworkModeValues,
sandboxResetStrategyValues,
type SandboxCommandInput,
type SandboxEnvironmentPolicy,
type SandboxExecutionPolicy,
type SandboxLogPolicy,
type SandboxResourceLim... | diplomarbeit-os | apps/studio/src/domain/sandbox/validators.ts | TypeScript | 3d84dc2210a35d81585f2102011c6c74cb51975bf37009da18feaaff83d6b08f | 0 | 896 |
("Sandbox resource limits require positive pidsLimit");
}
}
function validateLogPolicy(logs: SandboxLogPolicy): void {
if (!isPositiveFiniteNumber(logs.maxBytes) || logs.maxBytes > maxLogBytes) {
throw new Error("Sandbox log policy requires bounded maxBytes");
}
if (!logs.redactSecretLikeValues) {
thro... | diplomarbeit-os | apps/studio/src/domain/sandbox/validators.ts | TypeScript | 4c07325fbf7ecc6bae0f2a9d91443831e92a60794e45ce94a4ef1f34f93e23dd | 1 | 896 |
);
}
}
function validateNonBlank(value: string, label: string): void {
if (typeof value !== "string" || value.trim().length === 0) {
throw new Error(`${label} must be non-blank`);
}
}
function isPositiveFiniteNumber(value: number): boolean {
return Number.isFinite(value) && value > 0;
}
function validate... | diplomarbeit-os | apps/studio/src/domain/sandbox/validators.ts | TypeScript | e5418324be192e2d80ab763406f0819cd48ce229a86acf24e1c3a2a78ab29111 | 2 | 156 |
import { access, mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { afterEach, describe, expect, test } from "vitest";
import { buildDockerRunArguments } from "./docker-command";
import { buildSandboxCommandFixture } from "./fixtur... | diplomarbeit-os | apps/studio/src/domain/sandbox/workspace.test.ts | TypeScript | e17a0138741fc7b68a78d56ed0955366593bad2e0784a65dc103c177c3c3c86b | 0 | 896 |
[0];
const actualCopiedDestination = path.resolve(disposableRoot, workspaceKey);
expect(preparation.workspaceDescriptor).toBe(".sandbox-workspaces/run-900-dot-root");
expect(mount).toBeDefined();
expect(mount?.split(",")).toContain(`source=${actualCopiedDestination}`);
});
test("rejects forbidden ... | diplomarbeit-os | apps/studio/src/domain/sandbox/workspace.test.ts | TypeScript | 4739da56f000634fb2164695487beec5df405dbf8bffae49239f2685328880c7 | 1 | 896 |
join(fixture.sourceRoot, "src", "index.ts"), "utf8")).toContain(
"sandbox fixture",
);
expect(firstCleanup).toMatchObject({
workspaceKey: "run-900-cleanup",
workspaceDescriptor: ".product-sandbox-workspaces/run-900-cleanup",
teardownStatus: "completed",
removed: true,
});
e... | diplomarbeit-os | apps/studio/src/domain/sandbox/workspace.test.ts | TypeScript | 4804cb36873011c91870b3aae2370d274655ad4aff6fe2b5da5ba823c5c625fd | 2 | 643 |
import { access, cp, mkdir, readdir, realpath, rm, stat } from "node:fs/promises";
import path from "node:path";
import { validateRootRelativeDescriptor } from "../generated-repository/validators";
import type { SandboxTeardownStatus, SandboxWorkspaceMount } from "./types";
import { validateSandboxExecutionPolicy } fro... | diplomarbeit-os | apps/studio/src/domain/sandbox/workspace.ts | TypeScript | 63735f277d8d567ccb2d8ceb114b20a054cceaebd04bc97c80b77ac7e9919453 | 0 | 896 |
workspaceDescriptor,
targetPath: options.targetPath ?? "/workspace",
mode: "read-write-output",
required: true,
};
validateWorkspaceMountDescriptor(mount, workspaceDescriptor);
return {
workspaceKey,
sourceDescriptor,
workspaceDescriptor,
workspaceSnapshotDescriptor: workspaceDescrip... | diplomarbeit-os | apps/studio/src/domain/sandbox/workspace.ts | TypeScript | c37c3d5b983f05e7c52007a255192e51059e6f1603f671cb3b64b35742ff57b7 | 1 | 896 |
$|\/)|(^|\/)\.planning($|\/)|(^|\/)reference-corpus($|\/)/.test(
normalized,
);
}
async function countFiles(root: string): Promise<number> {
let count = 0;
for (const entry of await readdir(root, { withFileTypes: true })) {
const childPath = path.join(root, entry.name);
if (entry.isDirectory()) {
... | diplomarbeit-os | apps/studio/src/domain/sandbox/workspace.ts | TypeScript | ad5039ec1540f4ed63fe0932624cbfdfba16b2f027ad8f0be37cd5dd5258a151 | 2 | 170 |
import { buildFirstDirectionalEvaluationWorkspaceModel } from "../evaluation";
import { buildShowcasePackageManifest } from "./manifest";
export function buildFirstShowcasePackageManifest() {
return buildShowcasePackageManifest(buildFirstDirectionalEvaluationWorkspaceModel());
}
| diplomarbeit-os | apps/studio/src/domain/showcase/fixtures.ts | TypeScript | c4a2e39431f943b4f40645469653d94c367c6ace445f065bf8c70231de10525d | 0 | 38 |
export * from "./fixtures";
export * from "./manifest";
export * from "./types";
export * from "./validators";
export * from "./workspace";
| diplomarbeit-os | apps/studio/src/domain/showcase/index.ts | TypeScript | 239d954a3945536d89db4aa81b1b482a351acaf27e987a75addc6f28bd6fa7a0 | 0 | 45 |
import { describe, expect, test } from "vitest";
import { buildFirstShowcasePackageManifest } from "./fixtures";
import type { ShowcasePackageManifest } from "./types";
import { validateShowcasePackageManifest } from "./validators";
describe("final showcase package manifest", () => {
test("SHOW-01 and SHOW-04 compos... | diplomarbeit-os | apps/studio/src/domain/showcase/manifest.test.ts | TypeScript | 58dbff13505124a44326e13cf13f8e9ad4bbf5f65bd676c87e66af959d8c2fb2 | 0 | 896 |
0);
const secondItem = requiredManifestItem(manifest, 1);
const archiveItem = requiredManifestItem(manifest, 14);
const unsafeManifest: ShowcasePackageManifest = {
...manifest,
items: [
{
...firstItem,
descriptor: "C:/Users/julia/project/.env.local",
riskKey... | diplomarbeit-os | apps/studio/src/domain/showcase/manifest.test.ts | TypeScript | 0f7e90708b8989cffda00bf0a1d968189a52fafc2e34b71860212b9046794ec7 | 1 | 385 |
import { createHash } from "node:crypto";
import type { FirstDirectionalEvaluationWorkspaceModel } from "../evaluation";
import type {
ShowcasePackageIntegrity,
ShowcasePackageManifest,
ShowcasePackageManifestItem,
ShowcasePackageManifestSummary,
ShowcasePackageReadiness,
ShowcasePackageRisk,
} from "./type... | diplomarbeit-os | apps/studio/src/domain/showcase/manifest.ts | TypeScript | c89d16ee7ef70e89be5c69ad87863b9b3208b66c59ed24d3957709bcce99bda4 | 0 | 896 |
) => command.commandKey),
limitationKeys: input.generatedRepositoryView.limitations
.filter((limitation) => limitation.category === "unsupported command")
.map((limitation) => limitation.limitationKey),
riskKeys: [],
});
}
function artifactSourceItem(input: WorkspaceInput): ShowcasePackageManifes... | diplomarbeit-os | apps/studio/src/domain/showcase/manifest.ts | TypeScript | 887df5a25b09da522d5a8d3a682e20d9fbf112c79108cf687f905070dac15a83 | 1 | 896 |
verification-summary",
sourceRecordKey: "verification-run-first-walking-slice",
descriptor: `verification:${verification.passedCount}/${verification.requiredCheckCount}:${verification.completion.completeness}`,
readiness: verification.completion.complete ? "ready" : "missing",
integrity: "linked-evidenc... | diplomarbeit-os | apps/studio/src/domain/showcase/manifest.ts | TypeScript | 6774c6911c0d774991e7ec1e535e5f8921631f876e6dfd3de012c71c6a26c2ba | 2 | 896 |
,
evidenceKeys: limitationKeys,
limitationKeys,
riskKeys: [deferredArchiveRiskKey],
});
}
function riskReportItem(input: WorkspaceInput): ShowcasePackageManifestItem {
const riskKeys = buildRisks(input).map((risk) => risk.riskKey);
return makeItem({
itemKey: "package-item:risk-report",
kind:... | diplomarbeit-os | apps/studio/src/domain/showcase/manifest.ts | TypeScript | 1a527bfff708dc7991ec84c5ec6c14148ea13810fb49c61ce334c4ca410e1676 | 3 | 896 |
null && input.repairLoop.escalatedCount > 0) {
risks.push({
riskKey: escalatedRepairRiskKey,
severity: "material",
status: "open",
summary: "At least one repair route remains escalated after retry budget exhaustion.",
mitigation:
"The showcase keeps the escalation visible with ... | diplomarbeit-os | apps/studio/src/domain/showcase/manifest.ts | TypeScript | 711706630c4abc2f0ca3811ada12217422a21fa8850b3a97bb94950b1c9ef583 | 4 | 640 |
export const showcasePackageItemKindValues = [
"generated-repository",
"run-instructions",
"artifact-export",
"browser-evidence",
"verification-summary",
"citation-support",
"decision-history",
"repair-history",
"limitation-report",
"risk-report",
"coherence-review",
"directional-evaluation",
... | diplomarbeit-os | apps/studio/src/domain/showcase/types.ts | TypeScript | 6cf2817d81006f0fdfff3315cab53274ff20a7a7866aa03de45a5e08f5c34898 | 0 | 617 |
import type {
ShowcaseManifestValidationIssue,
ShowcaseManifestValidationResult,
ShowcasePackageManifest,
} from "./types";
const unsafeDescriptorFragments = [
".planning",
".env.local",
".codex",
".agents",
"gsd-core",
"reference-corpus",
"file://",
"raw log",
"raw screenshot",
"raw trace",
... | diplomarbeit-os | apps/studio/src/domain/showcase/validators.ts | TypeScript | 988a57cd007fab8cf6ef1c9f114a00acb15662783f8a2d84ac6d59c57ecd5e08 | 0 | 896 |
.limitationKeys`,
message: `Package item ${item.itemKey} is ${item.readiness} without a limitation link.`,
});
}
}
for (const [index, risk] of manifest.risks.entries()) {
const path = `risks[${index}]`;
for (const [fieldName, value] of [
["riskKey", risk.riskKey],
["summary",... | diplomarbeit-os | apps/studio/src/domain/showcase/validators.ts | TypeScript | 3ee7c3c4da34c3dfdd95cc929ce0f7335edaa563047dc59e2e0a014f7a50c756 | 1 | 266 |
import {
buildFirstDirectionalEvaluationWorkspaceModel,
type FirstDirectionalEvaluationWorkspaceModel,
} from "../evaluation";
import { buildShowcasePackageManifest } from "./manifest";
import type { ShowcasePackageManifest } from "./types";
export type FirstShowcaseWorkspaceModel = FirstDirectionalEvaluationWorks... | diplomarbeit-os | apps/studio/src/domain/showcase/workspace.ts | TypeScript | 9386d575fae55cf8f3aab4671ab2ff6591eacf1615e9ba8e8fe8a83fcb6357a2 | 0 | 85 |
import { mkdtemp, readFile, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { afterEach, describe, expect, test } from "vitest";
import type { Database } from "../../db/client";
import type { GeneratedRepositoryContractRecords } from "../generated-repository/reposito... | diplomarbeit-os | apps/studio/src/domain/software-worker/dispatcher.test.ts | TypeScript | f8efaa7674920ce4f002e16499e5c40cb9ccb615c16a05806d5824d2ba53e152 | 0 | 896 |
[0]?.policy.workspaceMounts).toHaveLength(1);
expect(generatedRepository.persistedSandboxExecutions[0]).toMatchObject({
taskAttemptId: "00000000-0000-4000-8000-000000011001",
commandKey: "build-command",
status: "succeeded",
providerKey: "docker-local-cli",
commandArgv: ["project-tool"... | diplomarbeit-os | apps/studio/src/domain/software-worker/dispatcher.test.ts | TypeScript | 7d179ee406f6141a11f8ab55e873b2de201e0d1f703583362ea842b51949598c | 1 | 896 |
();
const schedulerRepository = createFakeSchedulerRepository();
const generatedRepository = createFakeGeneratedRepositoryPersistence();
const provider = createFakeProvider(providerResult({ status: "succeeded", exitCode: 0 }));
const result = await dispatchFirstSoftwareWorkerTask({
db: {} as Data... | diplomarbeit-os | apps/studio/src/domain/software-worker/dispatcher.test.ts | TypeScript | 849aa8c82a6612f4ffa3aef44e2ffcc47bae3505bf72ac0d05c051f768fdada6 | 2 | 896 |
log",
}),
expectedFailureClass: "execution_failed",
expectedOutcome: "failed_retryable",
},
{
name: "timeout",
providerResult: providerResult({
status: "timed-out",
exitCode: null,
stderr: "timeout",
metadata: { timedOut: true }... | diplomarbeit-os | apps/studio/src/domain/software-worker/dispatcher.test.ts | TypeScript | 41a250a52280bdbae1cc3d9c6018492d993bdcaa2536aa05e83b4cda1fc5e028 | 3 | 896 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.