diff --git a/src/native/AppleDispatchMetadata.failure.test.ts b/src/native/AppleDispatchMetadata.failure.test.ts index 11d187ac97..8c9a36141a 100644 --- a/src/native/AppleDispatchMetadata.failure.test.ts +++ b/src/native/AppleDispatchMetadata.failure.test.ts @@ -2,19 +2,18 @@ import { expect, it } from "vitest"; import { ArtifactReaderFailure } from "../artifacts/ArtifactReader.js"; import { appleDispatchMetadataFailure } from "./AppleDispatchMetadata.js"; +// The metadata target is already bound, so losing it is a change to that artifact rather than a new input error. it.each(["integrity", "path"] as const)( - "keeps %s source-read refusals distinct from provider execution failures", + "reports a %s source-read refusal as a change to the bound target, not a provider failure", (reason) => { const cause = new ArtifactReaderFailure(reason, "source boundary refused"); expect(appleDispatchMetadataFailure(cause, "/selected")._tag).toBe( - reason === "integrity" - ? "AnalysisArtifactChangedError" - : "AnalysisInputError", + "AnalysisArtifactChangedError", ); }, ); it.each(["EACCES", "EPERM", "ENOENT"])( - "preserves the filesystem outcome %s for a selected metadata target", + "preserves the filesystem outcome %s for a bound metadata target", (code) => { const physical = Object.assign(new Error("selected read refused"), { code, @@ -23,7 +22,9 @@ it.each(["EACCES", "EPERM", "ENOENT"])( cause: physical, }); expect(appleDispatchMetadataFailure(cause, "/selected")._tag).toBe( - code === "ENOENT" ? "AnalysisInputError" : "AnalysisAccessDeniedError", + code === "ENOENT" + ? "AnalysisArtifactChangedError" + : "AnalysisAccessDeniedError", ); }, ); diff --git a/tests/boundary/cli/nativePlistCli.test.ts b/tests/boundary/cli/nativePlistCli.test.ts index 9f0648c802..192f2337ab 100644 --- a/tests/boundary/cli/nativePlistCli.test.ts +++ b/tests/boundary/cli/nativePlistCli.test.ts @@ -281,7 +281,17 @@ describe.skipIf(process.platform !== "darwin")( ], }, bundle: { identifier: "com.example.types", executable: "App" }, - provenance: [{ tool: "file" }], + // An XML source also records its successful native format validation. + provenance: + format === "xml" + ? [ + { tool: "file" }, + { + tool: "plutil", + command: ["/usr/bin/plutil", "-lint", "--", "$PLIST"], + }, + ] + : [{ tool: "file" }], limitations: [expect.stringContaining("2 non-finite real")], }, }); diff --git a/tests/boundary/mcp/deferredRuntime.test.ts b/tests/boundary/mcp/deferredRuntime.test.ts index 3718f20650..14196fe55b 100644 --- a/tests/boundary/mcp/deferredRuntime.test.ts +++ b/tests/boundary/mcp/deferredRuntime.test.ts @@ -619,8 +619,13 @@ it("runs the real static artifact workflow after deferred initialization", async const copyCompiledPackage = async (prefix: string): Promise => { const directory = await createTestTempDirectory(prefix); await cp(resolve("dist"), join(directory, "dist"), { recursive: true }); - await mkdir(join(directory, "scripts")); + await mkdir(join(directory, "scripts/lib"), { recursive: true }); await cp(resolve("scripts/rea.mjs"), join(directory, "scripts/rea.mjs")); + // The launcher imports its process-environment owner, as the package ships it. + await cp( + resolve("scripts/lib/cli-process-environment.mjs"), + join(directory, "scripts/lib/cli-process-environment.mjs"), + ); await cp(resolve("package.json"), join(directory, "package.json")); await symlink( resolve("node_modules"), diff --git a/tests/boundary/process/packageTarListing.test.ts b/tests/boundary/process/packageTarListing.test.ts index e876811bac..02a84327c7 100644 --- a/tests/boundary/process/packageTarListing.test.ts +++ b/tests/boundary/process/packageTarListing.test.ts @@ -25,6 +25,7 @@ const members = [ "package/bridge/ghidra/ReaGhidraAnalysisOptions.java", "package/bridge/ghidra/ReaGhidraNoReturnFix.java", "package/bridge/ghidra/ReaGhidraMipsSoftFloat.java", + "package/scripts/lib/cli-process-environment.mjs", ]; async function verifyListing(listing: string) {