deepseek-ai/deepseek-harness · error · Error

${binName}: ${label} entry ${index + 1} in ${file} must be a

Error message

${binName}: ${label} entry ${index + 1} in ${file} must be a mapping (a loader patch entry)

What it means

Error "${binName}: ${label} entry ${index + 1} in ${file} must be a mapping (a loader patch entry)" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/boot/app-boot/src/index.ts:334

 * @param content - the file's text.
 * @param label - what to call this list in errors (`patches`, `overlay`).
 * @returns the parsed patch list.
 */
function parsePatchList(
  binName: string, file: string, content: string, label: string,
): PatchOptions[] {
  let parsed: unknown
  try {
    parsed = yaml.load(content, { schema: userPatchesSchema })
  } catch (error) {
    throw new Error(`${binName}: failed to parse ${label} ${file}: ${String(error)}`)
  }
  if (!Array.isArray(parsed)) {
    throw new Error(`${binName}: ${label} ${file} must be a top-level YAML array of loader patch entries`)
  }
  parsed.forEach((entry, index) => {
    if (typeof entry !== 'object' || entry === null || Array.isArray(entry)) {
      throw new Error(`${binName}: ${label} entry ${index + 1} in ${file} must be a mapping (a loader patch entry)`)
    }
  })
  return parsed as PatchOptions[]
}

/** One overlay patch list with the source label printed in dump comments. */
export interface ConfigDumpLayer {
  /** Source name shown in dump comments (a file basename or path). */
  label: string
  /** The layer's patches, from {@link loadOverlayPatches} / {@link loadOptionalPatches}. */
  patches: PatchOptions[]
}

/**
 * Compose the effective entry list exactly as `boot()` would mount it: parse
 * the base config file with the include's entry-list dialect, apply every
 * layer's patches as ONE flattened list through the include's own patch
 * algorithm (`applyEntryPatches`) — the same single call `boot()` makes, so

View on GitHub (pinned to b150a551b8)

Solutions

  1. Make the reported entry a YAML mapping describing a loader patch entry.

When it happens

Trigger: Thrown at packages/boot/app-boot/src/index.ts:334 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/f2db2867a359cbc6. Report an issue: GitHub.