Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/environments/tbench2.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ TB2_MODE=local python -m tbench2_env.server.app

### Docker Mode

Each task runs in its own Docker container, using the image specified in the task's `task.toml`:
Each task runs in its own Docker container, using the image specified in the task's `task.toml` (tasks that declare no `docker_image` are rejected at reset — there is no host-execution fallback). Agent commands run in the image's own `WORKDIR`, and `evaluate` scores with the task's canonical `tests/test.sh`, staged for exactly the verify window — the same scoring contract as local mode:

```bash
# Enable Docker mode
Expand Down
2 changes: 1 addition & 1 deletion envs/tbench2_env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ TB2_MODE=local python -m tbench2_env.server.app

### Docker Mode

Each task runs in its own Docker container, using the image specified in the task's `task.toml`:
Each task runs in its own Docker container, using the image specified in the task's `task.toml` (tasks that declare no `docker_image` are rejected at reset — there is no host-execution fallback). Agent commands run in the image's own `WORKDIR`, and `evaluate` scores with the task's canonical `tests/test.sh`, staged for exactly the verify window — the same scoring contract as local mode:

```bash
# Enable Docker mode
Expand Down
14 changes: 8 additions & 6 deletions envs/tbench2_env/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
python -m server.app

Environment Variables:
TB2_MODE: Execution mode - "local" (default), "docker", or "auto"
TB2_MODE: Execution mode - "local" (default) or "docker"
MAX_CONCURRENT_ENVS: Maximum concurrent WebSocket sessions (default: 8)
"""

Expand Down Expand Up @@ -61,13 +61,15 @@
if _TB2_MODE == "docker":
_DEFAULT_ENVIRONMENT = Tbench2DockerEnvironment
_ENV_SUFFIX = " (Docker mode)"
elif _TB2_MODE == "auto":
# Auto-detect: try Docker, fall back to local
_DEFAULT_ENVIRONMENT = Tbench2Environment
_ENV_SUFFIX = " (auto-detect mode)"
else:
elif _TB2_MODE == "local":
_DEFAULT_ENVIRONMENT = Tbench2Environment
_ENV_SUFFIX = " (local mode)"
else:
# No silent aliases: the old "auto" value claimed to auto-detect Docker
# but always ran local mode, and a typo'd mode would quietly do the same.
# Which class serves decides the isolation and scoring contract, so
# refuse to guess.
raise ValueError(f"Unknown TB2_MODE {_TB2_MODE!r}: expected 'local' or 'docker'.")


# Create the app with web interface and README integration
Expand Down
Loading
Loading