DeepSeek Harness Engineering Architecture

DeepSeek Harness Architecture & 4-Stage Execution Pipeline

How to design a deterministic engineering harness around DeepSeek-R1 and DeepSeek-V3.2 for automated bug repair, code review, and benchmark evaluation.

DeepSeek Harness Pipeline

Stage 01 · Isolated Workspace Snapshot

Mount a clean git worktree or ephemeral container rootfs with a frozen test oracle so parallel DeepSeek Harness workers never pollute host state.

DeepSeek Harness Pipeline

Stage 02 · Prefix-Cached Reasoning & Tool Loop

Pin system instructions and repository symbol maps at the prefix boundary to achieve 80%+ KV-cache hits while DeepSeek-R1 plans and executes edits.

DeepSeek Harness Pipeline

Stage 03 · Deterministic Verification Gate

Run fast AST syntax checks, linter rules, and targeted unit tests after every patch; feed structured diagnostics back if any invariant fails.

DeepSeek Harness Pipeline

Stage 04 · Trajectory Audit & Pass@k Report

Persist the full <think> reasoning trace, unified diff, token cache hit ratio, and test outcome into JSONL artifacts for regression auditing.