Skip to content

Add --override-image-id CLI flag for the Modal provider#218

Merged
DanverImbue merged 3 commits into
mainfrom
danver/specify-modal-image
May 21, 2026
Merged

Add --override-image-id CLI flag for the Modal provider#218
DanverImbue merged 3 commits into
mainfrom
danver/specify-modal-image

Conversation

@DanverImbue
Copy link
Copy Markdown
Collaborator

@DanverImbue DanverImbue commented May 20, 2026

Summary

Adds a per-invocation CLI escape hatch: offload run --override-image-id <ID>.
When passed, Offload runs tests against the given pre-built Modal image exactly
as-is and skips its entire image-setup pipeline — no Dockerfile build, no
thin-diff patch of local changes, no checkpoint cache. For users who have
already built their own Modal image and do not want Offload to build one.

This is an invocation-scoped override. It is a CLI flag only — there are no
changes to the TOML config schema
.

Usage

offload run --override-image-id im-abc123

Behavior

  • --override-image-id is declared on the offload run subcommand and threaded
    to ModalProvider::prepare() via PrepareContext, mirroring the existing
    --no-cache flag.
  • When set, prepare() short-circuits: it skips prepare_with_prewarm entirely
    — the sole entry point to the Dockerfile build, the thin-diff patch, and the
    checkpoint cache — and uses the given image ID directly. A loud warning is
    logged that image setup is bypassed for this run.
  • The flag is Modal-only. Passing it with a non-Modal provider fails early with
    a clear error.
  • If the code baked into the image is stale or does not match, tests fail
    through the normal failure path.

Testing

  • cargo fmt --check, cargo clippy (no warnings), cargo nextest run
    (275 passing), and ratchets check all pass.
  • New tests: CLI flag parsing, the prepare() short-circuit, and the non-Modal
    provider guard.

🤖 Generated with Claude Code

@danverbraganza danverbraganza force-pushed the danver/specify-modal-image branch from 4a0b7e4 to 9f8de89 Compare May 20, 2026 12:28
@DanverImbue DanverImbue changed the title Add override_image_id escape hatch for the Modal provider Add --override-image-id CLI flag for the Modal provider May 20, 2026
DanverImbue and others added 3 commits May 21, 2026 18:13
Adds a per-invocation escape hatch: `offload run --override-image-id <ID>`.
When passed, Offload runs tests against the given pre-built Modal image
as-is and skips its entire image-setup pipeline (Dockerfile build,
thin-diff patch, checkpoint cache).

This is an invocation-scoped CLI flag only, not a config option. It is
threaded to prepare() at runtime via PrepareContext, mirroring how the
existing no_cache flag is threaded — nothing is added to the TOML schema.

- main.rs: new `override_image_id` arg on `Commands::Run`, threaded
  through run_tests -> run_remote_provider -> run_prepare. The flag is
  guarded to the modal provider; using it with any other provider fails
  early with a clear error.
- provider.rs: `override_image_id` field on PrepareContext.
- modal.rs: ModalProvider::prepare() short-circuits when the override is
  set, storing the image ID and emitting one loud warn that the
  build/patch/cache pipeline is bypassed.

Co-authored-by: Sculptor <sculptor@imbue.com>
Add the --override-image-id escape hatch to the `offload run` flag
reference, matching the existing table style.

Co-authored-by: Sculptor <sculptor@imbue.com>
Co-authored-by: Sculptor <sculptor@imbue.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@danverbraganza danverbraganza force-pushed the danver/specify-modal-image branch from 9f8de89 to aa35f56 Compare May 21, 2026 06:21
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vet found 1 issue.


[instruction_file_disobeyed] (severity 2/5) (confidence 0.85)

The issue description in .beads/issues.jsonl for code-d9y3 explicitly states 'Do NOT commit .beads/ changes — the Coordinator manages bead state.' Yet the diff includes modifications to .beads/issues.jsonl and .beads/last-touched. These bead state files should not be part of this diff.

@DanverImbue DanverImbue merged commit 6651b9b into main May 21, 2026
7 checks passed
@DanverImbue DanverImbue deleted the danver/specify-modal-image branch May 21, 2026 23:04
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