dsh-gme-test-generator: Driving GME Interface Test Generation and Repair in DSH

Introduction

When doing GME-related development in DeepSeek Harness (DSH), testing often requires adding test cases one by one against a large number of interface catalogs, and failures need to be fixed across stages like compilation, formatting, and memory auditing. If all these steps are delegated to the model in the conversation to improvise, intermediate states are hard to track, and operations like submitting external PRs or deleting tasks lack a unified gate.

The following introduces the community plugin dsh-gme-test-generator (maintainer nuaaweixinye): it provides three workflow tools on the Harness side, connecting to the locally deployed GME Test Generator Python backend. The backend autonomously runs generation and repair, while the model side is mainly responsible for selecting interfaces, polling progress, and executing external decisions only after explicit user consent.

What Is This

dsh-gme-test-generator is a community workflow plugin for DeepSeek Harness (npm package name dsh-gme-test-generator, version 0.2.0 per current documentation, MIT license). It does not replace the GME Test Generator itself, but drives the existing backend/run_backend.py and its associated configuration, task library, and GME compilation chain in your checkout.

The backend is not bundled with the plugin; for the public framework, refer to the clone and configuration instructions in nuaaweixinye/gme-agent. The full checkout including the generation directory is a private repository and requires access requested from the maintainer.

Environment and Prerequisites

Before using it, you must satisfy all conditions listed in the README. Key points:

  1. DeepSeek Harness: 0.1.2-alpha.1 or newer, still on the 0.1.x line; use a base-backed profile with tools and systemPrompt. The plugin’s engines.dsh requirement is >=0.1.2-alpha.1 <0.2.0-0.
  2. GME Test Generator checkout: containing backend/run_backend.py, config.local.json, the task database, and the GME repository with compilation toolchain.
  3. Python environment: backend dependencies installed, plus matching deepseek-harness-sdk and deepseek-harness-runtime-bin; also requires clang-format 17.0.2 (matching GME’s check-format; the backend does not accept other major versions for format judgment).
  4. Automatically launching the backend: the profile needs a local subprocess service (official profiles usually already include this).

Coding work within the backend goes through a separate sdk profile executed via the DeepSeek Harness Python SDK; building, testing, and memory audit are automatic phases within tasks, not step-by-step commands from chat tools. This coding profile includes file, search, and PowerShell tools, and does not include this plugin, to avoid task recursion.

Core Functionality: Three Tools

Tool Purpose
gme_generate Autonomous generation: create tests by interface ID or free-form goal, batch creation, fix recorded failures, extend or retry tasks
gme_check Side-effect-free reading: interface catalog, tasks, incremental events, failures with observations, test results, artifacts, etc.
gme_decide Requires user consent: task PRs, skip-known-failures PRs, selected-test PRs, removing selected tests, cleanup, deleting tasks, etc. (requires confirm: true)

Workflow conventions (from the README):

  • When generating and extending, either pass interface_ids from the catalog, or pass free-text goal; not both. The backend discards goal when IDs are provided, and the plugin also rejects the combination. Batch creation must use IDs. You should first use gme_check to look up interfaces. Task IDs should use the backend job ID, not the Harness session ID.
  • From acceptance to needs_review, execution is autonomous by the backend; the model polls with gme_check and does not interfere with intermediate building, testing, and memory auditing.
  • The suggested_next in responses indicates the next phase: continue polling while running → at needs_review, report summary, failures, and diff → external steps are handed to gme_decide.
  • gme_decide without confirm: true will fail directly with guidance; the request will not reach the backend.
  • accepted: true only means the job has been queued, not that validation has passed. For large reports, use the pagination fields content, total_characters, and next_offset to continue reading; while running, use events.after for bounded incremental queries.

Installation and Enablement

Can be installed in one click from DSH Settings → Plugin Market, or via command line (as documented):

dsh plugin --profile web add dsh-gme-test-generator

The command installs the package and writes to the profile’s dsh.profile.bundles; the package includes a dsh.bundle.patch layer, so generally no manual profile file edits are needed. After installation, restart dsh web.

If the old package tool-gme is still separately enabled in your profile, disable that line; installing this plugin does not automatically remove other packages.

Configuring backendRoot

backendRoot is the deployment path; it has no default value and is not passed as a model parameter. When unconfigured, the plugin still mounts: it does not register tools, logs a warning, and exposes setup instructions to the model, so the agent can explain what is missing rather than reporting “no such tool”; validation failure does not crash the entire plugin tree.

Method 1: Environment variables (read by Harness at startup):

$env:GME_TEST_GENERATOR_ROOT  = 'D:/workspace/gme-test-generator'
$env:GME_TEST_GENERATOR_PYTHON = 'C:/ProgramData/Miniconda3/envs/agent/python.exe'   # optional, defaults to python
dsh web

Method 2: Profile patch, path is $DSH_HOME/profiles/<profile>/cordis.patch.yml:

- id: gme-test-generator
  config:
    backendRoot: D:/workspace/gme-test-generator
    pythonPath: C:/ProgramData/Miniconda3/envs/agent/python.exe
    port: 8765
    autoStart: true

Patch lines only override the keys they list; if you keep other fields, you need to write the full config in the patch. After making changes, restart dsh web; the tools will only appear after backendRoot resolves successfully.

Config item Default Meaning
backendRoot (required to enable tools) GME Test Generator root directory containing backend/run_backend.py
pythonPath python Interpreter with backend dependencies
configFile config.local.json Backend configuration, absolute path or relative to backendRoot
tokenFile logs/web-api-token.log API token; created automatically on auto-start if missing
port 8765 TCP port the backend listens on IPv4 loopback
autoStart true Start the plugin-managed Python worker when no service is available on the port
timeoutMs 15000 Per-HTTP-request (including body) timeout
startupTimeoutMs 45000 Timeout for the managed worker to become healthy
maxResponseBytes 8388608 Maximum bytes retained per response
pageChars 12000 Report pagination character count (256–50000)

The backend’s optional “historical divergence and knowledge base injection” is configured in the backend’s own config.local.json (disabled by default); see the backend repository’s docs/knowledge-injection.md for details; the intersection with the plugin is mainly in the owned worker’s environment variables, see section 6 of the setup documentation.

Typical Usage (Reproducible Flow)

Below is a conversation-side flow consistent with the README’s tool design, for local reproduction:

  1. Configure backendRoot (or environment variables) and restart dsh web; confirm the three GME tools appear in the profile.
  2. Use gme_check to query the interface catalog and select interface_ids (or write only goal, pick one of the two).
  3. Call gme_generate to create or extend a task; after it returns accepted: true, poll task status and incremental events with gme_check following suggested_next, until needs_review.
  4. At the needs_review phase, use gme_check to fetch summary, failures, and diff (use next_offset for pagination on large JSON).
  5. When submitting a PR, cleaning up, or deleting a task, call gme_decide and explicitly pass confirm: true; otherwise the call will be rejected by the plugin.

status: failed returned by generation and decision is still a valid query result; infrastructure-level problems appear as tool errors. Aborting a tool only stops waiting, it does not cancel an already-accepted backend job; POST requests are not automatically retried, and when the submission result is uncertain, you should re-check the task list.

Use Cases and Notes

Who it’s for: Developers who already maintain a local GME Test Generator and GME compilation environment, and want a unified toolchain in the DSH Web profile for “select interface → autonomous generation/fix → review → external action after consent”.

Permissions and security: The plugin runs with the permissions of the current dsh process; before installing and enabling, you should read the GitHub source and LICENSE, and understand that your local backend will execute building, testing, and potentially PR-related operations.

Worker lifecycle: The first request reuses an existing service after health check and authentication pass; otherwise autoStart: true will launch the configured Python entry point, and concurrent requests share the same startup. Harness shutdown or reload may interrupt a backend started by this plugin and its child processes; independently started backends are not affected. When the plugin disposes, it only terminates workers it launched itself. If the port is occupied by another service or authentication fails, it will not blindly start a worker.

Ecosystem notes: DSH adopts an “everything is a plugin” extension approach; the SkillHub plugin directory is a community site with no official affiliation with DeepSeek / High-Flyer. This package is a community plugin, not an official DeepSeek release.

Conclusion

dsh-gme-test-generator consolidates GME test generation and repair into three tools on the Harness side: generation goes through the local Python backend’s autonomous pipeline, checks are read-only, and external actions go through the confirm gate. If you already have a GME Test Generator deployment, you can install it with the command above and configure backendRoot to integrate into your workflow.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye