Introduction¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” In development workflows, proving that a fix is effective, reproducible, and leaves auditable evidence is a common pain point. dsh-reprolab is designed to address this problem by providing DSH with a deterministic bug-proof executor.
Plugin Overview¶
dsh-reprolab is a deterministic bug-proof executor focused on freezing reproduction tests, enforcing RED/GREEN/REGRESSION gates, and generating replayable evidence.
It is maintained by user yuttfu and belongs to the “Workflow” category. The plugin helps Harness sessions write tests and fixes by isolating worktrees and freezing inputs, while ensuring the entire process remains auditable.
Core Features¶
- Deterministic execution: Ensure that testing and validation processes are fully reproducible.
- Frozen reproduction tests: Lock the test patch and target test command.
- RED/GREEN/REGRESSION gates:
- RED: Prove that baseline code inevitably fails in the control tree.
- GREEN: Prove that the candidate fix passes under the same frozen tests.
- REGRESSION: Prove that the candidate fix does not introduce new failures.
- Replayable evidence: Generate structured reports without sensitive information.
- Environment isolation: Use Git worktrees to isolate the control tree and candidate tree, and freeze inputs.
Installation and Enablement¶
The plugin requires DeepSeek Harness 0.1.0-rc.6 and Node.js ^22.19.0 || >=24.0.0.
- Package the plugin:
pnpm pack
- Install to the specified profile:
dsh plugin --profile <profile> add ./dsh-reprolab-0.1.0.tgz
After installation, ensure the host environment’s tools and subprocess services are ready (usually provided by dsh-base).
Typical Usage¶
dsh-reprolab provides a set of tools to manage the complete workflow from baseline to regression checking:
reprolab_start
Parse the repository, freeze the baseline, and create thecontrolandcandidateworktrees.reprolab_set_test
Freeze the reproduction test patch and target test command.reprolab_verify_red
Run the frozen command in the control tree to prove a real test failure.reprolab_set_fix
Freeze a fix patch from the candidate tree that contains only production code.reprolab_verify_green
Run the exact same frozen command in the candidate tree to prove it passes.reprolab_verify_regression
Compare the candidate tree’s failures against the recorded baseline set.reprolab_report
Generatereport.jsonandreport.md.reprolab_status
Check run status, frozen hashes, report freshness, and the next allowed operations.
Configuration Options¶
All configuration options are optional and can take effect through Schemastrory defaults. When overriding, provide the full key-value pairs.
| Key | Type | Default | Meaning |
|---|---|---|---|
runDir |
string | .reprolab |
Run directory (relative to the repository root), containing run state, patches, reports, and worktrees |
graceMs |
number (≥50) | 5000 |
Grace period from SIGTERM to SIGKILL when terminating a subprocess tree |
maxOutputBytes |
number (≥1024) | 1048576 |
In-memory output limit per stream; when exceeded, retain the tail and spill the remainder to disk |
spillMaxBytes |
number (≥1 MiB) | 16777216 |
Total spill limit per stream |
lockStaleMs |
number (≥1000) | 300000 |
Expiration threshold for the repository write lock |
Permissions and External Impact¶
- File system: Only write to
runDir/(default.reprolab/),git worktrees, patch files, and reports inside the target repository. - Processes: Execute Git and user-declared test commands (using argv arrays only, not shell strings). Cancellation or timeout kills the entire process tree.
- Network and telemetry: No network calls, no telemetry data is sent, and no API keys are required.
- Credential security: Child environments start from a sanitized host base environment (removing names such as KEY/PASSWORD/SECRET/TOKEN and DSH_* variables). Output is scrubbed (removing tokens, Authorization, Cookie, passwords, and high-entropy strings).
Applicable Scenarios and Limitations¶
- Concurrency limit: Only one active (non-terminated) run is allowed in the same repository at a time; the write lock uses a fail-fast strategy.
- Cache handling: Test runner cache artifacts (such as
__pycache__,.pytest_cache, andnode_modules/.cache) are ignored by change detection. - Framework support: Classification of
pytestandjestis based on documented output formats (local installation not verified). - Prerequisite: The repository must contain at least one commit (worktrees require a baseline commit).
Uninstallation¶
dsh plugin --profile <profile> remove dsh-reprolab
Uninstallation does not automatically remove run artifacts (runDir/ and worktrees); you must manually remove them after review.
Summary¶
dsh-reprolab provides a rigorous process for generating verifiable fix evidence in DeepSeek Harness. By freezing state, isolating environments (worktrees), and enforcing strict gate checks, it addresses the pain points of test reproduction and regression verification.