fix: resolve runtime, review, channel and chat state failures

Keep remote startup cancellable without blocking other sessions and surface local OpenCode submission failures promptly. Preserve supervisor project isolation, pause behavior and valid story destinations.

Restore generated-image channel delivery, Telegram reconnection on unchanged Save and DingTalk business-error retries. Preserve virtualized message disclosures using sparse state and release stale supervisor UI requests.

Add production-path regressions, Electron checks, isolated SQLite validation and audit evidence. Fix the SDK cleanup test fixture lifetime under garbage collection without weakening its assertions.

Validation: 6136 tests passed, 87 skipped; typecheck, lint and diff checks passed. Seven real text-model calls, current-source Linux x64 Host scenarios and large-history Electron comparisons completed.

Release note: Fix stuck runtime requests, inconsistent review results and channel delivery failures, and retain expanded details while browsing long conversations. Remote runtime fixes require an Agent build containing these changes.
This commit is contained in:
mesalogo
2026-10-05 10:25:43 +08:00
parent 126dbc57e2
commit bbf24c282a
49 changed files with 1710 additions and 106 deletions
+11 -2
View File
@@ -2559,6 +2559,7 @@ export class OpenCodeRuntime implements AgentRuntime {
const submittedChecklistCalls = new Set<string>();
const pendingChecklistUpdates: RuntimeChecklist[] = [];
let runFailed = false;
let submissionFailure: { error: unknown } | undefined;
try {
const promptText = promptWithUntrustedConversationHistory(
request,
@@ -2643,7 +2644,15 @@ export class OpenCodeRuntime implements AgentRuntime {
),
signal,
);
prompt.catch(() => undefined);
void prompt.then((result) => {
if (result.error) {
throw new Error(opencodeErrorMessage(result.error, "OpenCode 提交请求失败"));
}
}).catch((error: unknown) => {
submissionFailure = { error };
// Wake a silent SSE reader without cancelling any peer subscription.
subscriptionController.abort(error);
});
const repliedPermissionIds = new Set<string>();
const ownedSessions = new Set([sessionId]);
@@ -3174,7 +3183,7 @@ export class OpenCodeRuntime implements AgentRuntime {
}
}
}
throw error;
throw submissionFailure?.error ?? error;
} finally {
signal.removeEventListener("abort", abortSession);
// Keep the conversation locked until its session-wide abort settles.