DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Protect Tests — DeepSeek Harness 插件(DSH Plugin)
← Plugins
P

dsh-protect-tests

Protect Tests

DeepSeek Harness 插件,用于检测代理是否通过削弱测试来使其通过:添加跳过、删除断言或测试用例、使用无实际作用的断言、吞掉失败,以及删除测试文件。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:acus9345/dsh-protect-tests#62e886b2fc60d94efecaa80869c77a916a4f6fb6
README兼容性版本

兼容性与来源证明

Protect Tests 以 dsh-protect-tests 发布,当前版本为 0.2.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/17

版本

0.2.3stable
2026/10/17

相关插件

正在加载相关插件…

最新版
0.2.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/10/18
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Experimental Inspector@deepseek-ai/dsh-experimental-inspector用于 Host 调试和 Client Runtime 检查的实验性跨 realm CDP hubExperimental Inspector Profile@deepseek-ai/dsh-experimental-inspector-profile用于原始 Session 日志和 Chat 节点检查的可选 Web 捆绑包

README

dsh-protect-tests

English | 中文

Tell an agent "make the tests pass" and sometimes it does exactly that, just not the way you meant. A failing test gets .skip. An assertion gets commented out. expect(total).toBe(42) turns into expect(total).toBeDefined(). The run goes green and the bug is still there.

This DeepSeek Harness plugin looks at every edit to a test file before it's applied, comparing the old text with the new. If the change makes the tests check less, the edit is refused and the model is told what it did: (haha claude is so useful i mean like idk)

dsh-protect-tests blocked this change to src/sum.test.ts because it makes the tests check less:
- replaces specific assertions with existence/truthiness checks (0 → 1): `expect(sum(1, 2)).toBeDefined()`
Tests should keep failing until the code is fixed. Fix the implementation instead, or make
the test more accurate without weakening it. If the test itself is wrong (the requirement
changed, or it tested a bug), tell the user which test you are changing and why, then
repeat the identical call once to confirm.

Install

dsh plugin --profile web add dsh-protect-tests

That's the web profile, the browser UI you start with dsh web. If you run DSH another way, use headless (scripts and CI) or acp (editor integrations) instead. Each profile keeps its own plugin list, so add it to every profile you use. It's on as soon as it's installed. Remove it with dsh plugin --profile web remove dsh-protect-tests.

From a clone

To try local changes, build a tarball and install that:

git clone https://github.com/acus9345/dsh-protect-tests
cd dsh-protect-tests
npm install
npm pack
dsh plugin --profile web add ./dsh-protect-tests-0.2.0.tgz

What it notices

  • New skips. it.skip, test.only, xit, xdescribe, @pytest.mark.skip / xfail, @unittest.skip, t.Skip(), @Disabled, #[ignore], and the equivalents in xUnit, RSpec, PHPUnit and XCTest.
  • Fewer tests or assertions. Removing a test case, or removing two or more assertions in one edit. Both thresholds are configurable.
  • Assertions that can't fail. expect(true).toBe(true), assert True, assertEquals(x, x), assert!(true).
  • Commented-out assertions.
  • Swallowed failures. Wrapping assertions in an empty catch {} or except AssertionError: pass.
  • Weaker assertions. Swapping a specific check for toBeDefined(), toBeTruthy(), assert.ok(x), is not None and the like.
  • Deleted test files. rm, git rm or unlink on a test file or test folder from the shell.
  • A test script that can't fail. Changing "test" in package.json to echo, exit 0, ... || true, or adding --passWithNoTests.

On Windows, PowerShell deletes (Remove-Item, del, rd) count too.

Test files are found by name: *.test.*, *.spec.*, *_test.*, test_*.py, *Test.java, conftest.py, anything under tests/, __tests__/, spec/ or e2e/, and so on. You can change the list.

Normal test work isn't affected. Adding tests, adding assertions, renaming, refactoring setup code and fixing a typo in a test name all go through without a word. Refactors that look like losses on paper also go through, for example folding five near-identical tests into one test.each / @pytest.mark.parametrize / t.Run table, or merging three toBe checks into one toEqual({...}) or a helper like expectUser(...).

When the test really is wrong

Sometimes it is. The requirement changed, or the test was asserting the bug. In that case the model is asked to tell you which test it's changing and why, then repeat the same call once to confirm. The repeat goes through. So the guard never fully blocks legitimate work. It just won't let a weakened test slip past without being mentioned in the conversation. If you'd rather approve these yourself, use mode: ask.

What it won't catch

It works on patterns, not on meaning. If the model changes toBe(4) to toBe(5) to match a wrong result, that looks like an ordinary edit and gets through. Rewriting the logic of a test so it no longer exercises the bug also gets through. It covers the lazy shortcuts, which turn out to be most of them, but it's no substitute for reading the diff.

Settings

The easy way: open Plugins in DSH's sidebar, click dsh-protect-tests, change what you want and press Save. It applies to the next tool call, no restart needed.

Or add a row like this to ~/.dsh/profiles/<profile>/cordis.patch.yml, or to ~/.dsh/cordis.patch.yml for every profile. Keys you leave out keep their defaults.

- id: protect-tests
  config:
    mode: deny                  # or `ask` for an approval prompt
    testFiles: ['*.test.*', '**/tests/**', '!tests/fixtures/**']   # replaces the default list
    minAssertionsRemoved: 2
    minTestsRemoved: 1
    disabledSignals: []         # skip, fewer-assertions, fewer-tests, trivial-assert,
                                # commented-assert, swallowed-failure, weaker-assert
    guardDeletes: true          # watch rm / git rm of test files
    guardTestScript: true       # watch package.json "test"
    allowIdenticalRetry: true   # false: a refusal is final
    shellTools: [bash, pwsh]   # pwsh is the shell DSH uses on Windows

Development

npm install
npm test           # detector unit tests
npm run test:e2e   # real dsh runs against a scripted local model, no API key needed

The install test runs dsh plugin add, which needs pnpm on your PATH.

MIT licensed. Written by acus9345. Bug reports and ideas are welcome in the issues.