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 |
|---|---|---|---|---|---|---|
!== "stale" && dependency.staleReason === null) {
continue;
}
const marker =
`${dependency.dependencyKey}:${dependency.sourceRecordType}:${dependency.sourceRecordKey}`.toLowerCase();
const classification = classifyStaleDocumentDependencyMarker(marker);
if (classification !== null) {
f... | diplomarbeit-os | apps/studio/src/domain/artifacts/document-rendering.ts | TypeScript | 8dae289e9b4074cf3921356a8e3d3ed08fc51a3f448efdb364f8ed97d640d400 | 4 | 896 |
) {
throw new Error(`Unsupported document export kind ${exportKind}`);
}
}
function ensureSupportedLanguage(language: DocumentLanguage): void {
if (!documentLanguageValues.includes(language)) {
throw new Error(`Unsupported document language ${language}`);
}
}
function ensureCitationKey(key: string): voi... | diplomarbeit-os | apps/studio/src/domain/artifacts/document-rendering.ts | TypeScript | 073099b3f8ee0d7227d33d4723393ec2e5fe81f1beb512956300eabc7acaadd6 | 5 | 896 |
string): `sha256:${string}` {
return `sha256:${createHash("sha256").update(value, "utf8").digest("hex")}`;
}
function stableStringify(value: unknown): string {
if (Array.isArray(value)) {
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
}
if (value !== null && typeof value === "object") ... | diplomarbeit-os | apps/studio/src/domain/artifacts/document-rendering.ts | TypeScript | 620cd1a396a702504b86f5beb058caf57c09fcbdf1950bc5b85a32a67faedea9 | 6 | 212 |
import { createHash } from "node:crypto";
import { durableStateFixtureIds } from "../state/fixtures";
import type {
ArtifactDependencyRole,
ArtifactDependencySourceRecord,
ArtifactDependencySourceType,
ArtifactExportMetadata,
ArtifactSourceFact,
ArtifactSourceSection,
ArtifactVersionSourceRecord,
Minim... | diplomarbeit-os | apps/studio/src/domain/artifacts/fixtures.ts | TypeScript | 49fc0400744049a4ced4fcc69652b630f4050d5e07bab42af8059b0ef8c37717 | 0 | 896 |
evidence",
},
],
},
{
kind: "limitation-report",
title: "Limitationsbericht",
factSummary: "Der Bericht hält offene Infrastrukturgrenzen als Produktzustand fest.",
sectionBody:
"Der Bericht unterscheidet verfügbare Nachweise von bewusst offenen späteren Fähigkeiten.",
extraDepend... | diplomarbeit-os | apps/studio/src/domain/artifacts/fixtures.ts | TypeScript | 5ac6b190edb807597a1cb720d90d2602815b35235c786dfec82259553280b1f5 | 1 | 896 |
.definition.extraDependencies].map((dependency, dependencyIndex) =>
buildDependency(version, dependency, definition.kind, dependencyIndex + 1),
);
}
function buildDependency(
version: ArtifactVersionSourceRecord,
definition: DependencyDefinition,
kind: MinimalAcademicArtifactKind,
sequence: number,
): Ar... | diplomarbeit-os | apps/studio/src/domain/artifacts/fixtures.ts | TypeScript | 9c88580329184786b3d4269f869315953b742b459f2611aa36cd3a24a46a4328 | 2 | 340 |
import { describe, expect, test } from "vitest";
import { buildScaledRetrievalFixtureChunks } from "../knowledge/scale-fixture";
import { buildFirstWalkingSliceWorkspaceModel } from "../walking-slice/workspace";
import { minimalAcademicArtifactKindValues } from "./types";
import { validateArtifactDependencyCoverage } ... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.test.ts | TypeScript | 9bab48aaaaebd1802c48c0416b9203b983ed90b380b368ab38fc7bac774cfdb4 | 0 | 896 |
", () => {
const workspace = buildFirstWalkingSliceWorkspaceModel();
const withoutDecision = {
...workspace,
durableRunRecords: {
...workspace.durableRunRecords,
decisions: [],
decisionLinks: {
tasks: [],
artifacts: [],
evidence: [],
},
... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.test.ts | TypeScript | 51c7a71e21ab894732e59931b6d901a3934eb270c91b73420fb42b876ff89236 | 1 | 896 |
];
for (const finding of findings) {
expect(Object.keys(finding as Record<string, unknown>).sort()).toEqual([
"hashStatus",
"metrics",
"reason",
"sectionKey",
"sourceBoundary",
"sourceChunkId",
"sourceReferenceId",
"status",
"thresholds"... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.test.ts | TypeScript | fdf861d593eb85612791cb03c7e51ed9bd30c81a293cabcc78ece904c5f925c1 | 2 | 372 |
import { createHash } from "node:crypto";
import {
checkAntiRegurgitation,
type AntiRegurgitationFinding,
type AntiRegurgitationStatus,
type AntiRegurgitationThresholds,
} from "../knowledge/anti-regurgitation";
import { buildScaledRetrievalFixtureChunks } from "../knowledge/scale-fixture";
import type { Retri... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.ts | TypeScript | 29b6051470bb94867685f3a4613271036ade4b60282412584400726c9b939427 | 0 | 896 |
;
const projectSpec = {
sourceRecordType: "project-spec",
sourceRecordId: workspace.durableRunRecords.projectSpec.id,
sourceRecordKey: `project-spec:${workspace.durableRunRecords.projectSpec.version}`,
sourceVersionOrHash: stableHash(
stableStringify({
id: workspace.durableRunRecords.pro... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.ts | TypeScript | e17b5c46ffe65cba42e878f2d18b843492fb8708c4f23aed321e094793c858cf | 1 | 896 |
GeneratedVersionDraft {
const ids = generatedArtifactIds[definition.kind];
const exportMetadata: ArtifactExportMetadata = {
descriptor: `urn:diplomarbeit-os:artifact-source:${scenarioKey}:${definition.kind}:v1`,
intendedExportKind: definition.intendedExportKind,
mimeType: "application/json",
rendere... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.ts | TypeScript | 34b74ee2aaf9cbd942b03568ec06b368d20f5ef9e2c8917a3065d650bf00eb25 | 2 | 896 |
) => sourceFact.factKey === link.sourceRecordKey,
);
return {
sourceRecordType: "structured-fact",
sourceRecordId: null,
sourceRecordKey: link.sourceRecordKey,
sourceVersionOrHash: fact?.sourceVersionOrHash ?? stableHash(link.sourceRecordKey),
dependencyRole: link.dependencyRole,
... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.ts | TypeScript | 71d1855be1ccc70e23ae91757427178e96984552a1d9fa4399d5d4f7e8dd4a6c | 3 | 896 |
}
function projectSpecLink(context: ArtifactGenerationContext): ArtifactSourceLink {
return {
sourceRecordType: "project-spec",
sourceRecordKey: context.projectSpec.sourceRecordKey,
dependencyRole: "supports-claim",
};
}
function revisionLink(context: ArtifactGenerationContext): ArtifactSourceLink {
... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.ts | TypeScript | 222a7812355933eeccd9589b54a714aa61fb8e546516cb3966471b8fbffad4f6 | 4 | 896 |
((item) => stableStringify(item)).join(",")}]`;
}
if (value !== null && typeof value === "object") {
const entries = Object.entries(value as Record<string, unknown>).sort(([left], [right]) =>
left.localeCompare(right),
);
return `{${entries
.map(([key, item]) => `${JSON.stringify(key)}:${st... | diplomarbeit-os | apps/studio/src/domain/artifacts/generator.ts | TypeScript | c073de2c6ee40b0297acc0e6c850c8852e18b8150f06b7c1d7dda4d0b81cf119 | 5 | 259 |
export * from "./dependencies";
export * from "./document-generator";
export * from "./document-rendering";
export * from "./fixtures";
export * from "./generator";
export * from "./read-model";
export * from "./repository";
export * from "./staleness";
export * from "./types";
export * from "./visual-generator";
expor... | diplomarbeit-os | apps/studio/src/domain/artifacts/index.ts | TypeScript | 987e4aae8683dedc75a3d41d11de1ff39ab90709533439aabc6ad2a00ec2c865 | 0 | 118 |
import { describe, expect, test } from "vitest";
import { validateArtifactDependencyCoverage } from "./dependencies";
import { documentArtifactKindValues, generateAcademicDocumentSources } from "./document-generator";
import { generateMinimalAcademicArtifacts } from "./generator";
import {
buildArtifactSourceSummary... | diplomarbeit-os | apps/studio/src/domain/artifacts/read-model.test.ts | TypeScript | f668ec9eeeb75527278ecb8fe694d441f4cdad174cfc495fadb6420fbe8f0b67 | 0 | 896 |
[0]?.body);
expect(serialized).not.toContain(generated.artifactVersions[0]?.sourceFacts[0]?.summary);
for (const fragment of forbiddenSummaryFragments) {
expect(serialized).not.toContain(fragment);
}
expect(serialized).not.toMatch(/[A-Z]:[\\/]|\/Users\/|\/home\//);
});
});
describe("ART-04 docu... | diplomarbeit-os | apps/studio/src/domain/artifacts/read-model.test.ts | TypeScript | c96a1d3c983c3732aa8eceb82733c55a27c16f74bd71f08ae434f1f05c12b0c3 | 1 | 896 |
=> artifact.visualKind === "ideenpraesentation",
);
expect(ideenpraesentation).toMatchObject({
visualKind: "ideenpraesentation",
sourceFormat: "marp-markdown-v1",
language: "de-AT",
sourceDocumentKind: "projektantrag",
readinessStatus: "ready",
readinessState: "ready",
... | diplomarbeit-os | apps/studio/src/domain/artifacts/read-model.test.ts | TypeScript | b8ad3d11dc33de9229549087a98b1c91f1f252040fab03ca5b01a85bfc56c676 | 2 | 572 |
import {
validateArtifactDependencyCoverage,
type ArtifactDependencyCoverageItem,
type ArtifactDependencyCoverageReport,
type ArtifactDependencyCoverageState,
type ArtifactDependencyCoverageSummary,
} from "./dependencies";
import type {
ArtifactDependencySourceRecord,
ArtifactKind,
ArtifactVersionSourc... | diplomarbeit-os | apps/studio/src/domain/artifacts/read-model.ts | TypeScript | 114219b17a776dc87c338baf59a9e4203e0e821543aabd274741f14958efc4f4 | 0 | 896 |
??
validateArtifactDependencyCoverage({
artifactVersions: input.artifactVersions,
artifactDependencies: input.artifactDependencies,
});
const coverageByVersionId = new Map(
coverage.artifacts.map((artifact) => [artifact.artifactVersionId, artifact]),
);
return {
counts: {
...cov... | diplomarbeit-os | apps/studio/src/domain/artifacts/read-model.ts | TypeScript | ac168929909c7a14c9a71e931051270879336e3efca52d42b3f60f732282ddf6 | 1 | 896 |
,
rendererProfileDescriptor:
rendererDescriptorState === "descriptor-only" ? "pandoc descriptor-only" : "none",
exportDescriptorCount: exportDescriptors.length,
exportDescriptors,
failureCodes: source.readiness.failureCodes,
};
}
function summarizeVisualArtifactSource(
source: GeneratedVisual... | diplomarbeit-os | apps/studio/src/domain/artifacts/read-model.ts | TypeScript | 54826ae72a40b8abde326718719ff1d20d20776f5675dc48b8104625f11281db | 2 | 641 |
import { describe, expect, test } from "vitest";
import { generateAcademicDocumentSources } from "./document-generator";
import { generateMinimalAcademicArtifacts } from "./generator";
import { buildArtifactVersionInsertRecords } from "./repository";
import type {
ArtifactDependencySourceRecord,
ArtifactVersionSou... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.test.ts | TypeScript | b8c7a0407c49475f3e590a6a558b53045c80daea733e13d94093e04812acaf74 | 0 | 896 |
) => ({
...decision,
runId: "00000000-0000-4000-9999-000000000004",
})),
},
}),
).toThrow(/decision .*same run/i);
expect(() =>
buildArtifactVersionInsertRecords({
artifactVersions: generated.artifactVersions,
artifactDependencies: generated... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.test.ts | TypeScript | a4d52d28e184bb75309d56d1205fecd55472334b79408fe6338f4300478b048a | 1 | 896 |
: version.sourceFacts.map((fact, factIndex) =>
factIndex === 0 ? { ...fact, summary: "secret marker .env.local" } : fact,
),
}
: version,
),
artifactDependencies: generated.artifactDependencies,
ownership,
}),
).toThrow(/unsaf... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.test.ts | TypeScript | e4d75c1a809465fb5a142396a2b8eaa3563aeb898355a7882e26d9112db929a4 | 2 | 896 |
document.docx",
"file://artifacts/document-exports/projektantrag.docx",
"C:\\Users\\julia\\projektantrag.docx",
"/home/julia/projektantrag.docx",
"artifacts/document-exports/raw-export.bin",
"artifacts/document-exports/renderer-output.txt",
"artifacts/document-exports/../projektantra... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.test.ts | TypeScript | 6c7bbd38b1c7bba25fe4c77c6c0854a1608fa2e94ded10ffb0af2e3a89e6458c | 3 | 896 |
),
},
}),
).toThrow(/evidence .*same run/i);
expect(() =>
buildArtifactVersionInsertRecords({
artifactVersions: fixture.artifactVersions,
artifactDependencies: fixture.artifactDependencies,
ownership: {
...ownership,
decisionArtifactSourceContexts... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.test.ts | TypeScript | 954614ab55842bf2852f14b89dcad964388ea93ec49f8426343d827b8bd77846 | 4 | 896 |
if (version === undefined) {
throw new Error(`Missing artifact version for dependency ${dependency.dependencyKey}`);
}
return version;
}
function requireString(value: string | null, label: string): string {
if (value === null || value.trim().length === 0) {
throw new Error(`Missing ${label}`);
}
re... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.test.ts | TypeScript | 9e1f6ef83c781845e36afa851c86547e16b7bb097f65d9a6189eab059043657c | 5 | 133 |
import type { ArtifactDependencyRecordInsert, ArtifactVersionRecordInsert } from "../../db/schema";
import type { JsonObject, JsonValue } from "../state/types";
import {
artifactDependencyRoleValues,
artifactDependencySourceTypeValues,
type ArtifactDependencySourceRecord,
type ArtifactDependencySourceType,
ty... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.ts | TypeScript | 060e46062b4a4c5c379fa023ad07d534bd21e258f738fd006bee7c1e5c1e94ee | 0 | 896 |
version.runId !== ownership.runId) {
throw new Error(`Artifact version ${version.versionKey} must belong to the target run`);
}
ensureOwnedRecord({
records: ownership.artifacts,
id: version.artifactId,
key: undefined,
runId: ownership.runId,
label: "artifact",
requireKey: false,
});
... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.ts | TypeScript | d24e10f08b9285e56ff7aa3d8a42e1337071529be850b58bb46a52e056eee182 | 1 | 896 |
],
id: sourceRecordId,
key: dependency.sourceRecordKey,
runId: ownership.runId,
label: sourceLabel(dependency.sourceRecordType),
requireKey: true,
});
if (dependency.sourceRecordType === "decision") {
ensureDecisionOwnsArtifactSource({ dependency, version, ownership });
}
}
function ensu... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.ts | TypeScript | e4e1ad8c1c996f1f58c738308f18dba8cc915fd25199519db654453e03696c0d | 2 | 896 |
\/(?:Users|home|mnt|Volumes|private)\//i.test(value)) {
throw new Error(label);
}
}
function ensureNonBlank(value: string, label: string): void {
if (value.trim().length === 0) {
throw new Error(`${label} must not be blank`);
}
}
function sourceLabel(sourceRecordType: ArtifactDependencySourceType): stri... | diplomarbeit-os | apps/studio/src/domain/artifacts/repository.ts | TypeScript | 4bbd1e661a1afdcbe0cea211db407d7493e5453f8b1e04c39a499f665ecb0de7 | 3 | 408 |
import { getTableConfig } from "drizzle-orm/pg-core";
import { describe, expect, test } from "vitest";
import {
artifacts,
artifactDependencies,
artifactSourceRecordTables,
artifactSourceTableNames,
artifactVersions,
runs,
tasks,
} from "../../db/schema";
describe("ART-01 artifact source persistence sch... | diplomarbeit-os | apps/studio/src/domain/artifacts/schema.test.ts | TypeScript | 361334781e97915310ed56fbbc279d96043f697c3cf966e3ce56325f53ddfb64 | 0 | 860 |
import { describe, expect, test } from "vitest";
import { generateAcademicDocumentSources } from "./document-generator";
import { generateMinimalAcademicArtifacts } from "./generator";
import { evaluateArtifactSourceStaleness } from "./staleness";
import type {
ArtifactDependencySourceRecord,
ArtifactVersionSource... | diplomarbeit-os | apps/studio/src/domain/artifacts/staleness.test.ts | TypeScript | bd16abf8a5d101be49f61454e5822cd68c34cc153cd4741f57af1d1db28b22b9 | 0 | 896 |
sourceRecordKey,
currentValue: targetByKey.citation.sourceVersionOrHash,
reason: "citation source did not change",
},
],
});
expect(result.staleRecords).toEqual([]);
});
});
function requiredStaleFixtureSignals(fixture: MinimalArtifactSourceRecordsFixture): {
readonly art... | diplomarbeit-os | apps/studio/src/domain/artifacts/staleness.test.ts | TypeScript | 209c6bc98801db9a4ef5c645d82301f48f8a7b4fdf0158e5633cb306e46c0fdf | 1 | 896 |
record.staleReason).toContain("changed");
}
});
});
function requireVersionWithDependency(
fixture: MinimalArtifactSourceRecordsFixture,
sourceRecordType: ArtifactDependencySourceRecord["sourceRecordType"],
): ArtifactVersionSourceRecord {
const dependency = fixture.artifactDependencies.find(
(candidat... | diplomarbeit-os | apps/studio/src/domain/artifacts/staleness.test.ts | TypeScript | 777aabcc0efa2972591e6ad96a926cc9cdebe20f5fe0b1ec3163f23f674f2aad | 2 | 896 |
documentSource.documentKind}:anti-regurgitation-result`,
sourceVersionOrHash:
"sha256:3333333333333333333333333333333333333333333333333333333333333333",
},
{
sourceRecordKey: `${documentSource.documentKind}:renderer-profile`,
sourceVersionOrHash:
"sha256:44444444444444444444444... | diplomarbeit-os | apps/studio/src/domain/artifacts/staleness.test.ts | TypeScript | 7fd7601f86d23f2e6ea50525949a3a813da461840a240f817fbf54a7c71a162c | 3 | 626 |
import type { RepairDependencyKey } from "../repair-loop/types";
import type {
ArtifactDependencySourceRecord,
ArtifactDependencySourceType,
ArtifactKind,
ArtifactVersionSourceRecord,
} from "./types";
export const artifactSourceStaleDependencyKeyValues = [
"structured-fact",
"generated-repository-revision... | diplomarbeit-os | apps/studio/src/domain/artifacts/staleness.ts | TypeScript | a9c5e03d2d70de2ac3aa4887c8b156cae8f02a9d36cdd37aea6ff27242cb1cd8 | 0 | 896 |
.input.artifactDependencies
.filter(
(dependency) =>
dependency.sourceRecordType === "artifact-source" &&
dependency.sourceRecordKey === input.change.sourceRecordKey &&
dependency.sourceVersionOrHash !== input.change.currentValue,
)
.map((dependency) => {
... | diplomarbeit-os | apps/studio/src/domain/artifacts/staleness.ts | TypeScript | fd510d276cbe42d833dcb360b86ab67fa49f01e088121666a769634030f0f16b | 1 | 605 |
import type { JsonObject, ValidityState } from "../state/types";
export const minimalAcademicArtifactKindValues = [
"run-documentation",
"specification-summary",
"architecture-note",
"evidence-report",
"limitation-report",
] as const;
export type MinimalAcademicArtifactKind = (typeof minimalAcademicArtifactK... | diplomarbeit-os | apps/studio/src/domain/artifacts/types.ts | TypeScript | a1ad12b864eb1cbb772926f096d59fc70ee18da009749e385fe96672ac93b4a2 | 0 | 896 |
readonly status: "draft" | "ready" | "stale" | "unsupported";
readonly validity: ValidityState;
readonly staleReason: string | null;
readonly metadata: JsonObject;
};
export type ArtifactDependencySourceRecord = {
readonly id: string;
readonly runId: string;
readonly artifactVersionId: string;
readonly d... | diplomarbeit-os | apps/studio/src/domain/artifacts/types.ts | TypeScript | b782cd5e3bcf0f35d9295583f5073732d5f4672c8f1d9d4e0557ac7a5eb4f3f5 | 1 | 896 |
: DocumentAntiRegurgitationReadiness;
readonly dependencies: {
readonly artifactSourceCount: number;
readonly structuredFactCount: number;
readonly decisionCount: number;
readonly citationCount: number;
readonly evidenceCount: number;
readonly exportMetadataCount: number;
readonly coverage... | diplomarbeit-os | apps/studio/src/domain/artifacts/types.ts | TypeScript | 4ab8da60503f92e1cfb162a41d4d0d9b3e344d41d1793d50be7427795450c0ad | 2 | 569 |
import { describe, expect, test } from "vitest";
import { buildVisualOutputDefinitions, generateVisualArtifactSources } from "./visual-generator";
import { visualArtifactKindValues } from "./types";
const forbiddenVisualSourceFragments = [
".planning",
".env.local",
"reference-corpus",
"raw log",
"raw trace... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.test.ts | TypeScript | 3ea83bc1efe314bcdead793a802fca63acb5ba63a6a6fc9fc2333faf84f14efb | 0 | 896 |
),
);
for (const source of generated.visualSources) {
for (const fragment of forbiddenVisualSourceFragments) {
expect(source.sourceText).not.toContain(fragment);
}
expect(source.sourceText).not.toMatch(/[A-Z]:[\\/]|\/Users\/|\/home\//);
}
for (const fragment of forbiddenVisua... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.test.ts | TypeScript | f8d61eba5480e394d74aa1a0dc72832c1e3b1c3a20cdd86530fd73ca93edf2dd | 1 | 139 |
import { createHash } from "node:crypto";
import {
generateAcademicDocumentSources,
type AcademicDocumentSourcesFixture,
type GeneratedAcademicDocumentSource,
} from "./document-generator";
import { evaluateVisualSourceReadiness } from "./visual-rendering";
import type {
ArtifactDependencyRole,
ArtifactDepen... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.ts | TypeScript | a6a1966d8b3f551bc7e3363195e9311c6186e69a783a41b7bf31c459d0165d91 | 0 | 896 |
/zwischenpraesentation.html",
},
{
kind: "pdf",
renderer: "marp",
outputDescriptor: "artifacts/visual-exports/zwischenpraesentation.pdf",
},
],
},
{
visualKind: "abschlusspraesentation",
title: "Abschlusspraesentation",
language: "de-... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.ts | TypeScript | fbdb0c517cdba3dbe88ff58304ca1c48daf786ace86d23dc8db4bf4b044dd6a2 | 1 | 896 |
status: readiness.state === "ready" ? "ready" : visualStatusForReadiness(readiness.state),
validity:
readiness.state === "ready" ? "valid" : visualValidityForReadiness(readiness.state),
staleReason:
readiness.state === "stale"
? (readiness.reasons[0] ?? "visual ... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.ts | TypeScript | ee2663e71f66baa365a75daec4b8754d9cd9956feeae96eded18e20b82a35b67 | 2 | 896 |
,
validity: "valid",
staleReason: null,
},
]);
}
function buildVisualSourceFacts(input: {
readonly definition: VisualOutputDefinition;
readonly sourceDocument: GeneratedAcademicDocumentSource;
}): readonly ArtifactSourceFact[] {
return [
{
factKey: `${input.definition.visualKind}:visu... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.ts | TypeScript | af599ee7e4ce3f92e8dbe23e31e177de5969b0a61ca92b3f9829032d019a8bec | 3 | 896 |
readonly dependencyIndex: number;
}): ArtifactDependencySourceRecord {
return {
id: stableUuid(input.visualIndex, input.dependencyIndex),
runId: input.artifactVersion.runId,
artifactVersionId: input.artifactVersion.id,
dependencyKey: `${input.artifactVersion.versionKey}:dependency:${input.dependency.s... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.ts | TypeScript | 03ce38877b5c71bd5e060e9723011a61aa070cdaa210ec8248cb61d93b68f509 | 4 | 896 |
' "evidence_descriptors": [',
...input.exportDescriptors.map(
(descriptor, index) =>
` "${descriptor}"${index === input.exportDescriptors.length - 1 ? "" : ","}`,
),
" ]",
"}",
].join("\n");
}
function renderMediaPackageManifest(input: {
readonly definition: VisualOutputDefinitio... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.ts | TypeScript | 6503e560c54f60209e1f74137bc5b3bd791504f59aef9b4853e4ce0b4bc5659a | 5 | 896 |
) {
return "invalid";
}
return "unsupported";
}
function staleReasonForSourceVersion(sourceVersion: ArtifactVersionSourceRecord): string | null {
if (sourceVersion.validity === "valid" && sourceVersion.status === "ready") {
return null;
}
return sourceVersion.staleReason ?? `source document ${sourc... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-generator.ts | TypeScript | caf423cce747a3db532f46fe515f2f3194c089471d864b0181b9ec0244b22a03 | 6 | 414 |
import { describe, expect, test } from "vitest";
import { generateVisualArtifactSources } from "./visual-generator";
import {
buildVisualRendererDescriptor,
evaluateVisualIdentity,
evaluateVisualSourceReadiness,
} from "./visual-rendering";
describe("ART-05 visual source readiness", () => {
test("builds descr... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-rendering.test.ts | TypeScript | 324168f78a1e6ee3b785dd265efb6684361b458620016aba1f95544582283ac3 | 0 | 896 |
;
expect(readiness.exportDescriptors).toEqual([]);
expect(JSON.stringify(readiness)).not.toContain(".planning/poster.png");
});
test("marks stale visual identity dependencies as stale readiness", () => {
const generated = generateVisualArtifactSources();
const source = requireVisualSource(generated... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-rendering.test.ts | TypeScript | cfe1b5fece77bddd54e9f7a9d239d8243bafcb43a38e50e19f975171a7d44f6a | 1 | 358 |
import { createHash } from "node:crypto";
import { validateArtifactDependencyCoverage } from "./dependencies";
import {
visualArtifactKindValues,
visualExportKindValues,
visualRendererKindValues,
visualSourceFormatValues,
type DocumentLanguage,
type EvaluateVisualSourceReadinessInput,
type VisualArtifact... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-rendering.ts | TypeScript | 220269951738262d916949e5dd52b6b52e3bb8d4606b690884ef3d9e3ea7f948 | 0 | 896 |
{ language: input.language });
const coverage = validateArtifactDependencyCoverage({
artifactVersions: [input.artifactVersion],
artifactDependencies: input.artifactDependencies,
}).artifacts[0];
const dependencies = countVisualDependencies({
coverageState: coverage?.coverageState ?? "unsupported",
... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-rendering.ts | TypeScript | cf8244b8d40dc600e7df3da36454f7326c230ece2dac82bb26acfc0fe6c778a8 | 1 | 896 |
descriptor.outputDescriptor,
}),
);
} catch {
failureCodes.push("unsafe-renderer-descriptor");
reasons.push(`unsafe visual renderer descriptor ${descriptor.kind}`);
}
}
return {
exportDescriptors,
failureCodes: uniqueFailureCodes(failureCodes),
reasons: uniqueSorted(re... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-rendering.ts | TypeScript | fb1ccae318aa106ca156d91c88c81fe546c72fadd2638f4aea6d97e41d34f9e9 | 2 | 896 |
source language metadata must match the visual artifact language.",
line: 1,
},
];
}
return [];
}
function countBySourceType(
dependencies: readonly EvaluateVisualSourceReadinessInput["artifactDependencies"][number][],
sourceRecordType: EvaluateVisualSourceReadinessInput["artifactDependencie... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-rendering.ts | TypeScript | 3470e742ec291cfe3ac0cb23b2c39e606646eb0c355db0e03b811952df20dac8 | 3 | 896 |
string {
if (Array.isArray(value)) {
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
}
if (value !== null && typeof value === "object") {
const entries = Object.entries(value as Record<string, unknown>).sort(([left], [right]) =>
left.localeCompare(right),
);
return `{${e... | diplomarbeit-os | apps/studio/src/domain/artifacts/visual-rendering.ts | TypeScript | 0064e25ea265f980b8992c744e315b96241724507870698612e33bc337c901bb | 4 | 160 |
import { describe, expect, test } from "vitest";
import { documentArtifactKindValues } from "./document-generator";
import {
buildFirstArtifactSourceWorkspaceModel,
buildFirstDocumentRenderingWorkspaceModel,
buildFirstVisualArtifactWorkspaceModel,
} from "./workspace";
import { visualArtifactKindValues } from ".... | diplomarbeit-os | apps/studio/src/domain/artifacts/workspace.test.ts | TypeScript | d0121648499c9f19d8313b343b8e7223380b06c53daafdd2d491f1c4b2af115b | 0 | 896 |
expect(workspace.browserSmokeEvidenceSummary.latestStatus).toBe("passed");
expect(workspace.verificationSummary.passedCount).toBe(6);
expect(workspace.repairLoop).toMatchObject({
routeCount: 3,
resolvedCount: 2,
staleRecordCount: 1,
});
expect(workspace.artifactSourceSummary.counts.tot... | diplomarbeit-os | apps/studio/src/domain/artifacts/workspace.test.ts | TypeScript | 3bda5293150e20f9e83e0868264ba09c0633b7a0837c7dc77e30ec3c6baba340 | 1 | 741 |
import type { Artifact } from "../../db/schema";
import {
buildFirstRepairLoopWorkspaceModel,
type FirstRepairLoopWorkspaceModel,
} from "../repair-loop";
import { reconstructCurrentRunState } from "../state/reconstruct";
import type { JsonObject } from "../state/types";
import {
generateAcademicDocumentSources,
... | diplomarbeit-os | apps/studio/src/domain/artifacts/workspace.ts | TypeScript | 19b87603f6ad71d92601118cf1a1b2ef4850c654505469ed7f2d7caa6a760a6e | 0 | 896 |
: {
...base.durableRunRecords.decisionLinks,
artifacts: [
...base.durableRunRecords.decisionLinks.artifacts,
...buildArtifactDecisionLinks({
artifactVersions: visualArtifactVersions,
artifactDependencies: visualArtifactRecords.artifactDependencies,
}),
],
... | diplomarbeit-os | apps/studio/src/domain/artifacts/workspace.ts | TypeScript | 4bd3c2573262561dc42e890cc8ef7f15affbd1fcc118c62c116e5f0b980a9ce6 | 1 | 441 |
import { readFile } from "node:fs/promises";
import { describe, expect, test } from "vitest";
import { validateBrowserSmokeAdapterResult } from "./index";
import type {
BrowserSmokeAdapterResult,
BrowserSmokeOutcome,
BrowserSmokeOutcomeStatus,
BrowserSmokeRequestResourceType,
} from "./index";
describe("browse... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/classifier.test.ts | TypeScript | baff7245b45f2591f5460f3c7a95bd9e55cfe4acb6e0a7d13c7abfb69269cf05 | 0 | 896 |
independent of Playwright, host execution, Docker providers, schema, repositories, and filesystems", async () => {
const source = await readFile(new URL("./classifier.ts", import.meta.url), "utf8");
expect(source).not.toMatch(
/@playwright\/test|page\.goto|child_process|Bun\.spawn|local-docker-provider|D... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/classifier.test.ts | TypeScript | f74a5a0d8a3764c4ff4c4baa9b4afe7957159919abac55d8c368654e0ce79c51 | 1 | 896 |
},
],
severeLayoutFailureDetected: true,
safeFailureSummary: "The expected heading was present but invisible.",
});
}
function buildArtifactCaptureFailureResult(): BrowserSmokeAdapterResult {
return buildBrowserSmokeAdapterResultFixture({
artifacts: [
{
artifactKey: "homepage-screensh... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/classifier.test.ts | TypeScript | 9818e75b860711a897215105316b7475586afea0388ef95f072d89b1e02b7119 | 2 | 186 |
import type {
BrowserSmokeAdapterResult,
BrowserSmokeOutcome,
BrowserSmokeOutcomeStatus,
BrowserSmokeSignalObservation,
} from "./types";
import { validateBrowserSmokeAdapterResult } from "./validators";
export function classifyBrowserSmokeResult(input: BrowserSmokeAdapterResult): BrowserSmokeOutcome {
const... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/classifier.ts | TypeScript | 0ac591bcc3eba12202f41b49e7b07e47a435d178bcb93bbf9584367b020f169d | 0 | 896 |
"error").length,
pageErrors: result.pageErrors.length,
requestFailures: result.requestFailures.length,
},
};
}
function statusToValidity(status: BrowserSmokeOutcomeStatus): BrowserSmokeOutcome["validity"] {
if (status === "passed") {
return "valid";
}
if (status === "stale") {
return "s... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/classifier.ts | TypeScript | bc47e585867689409627d0d3383874e25c5a740f0a36fadde34093dc85ae1d80 | 1 | 109 |
import { describe, expect, test } from "vitest";
import type { Database } from "../../db/client";
import {
type BrowserSmokeArtifactRecord,
type BrowserSmokeRunRecord,
type Evidence,
type GeneratedRepositoryRecord,
type GeneratedRepositoryRevisionRecord,
type GeneratedRepositoryRuntimeServiceRecord,
type ... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.test.ts | TypeScript | 227cc587c1f1277ccb7f99076ffc2a9833b149de6f34e56a021767a454b96ade | 0 | 896 |
"screenshot",
descriptor: "artifacts/browser/homepage-desktop.png",
captureStatus: "captured",
byteLength: 14_232,
});
expect(metadata.expectedSignals).toEqual({
matchedCount: 2,
missingCount: 0,
signalKeys: ["main-heading", "main-landmark"],
});
expect(metadata.telem... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.test.ts | TypeScript | f3980f82f51c77c8840064aa132c694a554ac58a62788c483137fd4904a21774 | 1 | 896 |
markers", async () => {
const db = createRecordingDatabase({
browserSmokeRun: {
status: "console-error",
validity: "invalid",
failureSummary:
'Raw console log {"api-key":"top-secret-value"} from file://C:/Users/julia/project/.env.local in .planning via gsd-core and reference-... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.test.ts | TypeScript | 725e88b27138caa20591c7b06db0a82658ea4cab4cf8b72ef3900fafddf2e39d | 2 | 896 |
"homepage-screenshot"),
browserSmokeArtifactRecord("homepage-trace"),
]
: options.artifacts.map((artifact, index) =>
browserSmokeArtifactRecord(
artifact.artifactKey ?? (index === 0 ? "homepage-screenshot" : "homepage-trace"),
artifact,
)... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.test.ts | TypeScript | 65d07575834c843f26e478309fb9751db92d37961fe94425bf56d828ff43692c | 3 | 896 |
browserSmokeFixtureIds.sandboxExecution,
evidenceId: null,
evidenceOutputDescriptorId: null,
checkKey: "browser-smoke-check",
checkKind: "smoke verification",
commandKey: "smoke-verification-command",
commandKind: "smoke verification",
policyKey: "browser-smoke-re... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.test.ts | TypeScript | 47b6d73819f3ae7f8306f39d3621b17816889a6670e7d02df6b2eb4074678e6f | 4 | 896 |
<BrowserSmokeArtifactRecord> = {},
): BrowserSmokeArtifactRecord {
const timestamp = new Date(browserSmokeFixtureTimestamp);
const isTrace = artifactKey.includes("trace");
return {
id: isTrace ? "00000000-0000-4000-8000-000000004108" : "00000000-0000-4000-8000-000000004107",
browserSmokeRunId: browserSmo... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.test.ts | TypeScript | b85bd9b5b865b32706a148f698ba4b222c11f3480f7c6bf390ae2302a2e07b8c | 5 | 896 |
0000-4000-8000-000000000904",
taskAttempt: "00000000-0000-4000-8000-000000004100",
commandSpec: "00000000-0000-4000-8000-000000004101",
runtimeService: "00000000-0000-4000-8000-000000004102",
sandboxExecution: "00000000-0000-4000-8000-000000004103",
verificationRun: "00000000-0000-4000-8000-000000004104",
v... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.test.ts | TypeScript | f8a5c4d0585970c0718eac043ba0b6ead52ab76867c6db9c1f5e2db443820723 | 6 | 111 |
import { and, asc, eq, inArray } from "drizzle-orm";
import type { Database } from "../../db/client";
import {
type BrowserSmokeArtifactRecord,
type BrowserSmokeRunRecord,
type Evidence,
type GeneratedRepositoryRecord,
type GeneratedRepositoryRevisionRecord,
type GeneratedRepositoryRuntimeServiceRecord,
t... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.ts | TypeScript | 433d7ed1de7ca844de1b5981963bfd82f952e25d5e6c6c719266c3179ba69691 | 0 | 896 |
;
const evidenceInsert: EvidenceInsert = {
runId: input.runId,
taskId: context.browserSmokeRun.taskId,
artifactId: null,
citationId: null,
evidenceKey,
kind: "browser-smoke",
summary: buildEvidenceSummary(context.browserSmokeRun, evidenceState, metadata),
status: evidenceState.status,
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.ts | TypeScript | 053b87de8f204926d6556baf8de4b434ca99818ec698c2c4988dc8c4776ef2da | 1 | 896 |
?.serviceKey ?? null,
endpointDescriptor: safeDescriptorOrNull(input.runtimeService?.endpointDescriptor ?? null),
},
verification: {
verificationRunId: input.browserSmokeRun.verificationRunId,
verificationCheckId: input.browserSmokeRun.verificationCheckId,
verificationCheckKey: input.ver... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.ts | TypeScript | 3f81cd8036ee648ae19acb8b4c3c4d1148c030c791c7179cadbad1cd579d2202 | 2 | 896 |
(table.runId))) as readonly TRecord[];
return [...rows];
}
function selectBrowserSmokeRun(
rows: readonly BrowserSmokeRunRecord[],
input: CaptureBrowserSmokeEvidenceForRunInput,
): BrowserSmokeRunRecord | undefined {
const candidates = rows.filter((candidate) => {
if (candidate.runId !== input.runId) {
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.ts | TypeScript | 61280de3844c5fca84f3b61f7ca7a8f7f2346c091a2c722b0e553e861dbf45b3 | 3 | 896 |
isMobile: readBooleanOrNull(value, "isMobile"),
};
}
function safeDescriptorOrNull(value: string | null): string | null {
if (value === null || value.trim().length === 0 || containsUnsafeRuntimeMarker(value)) {
return null;
}
return value;
}
function sanitizeSummaryText(value: string): string {
return ... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.ts | TypeScript | 28dee4f426d72b450297193fbd675acf850f32f188c4424b1a8590fa95e431e1 | 4 | 896 |
): readonly string[] {
if (value === null || typeof value !== "object") {
return [];
}
const candidate = (value as JsonObject)[key];
if (!Array.isArray(candidate)) {
return [];
}
return candidate.filter((item): item is string => typeof item === "string");
}
function ensureRepositoryRevisionLink(
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/evidence.ts | TypeScript | fae3db33fb9cd5d75413dffc17117031bcc91913d84b083f5722f7d67a7d3a84 | 5 | 526 |
import type { GeneratedRepositoryContractRecords } from "../generated-repository/repository";
import type { SandboxExecutionRecordsForRun } from "../sandbox/repository";
import type { VerificationRecordsForRun } from "../verification/repository";
import type {
GeneratedRepositoryRecord,
GeneratedRepositoryRevisionR... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/fixtures.ts | TypeScript | 30f6fa8e10c85fe8fb8c65dd8cbae94aa70f3177e3fde110476e94e65f8a7aea | 0 | 896 |
: 128,
meaningfulElementCount: 12,
},
consoleMessages: [],
pageErrors: [],
requestFailures: [],
blankPageDetected: false,
severeLayoutFailureDetected: false,
artifacts: [
{
artifactKey: "homepage-screenshot",
kind: "screenshot",
descriptor: "artifacts/brow... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/fixtures.ts | TypeScript | a6da7c60eb268d6288385ad09e5de9422599f4f3f25e8cc310081fc113e763a1 | 1 | 896 |
,
revisions: revision,
commandSpecs: [],
runtimeServices: runtimeService,
dependencyLocks: [],
commandLogDescriptors: [],
evidenceOutputDescriptors: [],
limitationReports: [],
};
}
export function buildBrowserSmokeRunnerSandboxRecordsFixture(
options: {
readonly runId?: string;
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/fixtures.ts | TypeScript | 85b16345cd9aa7c9089af6cd6539974e3bc13ef2257ee0d6b760171013471323 | 2 | 896 |
expected",
reason: null,
metadata: {},
createdAt: timestamp,
updatedAt: timestamp,
...overrides,
} as GeneratedRepositoryRuntimeServiceRecord;
}
function buildRunnerSandboxExecutionRecord(
overrides: Partial<SandboxExecutionRecord> = {},
): SandboxExecutionRecord {
const timestamp = new Date(... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/fixtures.ts | TypeScript | 3a06056ad8b12de15676d1c2fc12732963b71ac883be764b5cbfacf3d0988bc3 | 3 | 723 |
export {
browserSmokeFixtureIds,
browserSmokeRunnerFixtureIds,
buildArtifactCaptureFailedBrowserSmokeAdapterResultFixture,
buildBlankPageBrowserSmokeAdapterResultFixture,
buildBrowserSmokeAdapterResultFixture,
buildBrowserSmokeFlowManifestFixture,
buildBrowserSmokeRunnerGeneratedRepositoryRecordsFixture,
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/index.ts | TypeScript | 8702554092326a316429a9f1393244ce17ff58f962e576411a2d4d8d1cdf60b2 | 0 | 230 |
import { readFile, readdir } from "node:fs/promises";
import { describe, expect, test } from "vitest";
import { classifyBrowserSmokeResult } from "./classifier";
import { buildBrowserSmokeFlowManifestFixture } from "./fixtures";
import { createPlaywrightBrowserSmokeAdapter } from "./playwright-adapter";
import type {
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.test.ts | TypeScript | 8200080eb76159dcef4b9f8b54f776d853c923c7b92cfa69c4f4fe388e889ca7 | 0 | 896 |
: null,
});
expect(result.signalObservations).toEqual([
{
signalKey: "main-heading",
matched: true,
visible: true,
boundingBox: { width: 320, height: 44 },
textSummary: "Diplomarbeit OS Demo",
},
{
signalKey: "main-landmark",
matched: tru... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.test.ts | TypeScript | 2be46d60510b61e6876816d2e2e139c96cc5482a6bb6b5af5ce7750cc63aba3e | 1 | 896 |
,
context: new FakePlaywrightContext(),
resolveSandboxBaseUrl: () => "http://127.0.0.1:4173",
artifactOutput: completeArtifactOutput(),
now: stableNow(),
});
const result = await adapter.runSmokeFlow(buildBrowserSmokeFlowManifestFixture());
expect(result.requestFailures).toEqual([
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.test.ts | TypeScript | d2772b228f885b49ef8a3e7416f46baa2460b265eb2482cb2cfc807f2dbd929a | 2 | 896 |
OS Demo [redacted-secret]",
);
});
test("records screenshot and trace capture failures instead of hiding them", async () => {
const page = new FakePlaywrightPage();
page.screenshotError = new Error("screenshot target rejected write");
page.bodyText = "Diplomarbeit OS Demo";
page.meaningfulEleme... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.test.ts | TypeScript | ff14075d44214a8f8f7ee8977a290eb87a1c977fb0ff52b25d75caec06739d51 | 3 | 896 |
.url);
const files = await readdir(directory);
const nonTestSources = files.filter(
(file) => file.endsWith(".ts") && !file.endsWith(".test.ts"),
);
const playwrightImporters: string[] = [];
for (const file of nonTestSources) {
const source = await readFile(new URL(file, directory), "ut... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.test.ts | TypeScript | df6e96a5ca1200a918f618e0003616cbe031cd926535b46074c6f752695971cf | 4 | 896 |
.viewportSizeCalls.push(size);
}
viewportSize() {
return this.viewportSizeCalls.at(-1) ?? null;
}
async goto(url: string, options: { timeout?: number } = {}): Promise<unknown> {
this.gotoCalls.push({ url, timeout: options.timeout });
this.finalUrl = url;
this.onGoto?.();
return this.gotoRe... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.test.ts | TypeScript | 5d27664560613460092667b3baaf42379b856b252cfb61ecb53f107029626eb4 | 5 | 872 |
import type { BrowserContext, ConsoleMessage, Locator, Page, Request } from "@playwright/test";
import type {
BrowserSmokeAdapter,
BrowserSmokeAdapterResult,
BrowserSmokeArtifactDescriptor,
BrowserSmokeArtifactKind,
BrowserSmokeConsoleLevel,
BrowserSmokeConsoleMessage,
BrowserSmokeFlowManifest,
BrowserS... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.ts | TypeScript | 9717a4c5815de101d74e22282cf5d518f93959d7ffca354c1504fadc425f30dc | 0 | 896 |
}`,
flowKey: manifest.flowKey,
revisionKey: manifest.revisionKey,
target: manifest.target,
availabilityStatus: "available",
finalUrlDescriptor: buildFinalUrlDescriptor(manifest.target),
viewport: resolveViewport(page, manifest.viewport),
signalObservations,
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.ts | TypeScript | 3eb15e010246ffbe3e36e814f0e666656195a64d21f329737b0d23a7b510f352 | 1 | 896 |
;
if (
resourceType === null ||
!manifest.networkPolicy.failOnResourceTypes.includes(resourceType)
) {
return;
}
pushBounded(requestFailures, {
requestKey: `${resourceType}-${requestFailures.length + 1}`,
resourceType,
urlDescriptor: buildRequestUrlDescriptor(manifes... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.ts | TypeScript | 87d8b0204518daca36c5c1404338decb6633901967ce57fc837734e4ff72afd4 | 2 | 896 |
= null ? undefined : { name: signal.expectedText },
);
}
if (signal.kind === "landmark") {
return page.getByRole((signal.role ?? "main") as PlaywrightRole);
}
if (signal.kind === "role") {
if (signal.role === null) {
throw new Error(`Expected UI role signal is missing a role: ${signal.signalKe... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.ts | TypeScript | 449512f5b1228cfac27722009f825f7322dc9024b5df0a87ff8f6305dc17fa3f | 3 | 896 |
if (failedArtifactDescriptor === undefined) {
return null;
}
return `Browser smoke artifact capture failed: ${failedArtifactDescriptor.artifactKey}.`;
}
function isBlankPage(
pageSummary: BrowserSmokeAdapterResult["pageSummary"],
signalObservations: readonly BrowserSmokeSignalObservation[],
): boolean {
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/playwright-adapter.ts | TypeScript | bfe1cb63c7bf2b89a1ff7da512208b8c5ba801b8b78f45ba2a9c8865560bc4d5 | 4 | 816 |
import { describe, expect, it } from "vitest";
import type { BrowserSmokeArtifactRecord, BrowserSmokeRunRecord } from "../../db/schema";
import type { BrowserSmokeRecordsForRun } from "./repository";
import { buildBrowserSmokeEvidenceSummary, emptyBrowserSmokeEvidenceSummary } from "./read-model";
const runId = "00000... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/read-model.test.ts | TypeScript | 5ce5827627f6f227d7264b3b95c8837bb7531540f0926313086d6795faa91c74 | 0 | 896 |
`,
smokeRunKey: `browser-smoke:rev-1:${status}`,
flowKey: status,
status,
validity: "invalid",
completedAt: new Date(`2026-06-26T10:0${index}:00.000Z`),
failureSummary: `${status} summary raw console token SECRET network body http://127.0.0.1:3000/private`,
... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/read-model.test.ts | TypeScript | 88a8746b6170028ea7d877b3aa04f261afab5fd0a593b2673f0fdc3efe03187b | 1 | 896 |
});
expect(summary).toMatchObject({
latestStatus: "passed",
latestScreenshotDescriptorKey: "landing-new:screenshot",
latestTraceDescriptorKey: "landing-new:trace",
productEvidence: {
evidenceId: newerEvidenceId,
status: "captured",
validity: "valid",
},
});... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/read-model.test.ts | TypeScript | b317807d6b7affbcaef81275af9ed4fa4513154b4916255322e796c3dcf04ff1 | 2 | 740 |
import type { EvidenceStatus, ValidityState } from "../state/types";
import type { BrowserSmokeRecordsForRun } from "./repository";
type BrowserSmokeRunRecord = BrowserSmokeRecordsForRun["browserSmokeRuns"][number];
type BrowserSmokeArtifactRecord = BrowserSmokeRecordsForRun["browserSmokeArtifacts"][number];
export t... | diplomarbeit-os | apps/studio/src/domain/browser-evidence/read-model.ts | TypeScript | 5a5369b0722ef8f04004cf825da6fcad0b8122dea2e75216d024ad4f529cfaa2 | 0 | 896 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.