Introduction

When DeepSeek Harness (DSH) loads plugins, the loader first deduplicates and creates entries before instantiating plugins. If the dsh.profile.bundles list contains both an aggregate bundle (such as @linxin666/dsh-web-ui-all) and all of its subplugins, the loader receives duplicate entry ids. This causes a duplicate loader entry id error to be thrown before any plugin entries are created, making the entire profile fail to start.

dsh-bundle-dedup-guard is a guard plugin designed for this scenario. It detects duplicate loader entry ids on every plugin load and audits the entire plugin environment to prevent this kind of silent crash.

Core Features

The plugin provides the following capabilities:

  1. Detect duplicate loader entry ids: Identify ids inserted multiple times and trace their source (which bundle or patch inserted them).
  2. Audit the plugin environment: Check vendor tree, plugin junctions, and known conflict pairs.
  3. Report diagnostic information:
    • Unresolved bundles.
    • Packages without bundles (i.e., packages configured with dsh.bundle but not included in the bundles list).
    • Predictive reconcile warnings.
  4. Site-level health checks:
    • Detect known conflict pairs.
    • Check vendor tree integrity.
    • Check plugin junction integrity.

Installation

Install the plugin using the DSH CLI:

dsh plugin --profile web add dsh-bundle-dedup-guard

Usage

The plugin automatically runs checks at load time. For manual diagnostics (especially when startup has already crashed), use the following commands:

# 检查所有 profile + site-level health
node bin/check.mjs

# 检查特定 profile
node bin/check.mjs --profile web

# 检查特定 profile,不写入报告文件(仅输出)
node bin/check.mjs --profile web -- --no-write

# 跳过 site-level health 审计
node bin/check.mjs --no-site

A successful exit code of 0 indicates health. If duplicates, unresolved bundles, or site-level issues are found, the exit code is 1 (suitable for CI pipelines).

Notes

  • Read-only diagnostics: The plugin only performs diagnostics and does not modify any files.
  • In-process limitations: The loader deduplicates before creating any plugin entries. If duplicates already exist at startup, in-process checks cannot run. In this case, use the CLI above for pure disk-read checks.
  • Use cases: Suitable for development and production environments, as an administrator/security plugin to monitor the integrity of the plugin environment.