test(agent-runner): strengthen local agent e2e gate

This commit is contained in:
huanghuoguoguo
2026-07-01 20:20:43 +08:00
parent d0f8f080e9
commit 995888f6b2
44 changed files with 5678 additions and 1040 deletions
@@ -11,6 +11,7 @@ import {
} from "./lib/debug-chat.mjs";
import {
createBrowser,
ensureAuthenticatedBrowser,
ensureEvidence,
evidencePaths,
exitCode,
@@ -74,6 +75,7 @@ const result = {
pipeline_config: null,
debug_chat_reset: null,
tool_diagnostic: null,
browser_auth: null,
steering: null,
evidence: {
console_log: paths.consoleLog,
@@ -95,6 +97,18 @@ try {
browser = await createBrowser(paths);
const { page } = browser;
const authDiagnostic = await ensureAuthenticatedBrowser(page, {
frontendUrl: env.LANGBOT_FRONTEND_URL || "",
backendUrl,
});
result.browser_auth = authDiagnostic;
if (!result.evidence_collected.includes("api_diagnostic")) result.evidence_collected.push("api_diagnostic");
if (authDiagnostic.status === "env_issue" || authDiagnostic.status === "blocked" || authDiagnostic.status === "fail") {
result.status = authDiagnostic.status;
result.reason = authDiagnostic.reason || "Browser authentication failed.";
throw new Error(result.reason);
}
const openResult = await openPipelineDebugChat(page, {
pipelineUrl,
pipelineName,