DeepSeek Harness 插件

dsh-plugin-abtest

Paired experiments and promotion gates for DSH plugins.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
Morriaty-The-Murderer/dsh-plugin-abtest
最近更新
2026年8月21日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/Morriaty-The-Murderer/dsh-plugin-abtest
插件名:dsh-plugin-abtest
作者:Morriaty-The-Murderer

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

<p align="center"> <img src="./assets/social-preview.jpg" alt="DSH Plugin A/B Test — paired experiments, auditable evidence, safer promotion" width="100%"> </p>

<p align="center"> <strong>English</strong> · <a href="./README.zh-CN.md">简体中文</a> </p>

DSH Plugin A/B Test

> Test a DSH plugin change on the same tasks before you ship it.

DSH Plugin A/B Test runs your current plugin (Control) and proposed change (Candidate) in isolated DSH environments, pairs their results case by case, and produces evidence you can review before release.

It helps answer three practical questions:

  • Did the Candidate improve task success?
  • Did that improvement come with a meaningful regression in tokens, latency, or tool errors?
  • Can someone else reproduce the result from the same inputs?

Every experiment ends with one of four deterministic outcomes: PROMOTE, REVIEW, REJECT, or INCONCLUSIVE. Even PROMOTE is an offline recommendation only—this project never changes your real DSH profile or publishes a plugin for you.

See the decision first

This is a real result from the repository's offline example, with unrelated fields omitted:

{
  "outcome": "PROMOTE",
  "validPairCount": 2,
  "invalidPairCount": 0,
  "triggeredRules": ["primary.superiority"]
}

Alongside the decision, you get raw session evidence, assertion results, pair-level deltas, and reports in JSON, Markdown, and HTML. The model does not choose the outcome; deterministic rules from the experiment manifest do.

Quick start

The current MVP runs from source and requires Node.js ^22.19.0 || >=24.0.0 and pnpm 11.19.0. The starter experiment uses an offline scripted provider, so no model API key is required.

pnpm install --frozen-lockfile

node --import tsx src/cli/bin.ts init --output ./my-experiment --json
node --import tsx src/cli/bin.ts freeze --manifest ./my-experiment/experiment.yml --output ./evidence --json
node --import tsx src/cli/bin.ts run --manifest ./my-experiment/experiment.yml --output ./evidence --json
node --import tsx src/cli/bin.ts decision --manifest ./my-experiment/experiment.yml --output ./evidence --json
node --import tsx src/cli/bin.ts report --manifest ./my-experiment/experiment.yml --output ./evidence --json

Open ./evidence/<experiment-id>/report.html to view the static report. To test your own plugin, edit experiment.yml, evals/cases.yml, and the two variant configurations created by init.

Reproducible real case

The [Toolshrink context-budget case](case-studies/toolshrink-context-budget/README.md) pins DSH, model parameters, one community-plugin commit, deterministic fixtures, and a peak-rate pricing snapshot. Its publishable summary excludes raw sessions, tool output, spill contents, absolute paths, and credentials.

Understand the outcome

OutcomeWhat it meansTypical next step
PROMOTEEvidence is sufficient, quality meets the target, and guardrails passContinue through your human release process
REVIEWResults improved, but cost, latency, error rate, or variance needs judgmentReview the pair-level evidence
REJECTA hard gate failed, a critical case regressed, or the gain was too smallFix the Candidate and rerun
INCONCLUSIVEThere were too few valid pairs, exposure was not proven, or environments were not comparableComplete the evidence instead of treating it as a failure

Task success is the default primary metric. You can also guard token usage, P95 latency, and tool error rate. Thresholds, minimum valid pairs, repetitions, and concurrency all live in the manifest. See the [manifest reference](docs/manifest.md) and [decision rules](docs/decisions.md) for details.

Why the evidence is trustworthy

  • Paired tasks: Control and Candidate receive the same case, workspace fixture, and model parameters.
  • Balanced order: Pair order alternates to reduce fixed first-run bias.
  • Isolated environments: Each arm gets its own DSH_HOME, profile, workspace, session root, and frozen plugin artifact.
  • Traceable artifacts: Sources may be a local directory, tarball, exact npm version, or pinned GitHub commit; hashes are checked again before execution.
  • Proven exposure: Session events, tool calls, plugin receipts, or workspace changes show whether the target plugin actually participated.
  • Blind comparison: An optional comparator sees anonymous A/B outputs; identity is revealed only after comparison.
  • Honest infrastructure failures: Provider outages, corrupted sessions, and environment mismatches become invalid evidence or INCONCLUSIVE, not fake Candidate regressions.

Evidence is stored under one experiment directory:

<output>/<experiment-id>/
├── manifest.lock.json
├── control-artifact.json
├── candidate-artifact.json
├── pairs/<case-id>-<repetition>/
│   ├── pair.json
│   ├── measurement.json
│   ├── control/
│   └── candidate/
├── comparison.json
├── decision.json
├── report.md
└── report.html

Completed pairs are reused by later run commands, and partial state is never silently overwritten. If inputs change or evidence is damaged, use a new output root.

Connect to real DSH

Non-mock providers invoke the exact pinned version @deepseek-ai/dsh@0.1.0-rc.7. Add model credentials and other environment variables by name to extensions.environment_allowlist. Fingerprints and artifact metadata store only the allowlist hash, never the original values.

OpenAI-compatible Chat Completions endpoints can use provider: openai-compatible with an explicit parameters.host, parameters.apiKeyEnv, and model name. The API key value remains in the referenced environment variable; literal keys in a manifest are rejected. See the [manifest contract](docs/manifest.md#runtime) for the exact shape and protocol boundary.

Plugin and test-command stdout, stderr, and session logs are retained as raw evidence, so integrations must still avoid printing secrets.

The CLI is a trusted local automation boundary and may run commands explicitly declared in the manifest. Optional DSH/Cordis tool entry points are model-facing, so they reject experiments containing command_test rather than becoming arbitrary command-execution tools.

The complete CLI includes init, validate, freeze, run, status, compare, decision, and report. Stable exit codes and the live-model smoke procedure are documented in the [verification record](docs/verification.md).

Paid live-model CI is intentionally manual and isolated from pull-request CI. Before enabling it, configure the live-model GitHub Environment, reviewer/branch rules, Environment Secret, and guard variable described in the [protected live-model CI guide](docs/live-model-ci.md). Committing the workflow file alone does not create a protected setup.

Development

pnpm identity:check
pnpm lint
pnpm typecheck
pnpm test
pnpm test:integration
pnpm test:rename
pnpm build
pnpm pack --dry-run

This project is currently an MVP and is not published as an npm package. See the [architecture](docs/architecture.md) and [upstream audit](docs/upstream.md) for implementation and security boundaries.

Public names, the npm package name, and the CLI name are managed from project.identity.json. A real rename test prevents stale public identity from surviving a rename; see the [identity guide](docs/identity.md). Stable protocol identifiers do not change with the project brand.