Skip to content

harbor: add DeepSeek Harness - #1786

Merged
burtenshaw merged 6 commits into
openenv:mainfrom
younesbelkada:harbor/deepseek-harness
Dec 1, 2026
Merged

burtenshaw merged 6 commits into
openenv:mainfrom
younesbelkada:harbor/deepseek-harness

Conversation

@younesbelkada

@younesbelkada younesbelkada commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds DeepSeek Harness (dsh, MIT) as a deepseek-harness seam. Harbor has no adapter for it, so openenv/harbor/deepseek_harness.py adds InterceptDeepSeekHarness. It's the harness-leaderboard's setup with its model route pointed at the capture proxy:

  • the same npm pin (0.2.2-rc.1), on Node 24;
  • the same command, dsh headless --patch <profile> --json --permission-mode danger-full-access;
  • the same three-entry profile patch, with the base URL and key replaced by the proxy and the capture session.

Type of Change

  • New feature

Changes

  • deepseek_harness.py:
    • profile_patch: the route model as a custom openai-completions provider, text input only, the run's context window, longest reply and effort, and web search off;
    • InterceptDeepSeekHarness: install, run and error reporting. A failed run's error starts with the tail of dsh's stderr and its last events.
  • Install: many sandboxes start at once in training, so the install downloads a prebuilt bundle of Node 24.23.0 + dsh from harness-hub/agent-bundles, checks its SHA-256 and unpacks it. It falls back to nvm + npm install -g if the download fails, the hash doesn't match, the machine isn't x86_64, or another version is pinned.
  • seams.py: deepseek-harness, status untested.
    • Effort and limits come from OPENENV_DSH_EFFORT (default high; none turns thinking off), OPENENV_DSH_CONTEXT_WINDOW (65536) and OPENENV_DSH_MAX_TOKENS (32768), read where the server runs.
    • training_kwargs turns web fetch off: a fetched page is outside the task.
  • Tests: test_harbor_qualification.py compares against len(SEAMS) instead of a hard-coded 29. The hermes PR makes the same one-line change, so the two merge cleanly in either order.

Test Plan

tests/envs/test_harbor_deepseek_harness.py (7 tests):

  • the seam's defaults, the server's settings, web fetch off in training;
  • the profile route, effort none mapped to dsh's off;
  • refusing to run without a route;
  • the install command (bundle URL and hash, npm fallback).
PYTHONPATH=src:envs uv run pytest tests/envs/test_harbor_*.py tests/envs/test_capture_*.py

773 passed, 7 skipped. ruff format --check, ruff check and usort check are clean.

Used in production through a runtime-registered seam (this same module) for GRPO training and Terminal-Bench evals with HF Sandboxes and Harbor 0.25. The status stays untested until a rollout through this exact seam has been checked.

RFC Status

  • Not required (bug fix, docs, minor refactoring)

🤖 Generated with Claude Code


Note

Medium Risk
Adds sandbox install logic (remote bundle download) and a new agent path that runs headless with full file access; misconfigured intercept could refuse runs or affect rollout rewards via web-fetch behavior in training.

Overview
Adds DeepSeek Harness (deepseek-harness) as a new Harbor agent seam, since Harbor has no native adapter. A new InterceptDeepSeekHarness runs npm dsh headless in the sandbox with a three-part profile patch that points the model route at the capture proxy (session id as API key) instead of DeepSeek's platform.

Install prefers a SHA-256–verified Hub bundle (Node 24 + pinned dsh) for fast training rollouts, with nvm/npm fallback. Seam wiring in seams.py passes intercept_config via kwargs; effort and token limits come from OPENENV_DSH_EFFORT, OPENENV_DSH_CONTEXT_WINDOW, and OPENENV_DSH_MAX_TOKENS, and training rollouts disable web fetch. Docs update known-agent counts (30→31). New unit tests cover seam resolution, profile routing, and install command shape. Seam status is untested until an end-to-end validated rollout.

Reviewed by Cursor Bugbot for commit 2a63f35. Bugbot is set up for automated code reviews on this repo. Configure here.

Harbor has no adapter for DeepSeek Harness (dsh). InterceptDeepSeekHarness is
the harness-leaderboard's setup (the same npm pin, command and three-entry
profile patch) with its model route pointed at the capture proxy and the
capture session as its key. It installs from a sha256-checked prebuilt bundle
of Node 24 + dsh on the Hub, falling back to nvm and npm.

The deepseek-harness seam reads the run's effort and limits from
OPENENV_DSH_EFFORT, OPENENV_DSH_CONTEXT_WINDOW and OPENENV_DSH_MAX_TOKENS, and
turns web fetch off in training.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

The docs for this pull request are available at https://openenv.github.io/OpenEnv/pr-preview/pr-1786/ (commit 2a63f35). The preview may take a minute to update and is removed when the pull request closes.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 53f8c5a. Configure here.

)
await self.exec_as_agent(
environment,
command="set -euo pipefail; bundled=0; " + bundle_install,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm fallback breaks under nounset

Medium Severity

The advertised nvm fallback sources nvm.sh in the same shell that already enabled set -euo pipefail. nvm's installer is not safe under nounset/errexit, so a missed bundle (non-x86_64, checksum mismatch, or download failure) can abort install instead of recovering.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 53f8c5a. Configure here.

younesbelkada and others added 5 commits December 1, 2026 15:17
npm's latest tag for @deepseek-ai/dsh is now 0.2.2-rc.5; 0.2.2-rc.1 is the
harness-leaderboard's pin.

Co-authored-by: Cursor <cursoragent@cursor.com>
A re-upload on the dataset's main would fail the sha256 check and send every install to the npm fallback; the commit URL keeps serving the file the hash names.

Co-authored-by: Cursor <cursoragent@cursor.com>
The seam is untested, so it gets no row in the validated table; the totals below it move from 30 known and 15 untested to 31 and 16.

Co-authored-by: Cursor <cursoragent@cursor.com>
@burtenshaw
burtenshaw merged commit 822e61f into openenv:main Dec 1, 2026
18 checks passed
@younesbelkada
younesbelkada deleted the harbor/deepseek-harness branch December 1, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants