Skip to content

feat(envs): accept and forward the universe artifact - #123

Open
mandykwok-scale wants to merge 3 commits into
mainfrom
mandy/envs-forward-artifact
Open

mandykwok-scale wants to merge 3 commits into
mainfrom
mandy/envs-forward-artifact

Conversation

@mandykwok-scale

@mandykwok-scale mandykwok-scale commented Oct 8, 2026 •

Copy link
Copy Markdown

Motivation

Companion to #122, which adds artifact_id / artifact_version to deploy_env so a provider can tell which universe a run will load — the pool key a warm environment pool needs.

On its own #122 does nothing: deploy_env only passes a kwarg the env's signature accepts, and no env declares these. This closes that.

Change

The three built-in envs that define deploy() — MultiEnv, MCPServerEnv, WebsiteEnv — take both params and hand them to deploy_through_provider, which already splats options onto the provider. Both default to None, so every existing caller is unchanged.

The built-in providers declare them too, and ignore them. That is not cosmetic. deploy_through_provider calls provider.deploy(env, sandbox_provider, **options), and neither built-in provider takes **kwargs — so an option an env maps but no provider declares is a TypeError on the real deploy path. test_every_option_the_env_maps_is_one_a_declared_provider_takes guards exactly this, and caught it here before it shipped. Worth knowing if you add options in future: the plugin-provider tests pass either way, because their stubs do take **options.

Test plan

  • new: a built-in env forwards the artifact to its provider, and passes None for both when the caller names none
  • updated: test_multi_env_plugin_provider and test_mcp_server_plugin_provider each pinned the provider's option set exactly, and now expect the two new keys
  • tst/unit/env/envs: 259 passed, 2 failed — both failures (test_put_stores_the_env_provider_type_it_is_given, test_put_defaults_to_the_gateway) reproduce on a clean tree in this venv and are unrelated

Scope

Still no behaviour change. Together with #122 the universe reaches the provider; a provider that keys on it comes next.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Summary

Built-in environment deploys now pass an optional universe artifact ID and version to providers, so providers can identify which universe a run will load. Both values default to None, and the built-in providers accept them without changing how they launch environments.

  • Built-in environment deploys now pass universe details to providers.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Deploy request"] --> B["MultiEnv / MCPServerEnv / WebsiteEnv"]
  B --> C["Provider deployment"]
  C --> D["Built-in provider accepts artifact details"]
Loading

Reviews (3) · Last reviewed commit: "style(providers): drop the comments on t..." · Reviewed by Greptile

Companion to the `deploy_env` change that carries `artifact_id` /
`artifact_version`: nothing received them, because no env declares them and
`deploy_env` only passes a kwarg the env's signature accepts.

The three built-in envs that define `deploy()` now take both and hand them to
`deploy_through_provider`, which already splats options onto the provider. Both
default to None, so every existing caller is unchanged.

The built-in providers declare them too, and ignore them. They have to:
`deploy_through_provider` splats every option onto `provider.deploy()`, and
neither built-in takes `**kwargs`, so an undeclared option is a TypeError on the
real deploy path. `test_every_option_the_env_maps_is_one_a_declared_provider_takes`
exists to catch exactly that, and did.

Two existing tests pinned the provider's option set exactly; both now expect the
two new keys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mandykwok-scale
mandykwok-scale requested a review from a team as a code owner October 8, 2026 18:19
Comment thread tst/unit/env/envs/test_multi_env_plugin_provider.py Outdated
mandykwok-scale and others added 2 commits October 8, 2026 16:53
The test covered MultiEnv only. All three built-in envs carry the artifact the
same way, so a value dropped in one of the other two would not have failed
anything. Parametrised over MultiEnv, MCPServerEnv and WebsiteEnv, each
asserting both the supplied values and the absent case.

The MCPServerEnv case names the plugin provider explicitly: left on the default
gateway it takes the real provider path and fails on state config, unrelated to
what is being checked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants