diff --git a/docs/specs/v8/code-cache-inspection/spec.md b/docs/specs/v8/code-cache-inspection/spec.md index 40457aa79b..8dbb879e9e 100644 --- a/docs/specs/v8/code-cache-inspection/spec.md +++ b/docs/specs/v8/code-cache-inspection/spec.md @@ -55,8 +55,6 @@ through the `inspect_v8_code_cache` MCP tool. covers the bit's meaning and not a cache from that producer. - The CLI, MCP, absolute-path and decimal-argument boundary contracts have their own tests. -- The budget tests call `observationBudgetRecovery` and assert its structured facts — the - boundary reached and which knob may move. `observationBudgetRemediation` renders that - struct into a sentence, so it is held to the struct rather than to its wording: the - sentence must not advise a knob the struct closed, and must mention a smaller artifact - exactly when the struct requires one. Rewording stays free; wrong advice does not. +- Budget tests pin the structured exhaustion facts and verify that recovery only + recommends admitted changes. When both options are at their ceilings, the + recovery directs the caller to a smaller artifact. diff --git a/src/v8/V8CodeCache.errors.ts b/src/v8/V8CodeCache.errors.ts index 762651c5dd..114293e835 100644 --- a/src/v8/V8CodeCache.errors.ts +++ b/src/v8/V8CodeCache.errors.ts @@ -1,45 +1,2 @@ -import { decodeLimit, ParseFailureError } from "../domain/parseFailure.js"; -import type { V8CodeCacheInputBudget } from "../domain/v8/v8CodeCacheBudget.js"; - /** The ParseFailure format of V8 code cache containers. */ export const V8_CODE_CACHE_FORMAT = "v8-code-cache"; - -export type V8CodeCacheBudgetBoundary = keyof V8CodeCacheInputBudget; - -export interface V8CodeCacheBudgetLimit { - readonly boundary: V8CodeCacheBudgetBoundary; - readonly limit: number; - readonly message: string; -} - -const V8_CODE_CACHE_BUDGET_BOUNDARIES = new Set([ - "max_strings", - "min_string_bytes", -]); - -/** A caller-selected budget was exceeded while scanning the payload. */ -export const v8CodeCacheBudgetFailure = ( - boundary: V8CodeCacheBudgetBoundary, - limit: number, - message: string, -): ParseFailureError<"limit"> => - decodeLimit(V8_CODE_CACHE_FORMAT, message, { - name: boundary, - maximum: limit, - }); - -export const v8CodeCacheBudgetLimitOf = ( - cause: unknown, -): V8CodeCacheBudgetLimit | undefined => - cause instanceof ParseFailureError && - cause.failure.kind === "limit" && - cause.failure.format === V8_CODE_CACHE_FORMAT && - V8_CODE_CACHE_BUDGET_BOUNDARIES.has( - cause.failure.limit.name as V8CodeCacheBudgetBoundary, - ) - ? { - boundary: cause.failure.limit.name as V8CodeCacheBudgetBoundary, - limit: cause.failure.limit.maximum, - message: cause.failure.detail, - } - : undefined; diff --git a/src/v8/V8CodeCacheParser.test.ts b/src/v8/V8CodeCacheParser.test.ts index 2d62660e33..01b3df2208 100644 --- a/src/v8/V8CodeCacheParser.test.ts +++ b/src/v8/V8CodeCacheParser.test.ts @@ -93,43 +93,24 @@ it("reports the source length the producer recorded", () => { expect(report.header.fields[2]?.value).toBe(cache.readUInt32LE(8)); }); -it("reports a module cache as a module rather than a script", () => { - // Bit 30 of the source-length word marks `vm.SourceTextModule` output. Measured on - // Node 24.22.1: a real module cache reads `0x40000013` for a 19-unit source while a - // script of the same length reads `0x00000013`, so a producer check that only tests - // the function bit reports the module cache as a plain script. - const script = v8CodeCacheFixture(); - const word = script.readUInt32LE(8); - const length = word & 0x1fffffff; - expect(word & 0x40000000).toBe(0); - expect(word & 0x20000000).toBe(0); - expect(parse(script).header.producer).toBe("unknown"); - - const moduleCache = withHeaderWord(script, 2, word | 0x40000000); - const report = parse(moduleCache); - expect(report.header.producer).toBe("module"); - // The module bit sits outside the source-length mask, so the length is unchanged. - expect(report.header.source_length).toBe(length); -}); - -it("keeps the function and module flags distinct", () => { - const script = v8CodeCacheFixture("var y = 1;"); - const length = script.readUInt32LE(8) & 0x1fffffff; - expect( - parse(withHeaderWord(script, 2, 0x20000000 | length)).header.producer, - ).toBe("compile_function"); - expect( - parse(withHeaderWord(script, 2, 0x40000000 | length)).header.producer, - ).toBe("module"); - // V8 before 13.4 (Node 22's 12.4) marks a module with bit 31: `0x80000017` on Electron 30. - const legacy = parse(withHeaderWord(script, 2, 0x80000000 | length)).header; - expect([legacy.producer, legacy.source_length]).toEqual(["module", length]); - // Both bits set is not a shape V8 produces; the module flag wins so the reported - // family stays one of the three observed kinds. - expect( - parse(withHeaderWord(script, 2, 0x60000000 | length)).header.producer, - ).toBe("module"); -}); +it.each([ + [0x20000000, "compile_function"], + [0x40000000, "module"], + [0x80000000, "module"], + [0x60000000, "module"], +] as const)( + "interprets producer flags %i without changing source length", + (flags, producer) => { + // Older V8 uses bit 31 for modules. A synthetic word with both bits set + // checks that the module marker wins over the function marker. + const sourceLength = 19; + const cache = withHeaderWord(real, 2, flags | sourceLength); + expect(parse(cache).header).toMatchObject({ + producer, + source_length: sourceLength, + }); + }, +); it("separates the compileFunction producer bit from the source length", () => { const source = "return 7;"; @@ -146,7 +127,6 @@ it("separates the compileFunction producer bit from the source length", () => { (word & 0x20000000) === 0 ? "unknown" : "compile_function", ); // The source length is the low bits either way, so it is the part that must hold. - expect(report.header.source_length).toBe(word & 0x1fffffff); expect(report.header.source_length).toBe(source.length); }); @@ -191,32 +171,12 @@ it("fails closed on a foreign magic", () => { ); }); -it("fails closed on a payload-length mismatch", () => { - const corrupt = withHeaderWord(real, 5, real.readUInt32LE(20) + 8); - expect(() => parse(corrupt)).toThrow( - expect.objectContaining({ - kind: "malformed", - message: expect.stringContaining("truncated or corrupt"), - }), - ); -}); - it("fails closed on a truncated header", () => { expect(() => parse(real.subarray(0, V8_CODE_CACHE_NARROW_HEADER_BYTES - 1)), ).toThrow(expect.objectContaining({ kind: "malformed" })); }); -it("fails closed when fewer payload bytes follow the header than it declares", () => { - // Cut bytes off the end without rewriting the declared payload length. - expect(() => parse(real.subarray(0, real.length - 16))).toThrow( - expect.objectContaining({ - kind: "malformed", - message: expect.stringContaining("truncated or corrupt"), - }), - ); -}); - it("treats the observed header as version-dependent rather than a fixed ABI", () => { // A producer with a different build constant and version hash is still admitted: only // the magic high half and the payload-length relation gate admission. @@ -307,9 +267,11 @@ it("refuses a wide container that is only four bytes short", () => { const short = real.subarray(0, real.length - 4); expect(short.readUInt32LE(28)).toBe(0); expect(() => parse(short)).toThrow( - expect.objectContaining({ kind: "malformed" }), + expect.objectContaining({ + kind: "malformed", + message: expect.stringContaining("ambiguous"), + }), ); - expect(() => parse(short)).toThrow(/ambiguous/u); // A synthetic narrow fixture has payload at the same byte offset. const narrow = withSyntheticNarrowHeader(real); expect(narrow.readUInt32LE(V8_CODE_CACHE_NARROW_HEADER_BYTES)).not.toBe(0); diff --git a/src/v8/V8CodeCacheParser.ts b/src/v8/V8CodeCacheParser.ts index a062b75848..a7a19c1ca8 100644 --- a/src/v8/V8CodeCacheParser.ts +++ b/src/v8/V8CodeCacheParser.ts @@ -12,12 +12,13 @@ import { type V8CodeCache, } from "../domain/v8/v8CodeCache.js"; import type { V8CodeCacheInputBudget } from "../domain/v8/v8CodeCacheBudget.js"; -import { - V8_CODE_CACHE_FORMAT, - v8CodeCacheBudgetFailure, -} from "../v8/V8CodeCache.errors.js"; +import { V8_CODE_CACHE_FORMAT } from "./V8CodeCache.errors.js"; import { BinaryReader } from "../domain/binaryContainer.js"; -import { malformedInput, unsupportedInput } from "../domain/parseFailure.js"; +import { + decodeLimit, + malformedInput, + unsupportedInput, +} from "../domain/parseFailure.js"; import { sha256Hex } from "../kernel/sha256Hex.js"; const unsupported = (message: string): never => { @@ -151,10 +152,10 @@ export const parseV8CodeCache = ( if (observations.length >= input.max_strings) // The message states the fact. Recovery advice belongs to the provider, which // can see whether either budget still has headroom before recommending a retry. - throw v8CodeCacheBudgetFailure( - "max_strings", - input.max_strings, + throw decodeLimit( + V8_CODE_CACHE_FORMAT, `Payload contains more than ${String(input.max_strings)} printable runs of at least ${String(input.min_string_bytes)} bytes, so the max_strings observation budget was exhausted before the scan finished.`, + { name: "max_strings", maximum: input.max_strings }, ); const retained = Math.min( runBytes, diff --git a/src/v8/V8CodeCacheProvider.test.ts b/src/v8/V8CodeCacheProvider.test.ts index 965ac4d1de..c82ffc7bb0 100644 --- a/src/v8/V8CodeCacheProvider.test.ts +++ b/src/v8/V8CodeCacheProvider.test.ts @@ -1,153 +1,81 @@ +import { writeFile } from "node:fs/promises"; +import { join } from "node:path"; import { expect, it } from "vitest"; +import { createTestTempDirectory } from "../../tests/fixtures/temporaryDirectory.js"; +import { AnalysisResourceConstraintError } from "../domain/analysisErrorCore.js"; import { MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES, MAX_INSPECT_V8_CODE_CACHE_STRINGS, - MIN_INSPECT_V8_CODE_CACHE_STRING_BYTES, + V8_CODE_CACHE_HEADER_BYTES, inspectV8CodeCacheInputSchema, } from "../domain/v8/v8CodeCache.js"; -import { - v8CodeCacheBudgetFailure, - v8CodeCacheBudgetLimitOf, -} from "./V8CodeCache.errors.js"; -import { - observationBudgetRecovery, - observationBudgetRemediation, -} from "./V8CodeCacheProvider.js"; +import { v8CodeCacheFixture } from "./V8CodeCache.fixture.js"; +import { V8CodeCacheProvider } from "./V8CodeCacheProvider.js"; -/** - * The observation budget has two caller-selected limits, each with a ceiling: - * `max_strings` tops out at `MAX_INSPECT_V8_CODE_CACHE_STRINGS` and `min_string_bytes` - * at `MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES`. An admitted file can exceed the - * budget with both already at their maximum, and then no input change is a legal retry. - * - * The recovery is asserted as the decision it is — which retries remain, and whether a - * smaller artifact is the only option — rather than by matching the advice sentence, so - * a reworded message cannot break these and wrong advice cannot pass them. - */ -const input = (overrides: Record = {}) => - inspectV8CodeCacheInputSchema.parse({ - path: "/artifacts/module.jsc", - ...overrides, - }); - -const exhausted = (limit: number) => { - const parsed = v8CodeCacheBudgetLimitOf( - v8CodeCacheBudgetFailure("max_strings", limit, "budget exhausted"), - ); - if (parsed === undefined) - throw new Error("Expected V8 code cache budget limit"); - return parsed; -}; - -it("leaves both retries open while both budgets have headroom", () => { - // The default `min_string_bytes` is the schema minimum, so lowering it is not an - // option here; raising either bound is. - expect(observationBudgetRecovery(exhausted(16), input())).toEqual({ - boundary: "max_strings", - canRaiseMaxStrings: true, - canRaiseMinStringBytes: true, - canLowerMinStringBytes: false, - requiresSmallerArtifact: false, - }); -}); - -it("offers no retry when both budgets are already at their ceilings", () => { - // This is the case the review named: an admitted file with more than 65536 runs of at - // least 256 bytes reaches the branch, and neither suggested retry is admissible. - expect( - observationBudgetRecovery( - exhausted(MAX_INSPECT_V8_CODE_CACHE_STRINGS), - input({ - max_strings: MAX_INSPECT_V8_CODE_CACHE_STRINGS, - min_string_bytes: MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES, - }), - ), - ).toEqual({ - boundary: "max_strings", - canRaiseMaxStrings: false, - canRaiseMinStringBytes: false, - canLowerMinStringBytes: true, - requiresSmallerArtifact: true, - }); -}); - -it("drops only the run-length retry when min_string_bytes is at its ceiling", () => { - expect( - observationBudgetRecovery( - exhausted(16), - input({ min_string_bytes: MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES }), - ), - ).toMatchObject({ - canRaiseMaxStrings: true, - canRaiseMinStringBytes: false, - requiresSmallerArtifact: false, - }); -}); - -it("drops only the count retry when max_strings is at its ceiling", () => { - expect( - observationBudgetRecovery( - exhausted(MAX_INSPECT_V8_CODE_CACHE_STRINGS), - input({ max_strings: MAX_INSPECT_V8_CODE_CACHE_STRINGS }), - ), - ).toMatchObject({ - canRaiseMaxStrings: false, - canRaiseMinStringBytes: true, - requiresSmallerArtifact: false, - }); -}); - -it("requires a smaller artifact only when the run length cannot drop", () => { - const limit = v8CodeCacheBudgetLimitOf( - v8CodeCacheBudgetFailure("min_string_bytes", 4096, "budget exhausted"), - ); - if (limit === undefined) - throw new Error("Expected V8 code cache budget limit"); - expect( - observationBudgetRecovery( - limit, - input({ min_string_bytes: MIN_INSPECT_V8_CODE_CACHE_STRING_BYTES }), - ), - ).toMatchObject({ - boundary: "min_string_bytes", - canLowerMinStringBytes: false, - requiresSmallerArtifact: true, - }); -}); - -/** - * The sentence is rendered from the recovery struct, so what it must be held to is that - * it does not advise a knob the struct closed. Matching the wording would break on a - * reword without catching wrong advice; asserting the branches catches the advice. - */ it.each([ - [ - "no retry left", - exhausted(MAX_INSPECT_V8_CODE_CACHE_STRINGS), - input({ + { + scenario: "both knobs have headroom", + selection: { max_strings: 1 }, + retries: ["max_strings", "min_string_bytes"], + }, + { + scenario: "only count has headroom", + selection: { + max_strings: 1, + min_string_bytes: MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES, + }, + retries: ["max_strings"], + }, + { + scenario: "only run length has headroom", + selection: { max_strings: MAX_INSPECT_V8_CODE_CACHE_STRINGS }, + retries: ["min_string_bytes"], + }, + { + scenario: "both knobs are at their ceilings", + selection: { max_strings: MAX_INSPECT_V8_CODE_CACHE_STRINGS, min_string_bytes: MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES, - }), - ], - [ - "only the run length closed", - exhausted(16), - input({ min_string_bytes: MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES }), - ], - [ - "only the count closed", - exhausted(MAX_INSPECT_V8_CODE_CACHE_STRINGS), - input({ max_strings: MAX_INSPECT_V8_CODE_CACHE_STRINGS }), - ], - ["both open", exhausted(16), input()], -] as const)("never advises a closed budget when %s", (_label, cause, input) => { - const recovery = observationBudgetRecovery(cause, input); - const advice = observationBudgetRemediation(cause, input); - if (!recovery.canRaiseMaxStrings) - expect(advice).not.toMatch(/Raise max_strings/u); - if (!recovery.canRaiseMinStringBytes) - expect(advice).not.toMatch(/Raise min_string_bytes/u); - if (recovery.requiresSmallerArtifact) - expect(advice).toMatch(/smaller artifact/u); -}); + }, + retries: [], + }, +])( + "recommends the available retries when $scenario", + async ({ selection, retries }) => { + const root = await createTestTempDirectory("rea-v8-budget-"); + const path = join(root, "module.jsc"); + const input = inspectV8CodeCacheInputSchema.parse({ path, ...selection }); + // Every run meets the selected length threshold. One extra run triggers + // the real parser guard, including when the count is at its ceiling. + const run = Buffer.alloc(input.min_string_bytes + 1, 0x61); + run[run.length - 1] = 0; + const payloadBytes = run.length * (input.max_strings + 1); + const bytes = Buffer.alloc(V8_CODE_CACHE_HEADER_BYTES + payloadBytes); + v8CodeCacheFixture().copy(bytes, 0, 0, V8_CODE_CACHE_HEADER_BYTES); + bytes.writeUInt32LE(payloadBytes, 20); + bytes.fill(run, V8_CODE_CACHE_HEADER_BYTES); + await writeFile(path, bytes); + + const provider = new V8CodeCacheProvider(); + const result = await provider + .inspect(input) + .finally(() => provider.close()); + if (result.ok) throw new Error("Expected observation budget exhaustion"); + const failure = result.error; + if (!(failure instanceof AnalysisResourceConstraintError)) throw failure; + expect(failure.reportedLimits).toEqual({ + boundary: "max_strings", + maximum: input.max_strings, + }); + const advice = failure.remediationAction ?? ""; + const changes = [ + ...advice.matchAll(/\b(raise|lower) (max_strings|min_string_bytes)\b/giu), + ].map(([instruction]) => instruction.toLowerCase()); + expect(changes.sort()).toEqual( + retries.map((name) => `raise ${name}`).sort(), + ); + if (retries.length === 0) + expect(advice).toContain("select a smaller artifact"); + }, +); diff --git a/src/v8/V8CodeCacheProvider.ts b/src/v8/V8CodeCacheProvider.ts index 11f88f6492..75dd851813 100644 --- a/src/v8/V8CodeCacheProvider.ts +++ b/src/v8/V8CodeCacheProvider.ts @@ -28,16 +28,10 @@ import { MAX_INSPECT_V8_CODE_CACHE_FILE_BYTES, MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES, MAX_INSPECT_V8_CODE_CACHE_STRINGS, - MIN_INSPECT_V8_CODE_CACHE_STRING_BYTES, type InspectV8CodeCacheInput, } from "../domain/v8/v8CodeCache.js"; import { err, ok } from "../domain/result.js"; -import { - V8_CODE_CACHE_FORMAT, - v8CodeCacheBudgetLimitOf, - type V8CodeCacheBudgetBoundary, - type V8CodeCacheBudgetLimit, -} from "./V8CodeCache.errors.js"; +import { V8_CODE_CACHE_FORMAT } from "./V8CodeCache.errors.js"; import { V8_CODE_CACHE_PROVIDER_IDENTITY } from "./V8CodeCacheProviderIdentity.js"; import { parseV8CodeCache } from "./V8CodeCacheParser.js"; @@ -100,69 +94,22 @@ const inputBudgetRemediation = ( return undefined; }; -/** - * Which retries remain after an exhausted observation budget. - * - * `max_strings` tops out at `MAX_INSPECT_V8_CODE_CACHE_STRINGS` and `min_string_bytes` - * between `MIN_…` and `MAX_…`, so an admitted file with more than 65536 runs of 256 - * bytes can exhaust the budget with no admissible input change left. The recovery is - * decided as data, and the advice sentence is rendered from it, so a caller and a test - * can read the choice rather than the wording. - */ -export interface ObservationBudgetRecovery { - readonly boundary: V8CodeCacheBudgetBoundary; - /** Whether a higher `max_strings` is still within the schema's admitted range. */ - readonly canRaiseMaxStrings: boolean; - /** Whether a higher `min_string_bytes` is still within the schema's admitted range. */ - readonly canRaiseMinStringBytes: boolean; - /** Whether a lower `min_string_bytes` is still within the schema's admitted range. */ - readonly canLowerMinStringBytes: boolean; - /** Whether the only remaining option is a smaller artifact. */ - readonly requiresSmallerArtifact: boolean; -} - -export const observationBudgetRecovery = ( - cause: Pick, +/** Raising either admitted knob can make an exhausted string count fit. */ +const observationBudgetRemediation = ( + limit: number, input: InspectV8CodeCacheInput, -): ObservationBudgetRecovery => { +): string => { const canRaiseMaxStrings = input.max_strings < MAX_INSPECT_V8_CODE_CACHE_STRINGS; const canRaiseMinStringBytes = input.min_string_bytes < MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES; - const canLowerMinStringBytes = - input.min_string_bytes > MIN_INSPECT_V8_CODE_CACHE_STRING_BYTES; - if (cause.boundary !== "max_strings") - return { - boundary: cause.boundary, - canRaiseMaxStrings, - canRaiseMinStringBytes, - canLowerMinStringBytes, - requiresSmallerArtifact: !canLowerMinStringBytes, - }; - return { - boundary: cause.boundary, - canRaiseMaxStrings, - canRaiseMinStringBytes, - canLowerMinStringBytes, - requiresSmallerArtifact: !canRaiseMaxStrings && !canRaiseMinStringBytes, - }; -}; - -/** Render the recovery choice for one exhausted observation budget. */ -export const observationBudgetRemediation = ( - cause: Pick, - input: InspectV8CodeCacheInput, -): string => { - const recovery = observationBudgetRecovery(cause, input); - if (recovery.boundary !== "max_strings") - return `Lower min_string_bytes below ${String(cause.limit)} or select a smaller artifact.`; - if (recovery.requiresSmallerArtifact) + if (!canRaiseMaxStrings && !canRaiseMinStringBytes) return `Both max_strings and min_string_bytes are already at their ceilings (${String(MAX_INSPECT_V8_CODE_CACHE_STRINGS)} observations, ${String(MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES)}-byte runs), so no option change clears this budget; select a smaller artifact.`; - if (!recovery.canRaiseMaxStrings) + if (!canRaiseMaxStrings) return `Raise min_string_bytes above ${String(input.min_string_bytes)}; max_strings is already at its ${String(MAX_INSPECT_V8_CODE_CACHE_STRINGS)}-observation ceiling, so a shorter run length cannot help.`; - if (!recovery.canRaiseMinStringBytes) - return `Raise max_strings above ${String(cause.limit)}; min_string_bytes is already at its ${String(MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES)}-byte ceiling, so a larger artifact must be reduced or split.`; - return `Raise max_strings above ${String(cause.limit)} or raise min_string_bytes above ${String(input.min_string_bytes)}; both are caller-selected observation budgets.`; + if (!canRaiseMinStringBytes) + return `Raise max_strings above ${String(limit)}; min_string_bytes is already at its ${String(MAX_INSPECT_V8_CODE_CACHE_MIN_STRING_BYTES)}-byte ceiling, so a larger artifact must be reduced or split.`; + return `Raise max_strings above ${String(limit)} or raise min_string_bytes above ${String(input.min_string_bytes)}; both are caller-selected observation budgets.`; }; const v8CodeCacheFailurePrimary = ( @@ -170,14 +117,17 @@ const v8CodeCacheFailurePrimary = ( input: InspectV8CodeCacheInput, ) => { const { cause, origin } = facts; - if (isParseLimit(cause, V8_CODE_CACHE_FORMAT)) { - const budgetLimit = v8CodeCacheBudgetLimitOf(cause); - if (budgetLimit !== undefined) - return parseLimitConstraint(OPERATION, "capacity", cause, { - retryable: false, - remediationAction: observationBudgetRemediation(budgetLimit, input), - }); - } + if ( + isParseLimit(cause, V8_CODE_CACHE_FORMAT) && + cause.failure.limit.name === "max_strings" + ) + return parseLimitConstraint(OPERATION, "capacity", cause, { + retryable: false, + remediationAction: observationBudgetRemediation( + cause.failure.limit.maximum, + input, + ), + }); const formatFailure = parseFailureAnalysisError(OPERATION, input.path, cause); if (formatFailure !== undefined) return formatFailure; const identityFailure = projectOwnedArtifactIdentityFailure(