From df3d96da801976fdbe37a726c2f4f84af8ffbf90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E4=BD=B3=E6=B5=A9Alben?= <35291372+XiaoBinGan@users.noreply.github.com> Date: Wed, 14 Oct 2026 00:31:27 +0800 Subject: [PATCH] fix: repair the static-check failures on the default branch (#2895) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: repair the static-check failures on the default branch The default branch fails its own required `Static checks` job three ways, so every pull request reports that job as failed regardless of its own change. - `npm run format:check` reports `src/domain/functionComparison.test.ts` and `src/ida/IdaOperationRunner.ts`. - `npm run lint` reports a duplicate `import { join } from "node:path"` in `tests/boundary/mcp/ghidraInventoryMcp.test.ts` (lines 4 and 17). - `npm run typecheck` reports `format: "devin"` missing from the client format union in `src/application/SupportedClients.ts`, and an unchecked index in `tests/boundary/cli/clientProfileLifecycle.test.ts`, whose pair array is inferred as `string[][]`. Apply the pinned formatter, drop the duplicate import, list the `"devin"` format that its own definition already uses, and mark the pair array `as const`. Validation: `npm run check:fast` and `npm run format:check` pass. * fix(setup): keep Devin on the JSON configuration dialect --------- Co-authored-by: 吴佳浩 Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> --- src/application/SupportedClients.ts | 2 +- src/domain/functionComparison.test.ts | 4 +++- src/ida/IdaOperationRunner.ts | 3 ++- tests/boundary/cli/clientProfileLifecycle.test.ts | 2 +- tests/boundary/mcp/ghidraInventoryMcp.test.ts | 1 - 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/application/SupportedClients.ts b/src/application/SupportedClients.ts index 7c3811a23..55a651a52 100644 --- a/src/application/SupportedClients.ts +++ b/src/application/SupportedClients.ts @@ -539,7 +539,7 @@ export const SUPPORTED_CLIENT_DEFINITIONS = [ configPath: ({ home, platform, env }: ClientPathContext) => join(devinDirectory({ home, platform, env }), "mcp_config.json"), markerPath: devinDirectory, - format: "devin", + format: "json", }, { name: "opencode", diff --git a/src/domain/functionComparison.test.ts b/src/domain/functionComparison.test.ts index 7170f098b..16f8282c9 100644 --- a/src/domain/functionComparison.test.ts +++ b/src/domain/functionComparison.test.ts @@ -175,7 +175,9 @@ describe("function comparison normalized identity", () => { it("retains unresolved call details alongside missing facet coverage", () => { const value: Record = { ...dossier("return 0;", "0x1000"), - unresolved_calls: [{ address: "0x1010", reason: "Unknown indirect target" }], + unresolved_calls: [ + { address: "0x1010", reason: "Unknown indirect target" }, + ], }; delete value.facet_availability; const legacy = observe("a", functionDossierSchema.parse(value), "ida"); diff --git a/src/ida/IdaOperationRunner.ts b/src/ida/IdaOperationRunner.ts index 647b06e52..576dac1e7 100644 --- a/src/ida/IdaOperationRunner.ts +++ b/src/ida/IdaOperationRunner.ts @@ -503,7 +503,8 @@ export class IdaOperationRunner { items: [], availability: { available: false, - reason: "Upstream xrefs do not establish direct caller relationships.", + reason: + "Upstream xrefs do not establish direct caller relationships.", }, coverage: { status: "unknown", diff --git a/tests/boundary/cli/clientProfileLifecycle.test.ts b/tests/boundary/cli/clientProfileLifecycle.test.ts index 8a71b669d..1ceaf49cd 100644 --- a/tests/boundary/cli/clientProfileLifecycle.test.ts +++ b/tests/boundary/cli/clientProfileLifecycle.test.ts @@ -290,7 +290,7 @@ cliTest("uninstall names each retained skill directory", async ({ cli }) => { for (const [client, directory] of [ ["shared", shared], ["claude_code", claude], - ]) { + ] as const) { expect(skill?.detail).toContain( `${client} (${directory}): retained (Skill manifest is not REA-owned.)`, ); diff --git a/tests/boundary/mcp/ghidraInventoryMcp.test.ts b/tests/boundary/mcp/ghidraInventoryMcp.test.ts index ecd331816..ac42b9388 100644 --- a/tests/boundary/mcp/ghidraInventoryMcp.test.ts +++ b/tests/boundary/mcp/ghidraInventoryMcp.test.ts @@ -14,7 +14,6 @@ import { } from "./ghidraMcpHarness.js"; import { spawn } from "node:child_process"; import { mkdir } from "node:fs/promises"; -import { join } from "node:path"; import { fileURLToPath } from "node:url"; import { Client, InMemoryTransport } from "@modelcontextprotocol/client"; import { GhidraClient } from "../../../src/ghidra/GhidraClient.js";