Introduction¶
When running agent tasks with DeepSeek Harness (DSH), a common issue is models responding “done” when the task is actually incomplete. These false completions allow downstream processes to proceed, leading to dirty data, resource waste, and even business errors. Current approaches typically rely on manual inspection or the model’s own self-assessment, lacking reproducible and auditable enforcement gates. false-completion-bundle addresses this through a “completion claim + evidence chain + multiple verifiers” mechanism, turning “done” into a gate that requires verifiable evidence to pass, and logging rejection reasons.
Plugin Overview¶
false-completion-bundle is a DSH plugin package classified under admin-security. It provides a set of gating logic that intercepts done declarations within the DSH process, requiring them to be accompanied by verifiable evidence; otherwise, the declaration is rejected and the rejection reason is logged. The plugin itself contains no LLM-based judgment—all verification is performed by deterministic checks such as external commands, file operations, and browser assertions.
Core Capabilities¶
1. Evidence Chain and Gating¶
The plugin implements evidence ledger and claim gating in Phase 1:
- Evidence export: Each tool call’s evidence (trace_id, tool name, parameter hash, result hash, exit code, errors, timestamps, side-effect diffs, etc.) is exported to a backend (e.g., Langfuse, Phoenix) via OTLP/HTTP. Export failure triggers
onEmissionFailureand rejects the current claim. - Evidence ledger:
OtelLedgerAdaptercomputes SHA-256 hashes based on the canonical JSON of parameters, generating stableev_<digest>references. SupportsgetEntry(ref)to query an entry’sokstatus for downstream verification. - Claim gating:
claimGuardinspectsdonedeclarations and rejects the following cases: no evidence, unresolved evidence ID, orok=falsein the evidence ledger. It returns structured issues rather than throwing untyped errors.
2. Multiple Verifiers¶
Phase 3 provides three verifier types, selectable via configuration:
- CLI verifier: Executes commands from an allowlist (e.g.,
vitest,pytest,tsc,eslint, etc.) and judges by exit code: 0 means pass, non-zero means fail. The SHA-256 of stdout+stderr becomes the evidence reference. - Filesystem verifier: Invokes Filesystem MCP’s
readFile; fails if the file does not exist. Optionally requires the content hash to match a specified SHA-256. - Playwright verifier: Invokes Playwright MCP’s
assertto check element state (selector, text, state, url);ok: falsemeans failure.
None of the verifiers use LLM judgment. Unknown types return unknown and will not auto-pass.
3. Profiles and Strict Mode¶
The plugin provides three preset profiles:
minimal.yml(default): Activates gating + filesystem verifier; Python verifier is disabled; Playwright/GitHub verifiers auto-emit warnings. Works out of the box without configuration changes.standard.yml: On top of minimal, enables the Python verifier, requiringVERIFIER_BACKENDto be set toragas,trulens, ordeepeval; otherwise, mounting is rejected and the setup command is printed.strict-best-effort.yml: Requires all verifiers to be ready. If dependencies are missing, the!!jsguard fails at mount time and logs an error. The DSH host still starts under strict mode (exit code 0), so strict mode is best-effort, not a hard guarantee. In regulated environments, pair it with a shell check script to ensure fail-fast behavior.
4. Evidence Export and Configuration¶
- The exporter uses OTLP/HTTP, with endpoint and authentication headers configured via environment variables.
- Deployment-specific key names can be added (comma-separated, case-insensitive) to the default redaction list via
AUDIT_REDACT_KEYS. - Maximum retry count defaults to 1 (
DEFAULT_MAX_RETRIES), overridable via theFALSE_COMPLETION_MAX_RETRIESenvironment variable.
Installation and Enablement¶
Add the plugin to DSH and enable the default profile:
dsh plugin --profile work add false-completion-bundle
dsh run --profile work
The first run requires network access, as MCP verifiers pull packages via npx -p. For offline/production deployments, pre-install packages per Pin policy and set npm_config_offline=true:
npx -y -p @modelcontextprotocol/server-filesystem@2.4.0 -c true
npx -y -p @playwright/mcp@0.0.86 -c true
export npm_config_offline=true
Typical Usage¶
- Start DSH with the default profile; gating and the filesystem verifier are automatically activated. If conditions are not met, DSH prints the rejection reason in the logs.
- Declare the claims and evidence types that require verification in the profile (e.g.,
verification.type: filesystem), and generate the correspondingev_<digest>in the evidence ledger. - If the Python verifier is enabled, set the backend environment variable and install dependencies first:
python3 -m venv .venv
.venv/bin/pip install -r python/mcp_verifier/requirements.txt
export VERIFIER_BACKEND=ragas
- If the Playwright verifier is enabled, install browser binaries and set the environment variable:
npx playwright install chromium
export DSH_FALSE_COMPLETION_PLAYWRIGHT=1
Applicable Scenarios and Notes¶
- Suited for scenarios requiring that “done” in DSH tasks must be accompanied by verifiable evidence, such as automated testing, code builds, and document generation.
- The plugin runs with the permissions of the current DSH process. Review the source code and license before installation.
- All MCP servers are official packages; the plugin declares dependencies via profiles and does not include custom MCP servers or browser automation code.
- The Python verifier is disabled by default, as the absence of a deterministic backend can cause frequent hangs;
VERIFIER_BACKENDmust be configured to enable it.
Summary¶
false-completion-bundle implements a mandatory “completion must be verifiable” gate in DSH through an evidence ledger, claim gating, and multiple deterministic verifiers, logging rejection reasons and supporting multi-profile configuration. For agent workflows that require strict assurance of task completion quality, this is a practical tool that can be deployed in production.
Links¶
- Plugin directory page: https://www.skillhub.cn/plugins/os1249399459/false-completion-bundle
- GitHub: https://github.com/os1249399459/false-completion-bundle