yuttfu / dsh-reprolab

목록에 있음

dsh-reprolab — a deterministic bug-proof executor for DeepSeek Harness: frozen repro tests, RED/GREEN/REGRESSION gates, and replayable evidence. Complements session-level discipline plugins such as dsh-doublecheck.

main세션 소스 보기

설치

npx -y @deepseek-ai/dsh plugin --profile web add github:yuttfu/dsh-reprolab

이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 bdf332e동기화 2026. 8. 18.

dsh-reprolab

A complete bug-to-proof workflow for DeepSeek Harness: frozen repro tests, RED/GREEN/REGRESSION gates, and replayable evidence.

dsh-reprolab (ReproLab) turns an issue, an error message or reproduction steps into auditable fix evidence:

baseline code + frozen repro test        → must fail     (RED)
candidate fix + the SAME frozen test     → must pass     (GREEN)
regression check                         → no new failures (REGRESSION)
evidence report                          → replayable, redacted (REPORT)

ReproLab is a deterministic bug-proof executor that complements session-level discipline plugins such as dsh-doublecheck. Your Harness session writes the tests and the fix; ReproLab isolates worktrees, freezes inputs, runs the quality gates and produces the evidence.

The nine tools

ToolPurposeKey result
reprolab_startResolve repo, freeze baseline, create control/candidate worktrees, optionally record the baseline regression failure setrunId, worktree paths, baseline, baselineRegression
reprolab_set_testFreeze the repro test patch + the target test commandtestPatch hash, command hash
reprolab_verify_redRun the frozen command in control and prove a genuine test failureverdict: valid_red, failure fingerprint
reprolab_set_fixFreeze the production-only fix patch from candidatefixPatch hash, changed files
reprolab_verify_greenRun the exact same frozen command in candidate and prove it passesverdict: valid_green
reprolab_verify_regressionCompare candidate failures with the recorded baseline setpass / pass_with_baseline_failures / regression / inconclusive
reprolab_statusStructured run state, frozen hashes, report staleness, next legal actionsnextActions — no prose to parse
reprolab_reportGenerate/refresh report.json + report.md from one shared modelreport path + recomputable sha256
reprolab_abortAbort and keep the scene for inspectionretained paths

A nonzero exit code alone is never RED: test-not-discovered, syntax errors, missing imports, timeouts, crashes and cancellations are all excluded, and RED/GREEN must use identical test-patch and command hashes.

Installation

DeepSeek Harness 0.1.0-rc.6, Node ^22.19.0 || >=24.0.0.

From a packed artifact (built dist/ included):

pnpm pack                                    # → dsh-reprolab-0.1.0.tgz
dsh plugin --profile <profile> add ./dsh-reprolab-0.1.0.tgz
dsh --profile <profile>

From the repository directory (dev):

dsh plugin --profile <profile> add ./dsh-reprolab

Both forms require the host's in-box tools and subprocess services (provided by dsh-base in every profile).

Configuration

All fields are optional and defaulted by the Schemastery schema. Bundle patch rows replace the whole config per row, so restate every key when overriding.

KeyTypeDefaultMeaning
runDirstring.reprolabDirectory (relative to repo root) for runs, worktrees, patches and reports
graceMsnumber (≥50)5000SIGTERM→SIGKILL grace when terminating child process trees
maxOutputBytesnumber (≥1024)1048576In-memory output cap per stream; overflow keeps the tail and spills the full stream
spillMaxBytesnumber (≥1 MiB)16777216Whole-stream spill cap per stream
lockStaleMsnumber (≥1000)300000Repo write-lock staleness threshold (stealing still requires a dead owner)

Permissions and external side effects

ReproLab writes only inside the target repository: runDir/ (default .reprolab/) with run state, patches, reports, and git worktree directories. Side effects:

  • Filesystem: creates runDir/runs/<run-id>/, runDir/worktrees/<run-id>-{control,candidate}/, baseline.patch, test.patch, fix.patch, report.json, report.md; reads repository files.
  • Processes: executes Git (structured argv, explicit cwd, no shell) and the test commands you declare (argv arrays only, never shell strings). Cancellation/timeout kills the whole process tree.
  • Git: creates/removes worktrees registered under runDir/worktrees; never resets, checks out, cleans or commits on your current branch. Cleanup is a separate explicit primitive (not a tool).
  • Network / telemetry / keys: none. The plugin makes no network calls, sends no telemetry and needs no API keys.
  • Credentials: child environments start from the host's scrubbed base (KEY/PASSWORD/SECRET/TOKEN names and DSH_* are stripped); output is redacted (tokens, Authorization, cookies, passwords, high-entropy strings) before records or reports are written.

Quick demo (node:test)

> reprolab_start { repoPath: "/path/to/repo", baselineCommand: { argv: ["node","--test"], framework: "node:test" } }
  → runId run_…, state baseline_checked, control + candidate worktree paths
# you write the repro test in the candidate worktree
> reprolab_set_test { runId, declaredTestFiles: ["bug.test.mjs"], command: { argv: ["node","--test","bug.test.mjs"], framework: "node:test" } }
  → state test_frozen, testPatch hash
> reprolab_verify_red { runId }
  → verdict valid_red, failure fingerprint, state red_verified
# you fix the production code in candidate
> reprolab_set_fix { runId }                          → state fix_frozen
> reprolab_verify_green { runId }                     → verdict valid_green
> reprolab_verify_regression { runId, command: { argv: ["node","--test"], framework: "node:test" } }
  → verdict pass (or pass_with_baseline_failures), state regression_verified
> reprolab_report { runId }                           → reportPath, reportHash (sha256 of report.json)
> reprolab_status { runId }                           → state reported, nextActions []

Report staleness: if any evidence input changes after reporting (e.g. the tests are re-frozen), reprolab_status reports report.stale: true.

Compatibility

ComponentVersion
DeepSeek Harness0.1.0-rc.6
@deepseek-ai/cordis^4.0.1 (peer)
@deepseek-ai/dsh-subprocess / dsh-tools / dsh-brand0.1.0-rc.6
@deepseek-ai/schemastery^3.18.1

All host contracts were verified first-hand against the installed official packages and the official docs snapshot.

Known limitations

  • One active (non-terminal) run per repository at a time; the write lock is fail-fast (RUN_ALREADY_ACTIVE), not queued.
  • pytest and jest classification is based on the documented output formats (no local pytest/jest installs were available); vitest and node:test formats were captured from real runs. Python projects use unittest + the generic classifier.
  • Test-runner cache artifacts (__pycache__, .pyc, .pytest_cache, .coverage, htmlcov, .vite, node_modules/.cache) are ignored by change detection — an allowlist, not an ignore-all.
  • The repository needs at least one commit (worktrees require a baseline commit).
  • dsh-windtunnel's scripted adapter is currently incompatible with DSH 0.1.0-rc.6 (third-party issue). Real-host lifecycle (install/enable/disable/uninstall/reinstall) was verified through the real dsh CLI on a clean headless profile.

Uninstall

dsh plugin --profile <profile> remove dsh-reprolab

This removes the bundle row and package. Run artifacts (runDir/ and worktrees) are not deleted by uninstall — remove them explicitly with git worktree remove after inspecting them. Active runs terminate their child processes on plugin unload (host subprocess service disposal).

Troubleshooting

Recovery guidance for every error code, worktree cleanup, stale locks and invalidated runs: docs/troubleshooting.md. Security model: docs/security.md. Architecture: docs/architecture.md.

Development

pnpm install
pnpm run check            # lint + typecheck + build + verify:manifest
pnpm pack                 # → dsh-reprolab-0.1.0.tgz (dist/, cordis.patch.yml, README, LICENSE)

MIT License.

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

보안 정책감지됨
문서감지됨

저장소 정보

언어
TypeScript
라이선스
MIT
마지막 업데이트
2026. 8. 16. 오전 6:49

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.