Skip to content

fix(exec): HostMode always installs modal itself (calque#200) - #201

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/calque-200-hostmode-always-installs-modal
Aug 16, 2026
Merged

fix(exec): HostMode always installs modal itself (calque#200)#201
scttfrdmn merged 1 commit into
mainfrom
fix/calque-200-hostmode-always-installs-modal

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Summary

  • Found via a real calque spawn-run run against AI-Almanac's forecasts_app.py, right after calque#198's sibling-function fix correctly shipped an extra that bare-references modal: @enter failed: No module named 'modal'.
  • run.go's uvPythonArgv (dry-run's own mechanism) has an explicit design decision: always include "modal" in its --with list, since a real script's body routinely references modal.Secret/modal.Volume/etc. directly even though Modal's SDK is never itself a pip_install(...) entry in the script's own .image chain.
  • internal/exec/bootstrap.go's HostMode branch (used by real/fleetrun/spawn-run) had no equivalent guarantee — its uv pip install step was entirely gated behind len(PipPackages) > 0, so a run with no --pip flags (the common case; spawn-run has no --pip flag at all) installed ZERO packages, not even modal.
  • HostMode now always merges "modal" into the installed package set, deduped/sorted, mirroring uvPythonArgv's exact discipline. The git-availability check (for a --pip git-URL spec) now only runs when a real --pip package was actually supplied, since modal alone needs no git.

Files touched

  • internal/exec/bootstrap.go — the actual fix.
  • internal/exec/bootstrap_demo_test.go — updated the now-stale "no-deps host-mode has nothing to pip-install" assertion to the corrected behavior, plus two new tests (modal merged in alongside real --pip packages; not duplicated if --pip modal is passed explicitly).
  • CHANGELOG.md.

Test plan

  • go build ./... && go vet ./... && gofmt -l . && go test -count=1 ./... — all pass
  • golangci-lint run ./... — 0 issues
  • ruff check . — all checks passed

… venv (calque#200)

Found via a real calque spawn-run run against AI-Almanac's
forecasts_app.py, right after calque#198's sibling-function fix correctly
shipped an extra that bare-references modal: "@Enter failed: No module
named 'modal'".

uvPythonArgv (run.go, dry-run's own mechanism) has an explicit design
decision to always include "modal" in its --with list -- a real script's
body routinely references modal.Secret/modal.Volume/etc. directly even
though Modal's SDK is never itself a pip_install(...) entry in the
script's own .image chain. bootstrap.go's HostMode branch had no
equivalent: its uv pip install step was entirely gated behind
len(PipPackages) > 0, so a run with no --pip flags (spawn-run has no
--pip flag at all) installed zero packages, not even modal.

HostMode now always merges "modal" into the installed package set
(deduped/sorted, mirroring uvPythonArgv's exact discipline). The
git-availability check (for a --pip git-URL spec) now only runs when a
real --pip package was supplied, since modal alone needs no git.
@scttfrdmn
scttfrdmn merged commit 0209b72 into main Aug 16, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the fix/calque-200-hostmode-always-installs-modal branch August 16, 2026 19:58
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