mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-22 12:26:08 +00:00
test(agent-runner): strengthen local agent e2e gate
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user