Skip to content

feat(standard): prepare agents before offline container work - #284

Merged
aitianshi merged 13 commits into
mainfrom
fix/agent-preparation
Nov 23, 2026
Merged

aitianshi merged 13 commits into
mainfrom
fix/agent-preparation

Conversation

@aitianshi

@aitianshi aitianshi commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #37

What

Add unchanged SWE-agent v1.1.0 with pinned dependencies and proven agent.workspace/v1 conformance: both checks passed using OpenRouter openai/gpt-4.1 on an explicit digest-pinned root fixture. Agent preparation installs upstream tools with temporary public proxy access, which is removed before model calls. Task Python is preserved; unsupported legacy interpreters are refused.

Preparation cleans its temporary tool uploads without removing dependencies and checks command availability after reset. Task PATH is set once through upstream startup commands. Benchmark-restricted agents can prove their kits without broadening their benchmark scope. Capped CLI conformance refreshes prices and refuses a failed refresh.

Remaining validation: the selected SWE-bench instance ran in its own pinned container but hit its spending guard before grading. It has no score. Keep #37 open pending a completed instance result and review; no reference-agent promotion is claimed. No upstream source, prompts, tests, scoring or dependency pins were patched to produce these results.

Touches

Standard preparation, definitions, conformance CLI and proof provenance; explicit root workspace fixture; SWE-agent catalogue and wrapper; documentation, agent text-resource packaging and regression tests.

Verified

  • Fixed CI packaging failure: agent .txt resources now ship in the wheel, including tools.constraints.txt. Fresh wheel build and the full isolated installed-package verifier passed.
  • Updated from main after DigitalMate merged, preserving both catalogue entries. Preparation, conformance, layering and catalogue checks: 39 tests, OK, one Docker-tier skip.
  • After refactor(standard): sort the package into folders, share the file writer and split the trace reader #290 squash-merged, rebased onto main at dab3ec0f. The final Git tree is identical to the previously tested head; no source changes or paid test runs.
  • Rebase validation: 3,163 backend tests ran; the sole failure was the settings inventory treating the task container PATH as an application setting. Corrected its OS-variable classification, then all 92 settings/preparation/layering/container regression tests passed (six Docker-tier skips). All 715 route tests passed. Preparation step validation moved unchanged into the contract package; syntax-tree comparison confirmed the executable function is identical. No paid runs were repeated; live evidence below retains its original source versions.
  • Live workspace conformance: 2/2, reward 1.0 each, including upstream final submission. Write used nine calls ($0.019942); fix used ten ($0.021450). The catalogue records provider/model, upstream version and root fixture digest.
  • Fixture: django-17087@sha256:fef77b052bf6729f7b6326b3b485b8a63ac1dc39b6e1c7040242aa2d3b2dc656. Original kit controls: nop 0/2, oracle 2/2.
  • Real django__django-17087 attempt: nine HTTP 200 model responses, $0.162272 spent. The next call reserved approximately $0.0899 and was refused by its $0.25 unit cap. UnitSpendingCapError, no verifier score. Agent execution remained offline.
  • Earlier eight-call workspace attempts exposed and verified the repaired tool-path defect, then reached the cap during upstream review/final submission. Their costs remain counted; their failed records were not rewritten.
  • All SWE-agent cannot be run by the standard as shipped: it needs root in the kits and the internet at start #37 attempts: $0.269534 spent of $0.75, held/unsettled $0, $0.480466 remaining. Instance remainder is $0.087728; unused workspace allowances were not transferred. All authorized attempts ended; no further paid run is active.
  • Latest preparation/conformance/catalogue tests: 35 ran, 34 passed, one Docker-tier skip. Agent/catalogue/builder route tests: 81 passed. Runner regressions after conformance changes: 67 ran, 66 passed, one skip.
  • Initial implementation full suites: 3,127 backend and 714 route tests passed; those runs predate the follow-ups above.
  • Real Docker proxy teardown and unchanged upstream tool installation verified. Existing directories are refused, task Python is preserved, and temporary uploads are removed. Owned containers/networks from the latest jobs are gone. Generated documentation and diff checks pass.

Risk

Preparation runs as root in the task container. Proxy teardown fails closed; the proof's root fixture does not represent every image. Legacy Python below 3.8 is incompatible with the default editor. Intermittent upstream shell-start timeouts were observed in diagnostics, although the final live runs started successfully. A scored instance remains unproven. Revert to remove the integration; no storage migration.

@aitianshi
aitianshi force-pushed the fix/agent-preparation branch from d64ebbd to 09864f0 Compare November 23, 2026 08:36
aitianshi added a commit that referenced this pull request Nov 23, 2026
…ter and split the trace reader (#290)

Closes #289

## What

Reorganises code without changing what it does; the few differences are
under Risk. Four parts:

- **The standard.** The 36 modules of `app/nullius/standard/` move from
one folder into eight, one per purpose; `cli.py` and `kits/` stay at the
top. No module is renamed. Every import, the wheel's package list, the
docs, the skills and `AGENTS.md` follow. `test_layering.StandardFolders`
keeps a new module out of the top of the package and keeps the folders
importing one way.
- **`nullius/ondisk.py`** (54 lines): a file written whole then renamed
into place, a file lock, a sha256. It replaces the hand-written copies
in 13 modules, four of which used one fixed temporary name that two
writers at once collided on.
- **The trace reader.** `traces/trace.py` (1,447 lines) becomes `spans`,
`fold`, `breakdown`, `waterfall` and `trace`, its code moved whole.
- **Routes.** The loopback-client guard sits beside the form-token guard
(`shared._local_client`), and `execute.begin` checks and starts plans
for the builder's Run, the Agents page's check and the Benchmarks page's
proof.
- **What follows the moves.** OSWorld1's driver asks the package for its
folder, where it counted folders up from a file that moved. The check of
an environment's `network` field moves beside the other field checks in
`definitions`, so no two folders import each other. The field contract
pins the moved classes under their new modules, with the same fields.
`NoFlask` moves from `test_charts.py` to `test_layering.py`, and
`test_trace.py` uses the builders `tracedata.py` already had.

Why now: `main` gained five loose modules in the standard in five days,
and #282, #283, #284 and #286 are built on this layout.

## Touches

backend · routes · the standard · catalogue (drivers' import lines) ·
docs and skills (paths) · CI (one import line in `docker-tests.yml`, the
judge's path floor, the wheel's package list) · templates and static
(four comments that name a moved module)

## Before and after

Nothing visible changes. Of 450 pages fetched from this branch and from
`main` over the same jobs, 442 are identical and 8 differ only by a
moved address: seven kit pages print their driver's source, and one is a
stylesheet comment.

Before: 36 modules, `cli.py` and `kits/` in one folder. After:

```
app/nullius/standard/
  cli.py  kits/
  contract/      ports  names  definitions  match
  requirements/  install  hostreq  network_requirements
  protocols/     acp  jsonl  cancellation  computer_port  computer_pipe
  calls/         relay  ledger
  backends/      container  boat  setup_container  forward  egress  mcp_machine  mcp_bridge  web_services
  runner/        run  job  pace  retries  shard  merge  payload  boat_units
  proofs/        conform  fidelity  prove  pins
  pages/         recipe  howto
```

## Verified

- Backend suite 3,146 tests and route suite 715: pass. The docker tier's
11 modules (388 tests) pass with real containers.
- The wheel builds with the eight folders in it and
`app/packaging/verify.py` passes.
- The tests `main` had when the modules moved are the same cases after:
same ids and outcomes, each function compared by syntax tree, the same
planted faults failing the same tests. Each later merge of `main` was
checked file by file against `main`'s own change.
- The upstream-gated OSWorld1 tests, skipped in CI, run by hand with the
upstream present: 13 of 14, as on `main`.
- Real runs on `meta/muse-spark-1.3-contributor` through OpenRouter,
agents in containers: the reference agent, Goose and OpenCode on GSM8K,
HumanEval and τ³-bench, two shards and their merge, a recipe started
from Review, the conformance kits. 36 trials, all pass. Mem0 on LoCoMo
scores here as on `main`.
- Against `main` on those runs' output: the trace reader gives the same
result on 1,212 views of 42 traces, and 21 commands of the CLI that call
no model print the same.
- Four independent reviews of the diff; each finding is fixed with a
test that fails on the old code.

## Risk

- **Import addresses change, with no aliases**:
`nullius.standard.<module>` is now `nullius.standard.<folder>.<module>`.
A catalogue entry copied into user storage before this (a proof makes
such a copy) keeps the old address and stops loading; *Use bundled
entry* on its page restores it. Release v0.1.1 ships HumanEval's and
τ³-bench's drivers with the old addresses.
- **Open branches.** #282, #283, #284 and #286 already sit on this
branch. Any other branch that touches `app/nullius/standard/` (#288)
follows after whichever lands first.
- **Permissions under an unusual umask.** With a umask that removes the
owner's write bit, the constraints store, a Harbor entry and a judgement
are written `0600` where `main` gave `0400`.
- **Temporary files** are named `.<random>.part`, one per write, and a
failed write removes its own.
- **The Agents page's check and the Benchmarks page's proof** now refuse
a run still going under the same name, as the builder's Run did.
- **A trace's `producer`** reads `app/nullius/standard/runner/job.py`.
Nothing reads the value.
- **The judge** floors merge risk at severe: one import line changes in
a workflow.

Undone by reverting the squash commit; branches built on the layout
would then move their imports back.
@aitianshi
aitianshi force-pushed the fix/agent-preparation branch from 09864f0 to 29c97c2 Compare November 23, 2026 09:09
@aitianshi
aitianshi marked this pull request as ready for review November 23, 2026 09:43
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

🟡 PR judge · 4 of 7 yes · #284 ↔ #37

Merge risk 🔴 MAJOR the judge's reading of the diff; app/nullius/standard/backends/container.py is in the path of every run
Priority 🔴 EXTREME the deepest path is app/nullius/standard/backends/container.py
Question Verdict
Changes do what the issue asks · 2 of 5 criteria ⚠️ partly
Issue and pull request describe the same change ❔ undecided
Description matches the diff, no more, no less ⚠️ partly
Diff stays in scope ✅ yes
Tests cover the change, or Verified says how ✅ yes
Docs follow the change ✅ yes
Risk named in the description ✅ yes
Before and after shown –
Acceptance criteria, 2 of 5 met
# Criterion Verdict
1 The owner has said whether an agent may have a setup step with a way out, and how an agent that needs root passes its k… ❔ undecided (cut)
2 SWE-agent is in the agents catalogue at a pinned release, its dependencies pinned. ✅ met (cut)
3 It passes the kits of the ports it offers, and its model calls are in the relay's record. ❔ undecided (cut)
4 It runs a SWE-bench Verified instance in the instance's own container. ⚠️ partial (cut)
5 The benchmark's limitation no longer says it runs only on Harbor. ✅ met (cut)
Checks the script runs itself, 3 of 4 pass
No machine attribution trailer in the commits or the description ✓
New code under app/, docs/, .github/ or .claude/ · pyproject.toml ✗
No Flask import under the backend package ✓
No key-shaped string in the diff ✓

some of the diff was cut before the judge read it

@aitianshi
aitianshi merged commit 91c1c39 into main Nov 23, 2026
2 checks passed
@aitianshi
aitianshi deleted the fix/agent-preparation branch November 23, 2026 10:06
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.

SWE-agent cannot be run by the standard as shipped: it needs root in the kits and the internet at start

1 participant