DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Protect Tests — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
P

dsh-protect-tests

Protect Tests

DeepSeek Harness plugin that catches an agent weakening tests to make them pass: added skips, deleted assertions or test cases, trivial asserts, swallowed failures, and deleted test files.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:acus9345/dsh-protect-tests#62e886b2fc60d94efecaa80869c77a916a4f6fb6
READMECompatibilityVersions

Compatibility and provenance

Protect Tests is published as dsh-protect-tests and currently resolves to version 0.2.3. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/17/2026

Versions

0.2.3stable
10/17/2026

Related plugins

Loading related plugins…

Latest
0.2.3
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 2
Weekly downloads
0
Last push
10/18/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseExperimental Inspector@deepseek-ai/dsh-experimental-inspectorExperimental cross-realm CDP hub for Host debugging and Client Runtime inspectionExperimental Inspector Profile@deepseek-ai/dsh-experimental-inspector-profileOptional Web bundle for raw Session logs and Chat node inspection

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.