Rebuild as a general coding environment with diff-based grading#14
Draft
jdchawla29 wants to merge 2 commits into
Draft
Rebuild as a general coding environment with diff-based grading#14jdchawla29 wants to merge 2 commits into
jdchawla29 wants to merge 2 commits into
Conversation
One env, three task flavors on a shared repo lifecycle (vault the real .git outside the workspace, hand the agent a fresh single-commit repo, grade the captured diff hermetically with hidden tests brought in after): - coding-task: the 3-branch convention as template args, graded by a test command's exit code; runs locally or from a baked image - sdlc-task: adds a bare mock-GitHub remote plus github_* MCP tools; the deliverable is a pushed branch with a pull request, graded on the PR head with tests plus a structural or LLM-rubric PR check - SWE-bench Pro: swe_tasks.py fetches instances and builds their prebuilt images into servable envs; grading replays the official evaluator (fail_to_pass and pass_to_pass must all pass) Dockerfile.hud is the single image definition for generic and instance builds. Validation: hermetic golden/baseline rollouts for both local flavors, gold-patch integration tests for SWE-bench instances, and both flavors verified against the deployed platform env.
The SDK workspace now owns the privilege wall (setpriv drop, external credentials, exec-channel file I/O), so the local UidWallWorkspace subclass is gone. Ownership of the baked repo follows "chown what you stage": the generic build chowns /app in the clone step, and task setup keeps its chown -R for files root mutates per task, so workspace boot stays O(1).
jdchawla29
force-pushed
the
v6-coding-env
branch
from
July 21, 2026 01:51
506e4e7 to
e26e136
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebuilds the template as one
codingenvironment with three task flavors on a shared repo lifecycle (coding/repo.py): task setup vaults the repo's real.gitoutside the workspace and hands the agent a fresh single-commit repo (working git, no history/refs/remotes to mine); grading discards the agent's.git, restores the vault, re-applies the captured diff, and brings hidden tests in after it.coding-task— the original 3-branch convention ({task}_baseline/_test/_golden) as template args, graded by a test command's exit code. Runs locally (per-process clone ofREPO_URL) or from a baked image.tasks.pykeeps the four sample bugs.sdlc-task— adds workflow: a bare mock-GitHub remote the agent pushes to plusgithub_*MCP tools (coding/github.py, self-contained, nohud-sdlc-lib). Deliverable is a pushed branch with a PR; graded on the PR head (tests 0.8 + structural orpr_rubricLLM-judged PR check 0.2). Sample:sentry-fix-pr.swe_tasks.pyfetches dataset rows + officialrun_script.sh/parser.pyand builds the prebuiltjefzda/sweap-imagesinto servable envs (Dockerfile.hudis the single image definition for both generic and instance builds, selected byBASE/INSTANCE_IDbuild args). Grading replays the official evaluator: resolved iff everyfail_to_passandpass_to_passtest passes.In images the vault/instance assets sit under
/hud(root, 700) and agent shells drop to uid 1000 viasetpriv; once hud-python#496 (Workspace(shell_uid=...)) ships,UidWallWorkspaceinenv.pycollapses to a constructor arg.Test plan
coding-taskandsdlc-tasktests/test_integration.py): NodeBB instance, golden patch → 1.0, baseline → 0.0 (amd64 emulation)hud deploy, hosted golden validations for both flavors → 1.0, and a live Claude rollout onsentry-fix-pr→ 1.0 (issue read via tunneled MCP tools, branch pushed, PR opened)