fix: clear typecheck backlog

This commit is contained in:
Peter Steinberger
2026-03-13 22:08:54 +00:00
parent a66a0852bb
commit d0337a18b6
10 changed files with 63 additions and 46 deletions

View File

@@ -1,6 +1,7 @@
import fs from "node:fs/promises";
import path from "node:path";
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
import type { RuntimeEnv } from "../runtime.js";
import { makeTempWorkspace } from "../test-helpers/workspace.js";
import { captureEnv } from "../test-utils/env.js";
import { createThrowingRuntime, readJsonFile } from "./onboard-non-interactive.test-helpers.js";
@@ -408,11 +409,17 @@ describe("onboard (non-interactive): gateway and remote auth", () => {
}));
let capturedError = "";
const runtimeWithCapture = {
const runtimeWithCapture: RuntimeEnv = {
log: () => {},
error: (message: string) => {
capturedError = message;
throw new Error(message);
error: (...args: unknown[]) => {
const firstArg = args[0];
capturedError =
typeof firstArg === "string"
? firstArg
: firstArg instanceof Error
? firstArg.message
: (JSON.stringify(firstArg) ?? "");
throw new Error(capturedError);
},
exit: (_code: number) => {
throw new Error("exit should not be reached after runtime.error");

View File

@@ -34,6 +34,7 @@ import {
} from "./invoke-system-run-plan.js";
import type {
ExecEventPayload,
ExecFinishedResult,
ExecFinishedEventParams,
RunResult,
SkillBinsProvider,

View File

@@ -17,7 +17,6 @@ vi.mock("../../../pairing/pairing-store.js", () => ({
}));
type MessageHandler = (args: { event: Record<string, unknown>; body: unknown }) => Promise<void>;
type AppMentionHandler = MessageHandler;
type RegisteredEventName = "message" | "app_mention";
type MessageCase = {