test(e2e): harden extended coverage state assertions (#2245)

* test(e2e): harden extended coverage contracts

* docs(testing): add e2e hardening status

* fix(web): persist artifact chips after daemon runs

* ci: install playwright browsers for e2e vitest

* Fix daemon run recovery across reloads

Pin daemon-created runs to assistant messages immediately so hard reloads before the create response can reattach.

Replay terminal and active run events from the beginning on reload so restored turns keep assistant text, thinking events, produced files, and artifacts.

Fixes #2366

Fixes #2368

Fixes #2371

* test(e2e): preserve fake runtime selection across reload

* fix(web): scope daemon run recovery to daemon mode

* fix(e2e): remove duplicate delayed smoke flag

* fix(web): scope replay artifact recovery to current run

* fix(daemon): remove duplicate run-create pin
This commit is contained in:
shangxinyu1
2026-05-20 16:21:01 +08:00
committed by GitHub
parent 579db9e8c7
commit 71044bd3d6
18 changed files with 1308 additions and 69 deletions
+20 -1
View File
@@ -138,8 +138,12 @@ async function emitRun(promptText) {
emitFailure();
return;
}
const isChunked = promptText.includes('Create a chunked deterministic smoke artifact');
if (promptText.includes('Return an empty daemon smoke response')) {
emitEmptySuccess();
return;
}
const isDelayed = promptText.includes('Create a delayed deterministic smoke artifact');
const isChunked = promptText.includes('Create a chunked deterministic smoke artifact');
const isFollowUp = promptText.includes('Create a follow-up deterministic smoke artifact');
const isDefaultSmoke = promptText.includes('Create a deterministic smoke artifact');
const isOrbit = promptText.includes("Create today's Orbit daily digest as a Live Artifact.");
@@ -330,6 +334,21 @@ function emitFailure() {
exitSoon(1);
}
}
function emitEmptySuccess() {
switch (agentId) {
case 'codex':
writeJson({ type: 'thread.started' });
writeJson({ type: 'turn.started' });
writeJson({ type: 'turn.completed', usage: { input_tokens: 1, output_tokens: 0 } });
process.exitCode = 0;
exitSoon(0);
return;
default:
process.exitCode = 0;
exitSoon(0);
}
}
}
`;
}
+10
View File
@@ -10,6 +10,12 @@ export interface MockArtifactScenario {
heading: string;
}
export interface ExpectedScenarioFile {
kind?: string;
name: string;
previewText?: string;
}
export interface UiScenario {
id: string;
title: string;
@@ -52,6 +58,10 @@ export interface UiScenario {
prompt: string;
secondaryPrompt?: string;
mockArtifact?: MockArtifactScenario;
expectedProjectMetadata?: Record<string, unknown>;
expectedRunRequest?: Record<string, unknown>;
expectedFiles?: ExpectedScenarioFile[];
expectedPreviewText?: string;
notes?: string[];
}