dongsheng123132/dsh-recovery-proof

DeepSeek Harness 的只读恢复演练证据

项目介绍Project Overview

DSH Recovery Proof 是面向 DeepSeek Harness 的只读恢复演练证据验证器。它校验外部演练后产出的清单与事件,核对预态/恢复/回滚对象 SHA-256、相位顺序、RTO 阈值及失效回滚与陈旧计划拒绝规则,并输出内容寻址的 JSON 报告。在需要审计已执行恢复演练结果、验证证据完整性时使用。注意它不执行恢复、不创建检查点,也不替代 Turn Rewind 或 Checkpoint Rewind。

DSH Recovery Proof is a read-only recovery-drill evidence verifier for DeepSeek Harness. It validates manifests and event streams from external drills, checking SHA-256 hashes of prestate, rescue, restored, and rollback objects, phase ordering, RTO thresholds, rollback behavior, and stale-plan rejection, then emits a content-addressed JSON report. Use it when auditing completed recovery drills and confirming evidence integrity. It does not perform recovery, create checkpoints, or replace executors such as Turn Rewind or Checkpoint Rewind.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:dongsheng123132/dsh-recovery-proof

dongsheng123132/dsh-recovery-proof 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DSH Recovery Proof

CI MIT license Node.js 22+ Awesome DSH Plugins

A read-only recovery-drill evidence verifier for DeepSeek Harness. It does not restore files, create checkpoints, or replace recovery executors such as Turn Rewind or Checkpoint Rewind. It verifies that an external drill left reproducible evidence. Version 0.2.0 is also a formal Codex plugin with a proof-only MCP server, and its namespace export is regression-tested against the stock DSH Web Loader.

What it proves

  • every referenced prestate, rescue, restored or rollback object is a regular workspace file with the declared SHA-256 and revision;
  • recovery, failed-apply rollback and stale-plan rejection follow the manifest's exact phase sequence;
  • rescue evidence exists before apply, failed apply is followed by successful rollback, and stale plans are rejected;
  • accumulated structural event duration remains within each scenario's RTO threshold;
  • missing/stale evidence and every failed rule are disclosed in a content-addressed JSON report.

Inputs are explicit JSON/JSONL files. Secret-, token-, prompt-, chat- and content-shaped fields are rejected. Object contents are never included in output. The verifier writes only to the explicit workspace-relative artifactDir, using an atomic write and SHA-256 read-back check.

Install and compose

dsh plugin install github:dongsheng123132/dsh-recovery-proof
dsh plugin compose dsh-recovery-proof

The bundle registers dsh_recovery_proof_inspect and dsh_recovery_proof_verify. The package intentionally exports a Cordis namespace (name, inject, apply) rather than a default function so the stock Loader retains the tools injection declaration.

CLI

dsh-recovery-proof inspect --workspace-root ./examples/basic --manifest recovery.manifest.json
dsh-recovery-proof verify --workspace-root ./examples/basic --manifest recovery.manifest.json --events recovery.events.jsonl --artifact-dir artifacts

Exit code 0 means the command ran and verification passed, 2 means the evidence was processed but failed policy, and 1 means invalid or unsafe input.

Manifest and events

See examples/basic. A manifest pins system.revision, content-addressed objects, and explicit scenarios with expectedPhases, requiredObjectIds, and maxRtoMs. Events contain only structural facts: unique idempotency key, scenario, sequence, phase, status, duration and object references.

Codex and proof-only MCP

The repository retains a validated .codex-plugin/plugin.json and declares the stdio server in .mcp.json. MCP exposes:

  • recovery_manifest_inspect for bounded inline manifest validation;
  • recovery_evidence_verify for bounded inline JSONL phase/RTO/rollback/stale-plan checks.

Both MCP tools reuse the same validation core as DSH and CLI, but never access the filesystem, dereference object paths, write an artifact or execute a recovery action. Their result explicitly states that object-content verification was not performed. Use the DSH or CLI surface when object hashes and the content-addressed report must be verified against a workspace.

Security boundary

All input paths and the output directory must remain under workspaceRoot; symlink inputs and symlink output directories are rejected. No shell is spawned, no network is used, no recovery action is executed, and there are no install lifecycle scripts.

Development

npm test
npm run check
npm run smoke:plugin
npm run smoke:mcp

# Requires a built DeepSeek Harness checkout.
DSH_CHECKOUT=/path/to/deepseek-harness npm run smoke:dsh
DSH_CHECKOUT=/path/to/deepseek-harness DSH_HOME=/path/to/isolated-home npm run smoke:web-loader

MIT

上一个 Prev DSH-mobile-sync 下一个 Next dsh-mcp-manager