Skip to content

Add Synthetic Workspace Gym taskset - #26

Open
ydnyshhh wants to merge 4 commits into
PrimeIntellect-ai:mainfrom
ydnyshhh:feat/synthetic-workspace-gym
Open

ydnyshhh wants to merge 4 commits into
PrimeIntellect-ai:mainfrom
ydnyshhh:feat/synthetic-workspace-gym

Conversation

@ydnyshhh

@ydnyshhh ydnyshhh commented Oct 1, 2026 •

Copy link
Copy Markdown

Summary

This PR adds Synthetic Workspace Gym (SWG) as a native Verifiers V1 environment under environments/synthetic_workspace_gym/. D1-D3 tasks support teacher-trace generation for mid-training/SFT; D4-D5 tasks and held-out compositions support RL and evaluation. The taskset uses Prime's standard Verifiers harness/runtime and has no custom model loop or legacy adapter.

Generation, immutable curriculum construction, validation, and artifact publication are submitted separately in #25.

Native Verifiers V1 design

  • Native vf.Taskset and vf.Task implementations.
  • Typed task data, task state, and configuration.
  • Strict binary @vf.reward (1.0 only on trusted evaluator success, otherwise 0.0); the former partial score is a diagnostic @vf.metric and cannot affect training reward.
  • NEEDS_CONTAINER = True, /workspace, and the standard Bash harness.
  • A real validate(runtime) gold control that applies the reference solution, runs trusted finalization, and requires success with reward exactly 1.0.
  • verifiers>=0.4.0,<0.5; the task uses the 0.4 setup(trace, runtime) hook and applies network restrictions on both published and newer runtime APIs.

Security and reward robustness

Finalization separates three trust domains:

  1. The agent runtime contains only the selected split's visible workspace.
  2. A fresh answer-free execution runtime receives a bounded workspace snapshot and runs candidate-controlled code.
  3. A separate trusted grader receives the executed snapshot, hidden expected values, evaluator code, and host-owned execution metadata, but never executes candidate code.

Review-driven hardening includes:

  • bounded whole-workspace snapshots preserve candidate-created files and deletions;
  • score-bearing execution outputs live outside the agent-writable workspace;
  • candidate commands have a 120-second process-group timeout;
  • output paths are cleared before determinism reruns;
  • nondeterministic command output receives zero reward on every difficulty;
  • output with structure but no semantic overlap is capped at 0.2;
  • observation payloads are framed in a child process and written by the trusted wrapper only after candidate shutdown;
  • network access and transferred paths/file sizes are bounded;
  • untouched baselines are measured through the evaluator that actually ships.

Immutable V5 pins

  • Public dataset: ydnysh/synthetic-workspace-gym
  • Dataset revision: 3ba83f647b96556be8c5084584a2d86e93225684
  • Exporting public generator commit: 3bd13bb949846e7b7393afe81727f1127e984475
  • Export integrity SHA-256: 128c3c984d91e7d46918e0f2f77cab4543943a25e11083bf18d0ad00dcf9f7f8
  • Public Prime namespace/tag: prime/yadnyesh, v5-128c3c98
  • Default curriculum: sft-easy-v5

artifacts.json records the seven completed public Prime VM artifact IDs and CAS paths. Frozen V2-V4 artifacts remain unchanged.

Validation performed

uv run ruff check .
uv run ruff format --check .
uv run pytest -n auto tests -v
uv build environments/synthetic_workspace_gym
  • Ruff and formatting passed.
  • All 7 public-repository package tests passed, including the SWG package build. A focused four-case regression check confirmed that partial diagnostic scores, even 1.0 without success, return zero reward.
  • Taskset sdist and wheel 0.2.4 built successfully. V5 dataset and image pins are unchanged because only the package-level reward mapping changed.
  • V5 passed 1,328/1,328 reference solutions, all 1,328 untouched ceilings, and the focused reward-hacking regressions.
  • The official validate(runtime) gold path completed on Prime with success and reward 1.0.
  • On Verifiers 0.4.0, two Linux/Prime smoke rollouts completed task setup, candidate execution, trusted grading, and reward recording without trace errors. Runner and grader network policies both enforced block=["*"].

Note

Add synthetic-workspace-gym taskset with evaluators, schemas, and trusted grader

  • Adds a new taskset package for the Synthetic Workspace Gym, including task data/state models, taskset loading from a pinned dataset revision, and the SyntheticWorkspaceTask setup, finalization, reward, and validation hooks in taskset.py
  • Adds five family evaluators (tabular, script-repair, pipeline, retrieval-workspace, composite-workspace) with capability scoring, weighted match metrics, required-artifact checks, and a D5CalibratedEvaluator wrapper that cubes scores for failed level-5 tasks, in evaluators/
  • Adds shared schemas in common.py, JSON/IO/path helpers in utils/, and a trusted grader entrypoint in trusted_grader.py that runs the evaluator and writes result JSON
  • Finalization runs the candidate execution plan in an isolated runtime, grades in a no-network grader runtime, and stores evaluator results and file counts in task state
  • Risk: D5CalibratedEvaluator.evaluate alters score semantics for unsuccessful difficulty-5 results (score cubed); evaluators reject unsupported protocol modes (e.g. non-observations-v1 in ScriptRepairEvaluator.evaluate) with ValueError

Macroscope summarized f5a7987.

@snimu
snimu marked this pull request as ready for review October 30, 2026 11:32
@snimu
snimu requested a review from a team as a code owner October 30, 2026 11:32

This branch has not been deployed

No deployments
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