Repository navigation
swe_env/anyswe: fix #1572 server-suite CI + address @ffrujeri review - #1796
Merged
Merged
Conversation
The CI server-suite asserts every candidate module dir (resources_servers/*, responses_api_agents/*, responses_api_models/*) has a README.md and is therefore in the tested set (fail_on_total_and_test_mismatch). The new swe_env library dir had no README, so it counted as a candidate but not a tested module -> the total-vs-tested mismatch assertion failed on every shard. Adding the README makes the counts match and runs swe_env's unit tests (FakeProvider-backed, no Docker) in CI. swe_env is a library: data validation is skipped (non-resources_servers path). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Codex <[email protected]>
adil-a
added a commit
that referenced
this pull request
Jun 29, 2026
…ine) (#1802) Addresses @ffrujeri's review on #1572 (all 13 inline comments) plus the reward-profiling baseline. Targets `cmunley1/anyswe`. > Note: the swe_env `README.md` / `ng_test_all` CI-unblock landed separately via #1796 (merged). This PR is the review-comment fixes + docs + gold baseline on top of that. ## Review-comment fixes (@ffrujeri) | # | Comment | Fix | |---|---|---| | 1 | truncation mask never fires | inner agents (hermes/claude_code) now emit top-level `status="incomplete"` on internal max-turns/context/timeout; anyswe masks `resolved AND incomplete` (verified the status round-trips through `response.json`). openclaw exposes no internal signal → documented. | | 2 | openclaw config not runnable | select the apptainer provider for its `.sif` formatter; drop dead `apptainer_memory_limit_mb`/`skip_eval` fields. | | 3 | docker timeout gaps | configurable default `exec` timeout + bounded `close`/`cp` so a hung in-container command can't block a rollout. | | 4 | reward-profiling evidence | gold-patch baseline in the swe_env README (below). | | 5 | `_setup_params` assumes str `instance_dict` | accept str **or** dict (mirror `_build_swetask`). | | 6 | r2egym docstring | missing `eval_script` is unmasked reward-0, not an eval-error mask. | | 7 | missing docker binary | wrap `FileNotFoundError` → clear `SandboxCreateError`. | | 8 | unquoted shell interpolation | `shlex.quote` dataset values in `bash -c` (nv_internal/harness/swe_bench_ext). | | 9 | rc 125/126/127 infra-classify | narrow to **rc 125** only (126/127 are legit user-command codes). | | 10 | swe_rebench inflates on empty-required | empty-required guard (consistent with `compute_resolved`). | | 11 | unmasked infra failure on docker grade | mask `SandboxCreateError`/image-pull (`error_kind="sandbox"`). | | 12 | per-framework parsers untested | add `test_parsing_frameworks.py` (the 7 reviewer cases). | | 13 | docs discoverability | add a fern SWE-Environment page. | ## Gold-patch baseline (review #4) — at parity with the nested reference A full 500-instance SWE-bench Verified **gold-patch census on docker** resolves **493/500** (`patch_exists` 500/500, 0 infra errors), matching the apptainer/`.sif` *nested* reference **492/500** to within environment noise; empty patch **0/500**. (docker and apptainer both use the host-side flat grader here, so they're 1-1; the `.sif` figure is swebench's nested `run_evaluation`.) The census surfaced + fixed two real flat↔nested **reconstruction** gaps (445 → 486 → 493), verified with **0 regressions**: - **`PYTEST_ADDOPTS=-rA`**: swebench 4.1.0's eval for some families (sphinx via `tox`, several sklearn) runs pytest without `-rA`, so passing tests print only as dots and the host-side parser saw zero passes → ~45 unresolved even for gold (445→486). - **drop `GIT_CONFIG_GLOBAL=/dev/null`**: older images' git can't parse `/dev/null`, so the eval's `git checkout` + test-patch `git apply` failed → required tests "absent" (486→493). The remaining 7 misses are a small symmetric difference with `.sif` (4 shared genuine env-flaky: astropy-7606/8707/8872, django-10097; 3 docker-only sphinx instance-specific quirks; docker also resolves 4 that `.sif` misses). ## Validation - 258 unit tests pass (swe_env + docker provider + anyswe + claude_code/openclaw); ruff clean; `fern check` clean. - The `#1` truncation logic was adversarially verified end-to-end (top-level `status` survives the container→host round-trip; the mask is live). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Codex <[email protected]> Co-authored-by: Codex <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
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.
Unblocks #1572's server-suite CI and addresses @ffrujeri's review on #1572. Targets
cmunley1/anyswe.CI unblock
README.md→ng_test_all(withfail_on_total_and_test_mismatch) failed the total-vs-tested module assertion on every shard. Adding the README makes the counts match and runs swe_env's unit tests in CI.Review-comment fixes (@ffrujeri)
status="incomplete"on internal max-turns/context/timeout; anyswe masksresolved AND incomplete(verified the status round-trips throughresponse.json). openclaw exposes no internal signal → documented..sifformatter; drop deadapptainer_memory_limit_mb/skip_evalfields.exectimeout + boundedclose/cpso a hung in-container command can't block a rollout._setup_paramsassumes strinstance_dict_build_swetask).eval_scriptis unmasked reward-0, not an eval-error mask.FileNotFoundError→ clearSandboxCreateError.shlex.quotedataset values inbash -c(nv_internal/harness/swe_bench_ext).compute_resolved).SandboxCreateError/image-pull (error_kind="sandbox").test_parsing_frameworks.py(the 7 reviewer cases).Gold-patch baseline (review #4) — and a fidelity fix it surfaced
A full 500-instance SWE-bench Verified gold-patch census on docker resolves 486/500 (
patch_exists500/500, 0 infra errors), in line with the apptainer/.sifnested reference 492/500; empty patch 0/500.The census caught a real docker-flat grading bug: swebench 4.1.0's eval command for some families (sphinx via
tox, several sklearn) runs pytest without-rA, so passing tests print only as dots and the host-side parser (parse_log_pytest_v2) saw zero passes → ~45 instances unresolved even for the gold patch (445/500). Fixed by forcingPYTEST_ADDOPTS=-rAin the flat eval (445→486). The remaining ~14 are instance-specific (documented astropy/django flaky gold-failures + a few single-test-not-run cases).Validation
fern checkclean.#1truncation logic was adversarially verified end-to-end (status survives the container→host round-trip; the mask is live).Notes
5b40359c) is a separate sign-off, tracked by the repo owner.🤖 Generated with Claude Code