Skip to content

provider: drop --gpu-mode from CAPE run face (flag removed upstream; pool-level sharing)#159

Merged
Meirtz merged 1 commit into
masterfrom
fix/cape-drop-gpu-mode
Jul 24, 2026
Merged

provider: drop --gpu-mode from CAPE run face (flag removed upstream; pool-level sharing)#159
Meirtz merged 1 commit into
masterfrom
fix/cape-drop-gpu-mode

Conversation

@Meirtz

@Meirtz Meirtz commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Upstream change

CAPE removed the cape run --gpu-mode flag entirely: requests now inherit exclusive/shared GPU behavior from the target pool, with no per-request override. In the same release, cape status gained three cotenancy fields: gpu_mode (derived, null | "exclusive" | "shared"), gpu_cotenant_count, and gpu_cotenant_counts.

Failure mode without this fix

The provider unconditionally emitted --gpu-mode whole on every cape run. Against the current CLI that is an unknown-argument error — argparse exits 2 with a usage message before anything is submitted — so every create() fails and no sandbox can be created at all.

Changes

  • agentix/provider/cape.py: drop the --gpu-mode whole pair from the run argv and from the verified-contract docstring.
  • tests/test_cape_provider.py:
    • Fake CLI parser no longer accepts --gpu-mode, matching the real parser by construction (unknown flag → rc=2, usage on stderr).
    • New test_fake_cape_rejects_dropped_gpu_mode_flag documents the exit-2 behavior of the removed flag.
    • New test_run_face_never_emits_dropped_gpu_mode_flag regression test asserts the run argv never contains --gpu-mode (gpu unset and gpu=4).
    • Run-face assertion updated from --gpu-mode whole present to --gpu-mode absent.
    • Fake cape status now emits the three new cotenancy fields, proving the provider's status parsing tolerates (ignores) them — it only reads state and the request_id echo, so no parsing change was needed.
  • README.md: flag list updated; Contract status section notes the upstream flag removal (pool-level exclusive/shared) and the new status cotenancy fields tolerated by our parser.

Gates

  • uv run ruff check . — clean
  • uv run pyright — 0 errors
  • uv run pytest plugins/providers/cape/tests -q — 31 passed
  • uv run pytest tests/ plugins/ -q — green
  • uv lock --check — up to date

🤖 Generated with Claude Code

…pool-level sharing)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Meirtz
Meirtz merged commit ce174bd into master Jul 24, 2026
5 checks passed
@Meirtz
Meirtz deleted the fix/cape-drop-gpu-mode branch July 24, 2026 12:05
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.

1 participant