deepseek-ai/deepseek-harness · error · Error

${binName}: user patch-layer watching requires the root Incl

Error message

${binName}: user patch-layer watching requires the root Include entry

What it means

Error "${binName}: user patch-layer watching requires the root Include entry" thrown in deepseek-ai/deepseek-harness.

Source

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

  compose?: (userPatches: PatchOptions[]) => PatchOptions[]
}

/**
 * Watch the user patch layer through Cordis HMR and transactionally reapply it to the boot include.
 * @param ctx - settled app context containing the root Include and an active HMR service.
 * @param options - diagnostic, file, and patch-composition inputs.
 * @returns an asynchronous disposer after the exact-path watcher is ready.
 * @throws when HMR or the root Include is absent, watcher setup fails, or initial path resolution fails.
 */
export async function watchUserPatches(
  ctx: Context,
  options: UserPatchWatchOptions,
): Promise<() => Promise<void>> {
  const { binName, filename, compose = (patches: PatchOptions[]) => patches } = options
  const hmr = ctx.get('hmr')
  if (hmr === undefined) throw new Error(`${binName}: user patch-layer watching requires the Cordis HMR service`)
  const entry = bootstrapIncludes.get(ctx)
  if (entry === undefined) throw new Error(`${binName}: user patch-layer watching requires the root Include entry`)
  const register = hmr.registerConfig(filename, async () => {
    // Re-read the include's non-patch options per refresh: a writer that
    // updates the root Include's other options between refreshes (none exists
    // today) must not have them silently reverted by a user-layer reload.
    const { patches: _previousPatches, ...includeConfig } = entry.options.config as Include.Config
    const userPatches = loadOptionalPatches(binName, filename) ?? []
    const patches = compose(userPatches)
    await entry.update({
      config: {
        ...includeConfig,
        patches,
      },
    })
  })
  try {
    return await register
  } catch (error) {
    // A surface can dispose the whole tree while the watcher is still opening;

View on GitHub (pinned to b150a551b8)

Solutions

  1. Add the root Include entry required for watching, or disable patch-layer watching.

When it happens

Trigger: Thrown at packages/boot/app-boot/src/index.ts:240 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/10d2f4e06d99c006. Report an issue: GitHub.