


























@@ -119,6 +119,8 @@ type SlackQaScenarioDefinition = LiveTransportScenarioDefinition<SlackQaScenario
119119configOverrides?: SlackQaConfigOverrides;
120120};
121121122+type SlackQaGatewayHarness = Awaited<ReturnType<typeof startQaLiveLaneGateway>>;
123+122124type SlackAuthIdentity = {
123125botId?: string;
124126teamId?: string;
@@ -1718,6 +1720,16 @@ function renderSlackQaMarkdown(params: {
17181720return lines.join("\n");
17191721}
172017221723+async function preserveSlackGatewayDebugArtifacts(params: {
1724+cleanupIssues: string[];
1725+gatewayDebugDirPath: string;
1726+gatewayHarness: SlackQaGatewayHarness;
1727+}) {
1728+await params.gatewayHarness.stop({ preserveToDir: params.gatewayDebugDirPath }).catch((error) => {
1729+appendLiveLaneIssue(params.cleanupIssues, "gateway debug preservation failed", error);
1730+});
1731+}
1732+17211733export async function runSlackQaLive(params: {
17221734alternateModel?: string;
17231735credentialRole?: string;
@@ -1789,7 +1801,7 @@ export async function runSlackQaLive(params: {
17891801for (const scenario of scenarios) {
17901802let scenarioAttempt = 1;
17911803while (true) {
1792-let gatewayHarness: Awaited<ReturnType<typeof startQaLiveLaneGateway>> | undefined;
1804+let gatewayHarness: SlackQaGatewayHarness | undefined;
17931805try {
17941806assertLeaseHealthy();
17951807gatewayHarness = await startQaLiveLaneGateway({
@@ -1971,11 +1983,11 @@ export async function runSlackQaLive(params: {
19711983});
19721984preservedGatewayDebugArtifacts = true;
19731985if (gatewayHarness) {
1974-await gatewayHarness
1975-.stop({ keepTemp: true, preserveToDir: gatewayDebugDirPath })
1976-.catch((stopError) => {
1977- appendLiveLaneIssue(cleanupIssues, "gateway debug preservation failed", stopError);
1978- });
1986+await preserveSlackGatewayDebugArtifacts({
1987+cleanupIssues,
1988+gatewayDebugDirPath,
1989+gatewayHarness,
1990+});
19791991}
19801992break;
19811993} finally {
@@ -2114,6 +2126,7 @@ export const testing = {
21142126 findScenario,
21152127 isSlackChannelReadyForQa,
21162128 parseSlackQaCredentialPayload,
2129+ preserveSlackGatewayDebugArtifacts,
21172130 resolveSlackChannelReadySince,
21182131 resolveSlackApprovalCheckpointConfig,
21192132 resolveApprovalDecision,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。