fix(code-queue): add active-run liveness diagnostics

This commit is contained in:
Codex
2026-05-19 03:48:17 +00:00
parent f36ea37548
commit 2a45bfe180
13 changed files with 561 additions and 17 deletions
+18
View File
@@ -3,6 +3,7 @@ import { connect } from "node:net";
import { join } from "node:path";
import { chromium, type Page } from "playwright";
import { createRouteRegistry, MODULES } from "../../src/components/frontend/src/navigation";
import { CODE_QUEUE_LIVENESS_CHECK_NAMES, runCodeQueueLivenessFixtureChecks } from "./code-queue-liveness-fixtures";
import { runCommand } from "./command";
import { type UniDeskConfig, repoRoot, rootPath } from "./config";
import { boundedJsonDetail } from "./preview";
@@ -166,11 +167,14 @@ const FRONTEND_CHECK_NAMES = [
"frontend:no-console-errors",
] as const;
const CODE_QUEUE_FIXTURE_CHECK_NAMES = [...CODE_QUEUE_LIVENESS_CHECK_NAMES] as const;
const ALL_E2E_CHECK_NAMES = [
...NETWORK_CHECK_NAMES,
...SERVICE_CHECK_NAMES,
...DATABASE_CHECK_NAMES,
...FRONTEND_CHECK_NAMES,
...CODE_QUEUE_FIXTURE_CHECK_NAMES,
] as const;
function uniqueText(values: string[]): string[] {
@@ -552,6 +556,14 @@ function addSelectedCheck(checks: E2ECheck[], options: E2ERunOptions, name: stri
addCheck(checks, name, passed, detail);
}
function codeQueueFixtureChecks(checks: E2ECheck[], options: E2ERunOptions): void {
const selected = CODE_QUEUE_FIXTURE_CHECK_NAMES.filter((name) => wantsCheck(options, name));
const result = runCodeQueueLivenessFixtureChecks(selected);
for (const check of result.checks) {
addSelectedCheck(checks, options, check.name, check.ok, check.detail);
}
}
function safeTestId(value: string): string {
return value.replace(/[^a-zA-Z0-9_-]/g, "_");
}
@@ -3420,8 +3432,14 @@ export async function runE2E(
const needDatabase = wantsPrefix(options, "database")
|| wantsCheck(options, "frontend:task-history-diagnostics");
const needFrontend = wantsPrefix(options, "frontend");
const needCodeQueueFixtures = wantsAnyCheck(options, [...CODE_QUEUE_FIXTURE_CHECK_NAMES]);
const executedSections: string[] = [];
if (needCodeQueueFixtures) {
executedSections.push("code-queue-fixtures");
codeQueueFixtureChecks(checks, options);
}
if (needNetwork) {
executedSections.push("network");
await exposureChecks(config, urls, checks, options);