Repository navigation
feat(validate): deploy the mail-mcp example's env, named by an env alias, in place of an internal env - #325
earakely-scale wants to merge 10 commits into
Conversation
…ias, in place of an internal env The validator deployed multi-caf64d, an env only Scale's stores hold, so anyone else's validate failed its MCP check. It now deploys mail-mcp: an example MCP env with the search_emails tool the check calls, named by the alias its bundle's aliases.toml gives it, which now takes [envs] as it takes [agents]. validate writes the example's env into local stores when the store has none of that id; a store's own env of that id wins, which is how a service gets it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lias names Env.get gave an alias's env under the alias's id, so update_metadata and merge_metadata wrote to an id the store doesn't hold. The env keeps the id it's stored under (stored_id) for them, and the alias for the runs that name it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lias # Conflicts: # tst/unit/bundle/shipped_bundles_test.py
|
End to end at 1a257b0. After it, the merge of main brings only agentenv-protocol's A2A proxy, and b690ab5 renames a slow-tier test's store env from (a) As someone outside Scale runs it. One m5.2xlarge (linux/amd64) admin VM: a clean venv with this branch's wheels, local stores only,
For pi and OpenHands, (b) Dev stage, as the hub's worker would run it. agentenvhub-sdk 0.34.20 with this branch,
Cleanup. The VM, security group and key pair are deleted, no results contain secret text, and no containers were left on the VM. Dev keeps |
…dation deploys it on --sandbox picks the agents' backend; the validation deploys the env on the configured env backend, so writing the example checked the wrong one. The installer journey also lists agent-env's four bundles by count now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… refuse env aliases in env definitions A deployment of an env got by an alias recorded only the alias, so a reload after the store gained an env of that id read the wrong one. Its record now keeps the id the env is stored under, and the reloads go through Env.of_deployment, which reads that env under the alias. An env definition naming an env alias, as a MultiEnv's servers might, is refused with what to name instead, since an alias names an env only in a task's steps. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rdown, rather than checking at once On a loaded CI host a SIGKILL lands, and an abandoned run's teardown ends, a moment after the call returns, so the local sandbox's teardown tests and the episode abandon test failed by turns. They poll for the outcome now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…re may start an env on an alias's id The hub would otherwise need its own put of the env, kept in step with the example by hand. A2AAgent.validate() now holds namespace routing and writes the mail-mcp example itself when the store has no env of the alias's id, so the hub's worker gets it too: on a remote sandbox its image is context-only and built in the VM. The alias is mail. An env store refuses to create an env under an installed env alias's id, so a deployment recorded under the alias always reloads the alias's env, and Env.of_deployment and the stored id on deployments go. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nv alias's id Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Why.
agent-env a2a-agent validatedeploysmulti-caf64d, an env only Scale's stores hold, beside the agent it checks. Anywhere else the MCP check can't run, andvalidateexits 1. OpenHands hit this validating their agent.Change
examples/mail-mcpis an MCP server, built from its Dockerfile likeecho-mcp, with asearch_emailstool over a fixed inbox: the tool the MCP check prompts the agent to call. Its smoke task checks a search for "invoice" finds the invoice.aliases.tomltakes[envs]as it takes[agents], and the example names its envmail.Plan.env_aliases). An env definition naming an alias, such as a MultiEnv's servers, is refused: an alias names an env only in a task's steps.Env.getresolves the alias, with namespace routing on. The env it returns answers to the alias's id, so a deployment records, and steps look it up by, the id the task names. Its metadata writes go to the env the alias names (Env.stored_id).EnvStore.put_document), so a deployment recorded under an alias always reloads the alias's env. An env stored under such an id before keeps taking versions.A2AAgent.validate()holds namespace routing for its run. When the store has no env of the alias's id, it first writes the example (with the newbundle.write_bundle,run_bundle's writes and infra without a run).modal_vm), the image is context-only and built in the VM, so the hub's worker needs no Docker and no puts.validateonly reports a failure to write the env.bundle.write_bundleis new and public.STORE_GETTERSreads envs exactly when it weighs an alias against the store, as it already did for agents.Rollout for the hub
agent.validate(), so it needs only the pin to this release.XDG_STATE_HOME: the worker must point this at a writable directory, such as/tmp/agent-env, because the validator keeps the example in the local@localstore. The worker image runs as uid 65532 and assumes a read-only root.Tests
Env.get: an alias resolves under the alias's id, including a versioned reload, and its metadata writes land on the aliased env. An env stored under the id before wins. Also covers a refused alias, the hint for a near miss, and routing off.aliases.toml[envs]: parsing, refusals and bundle checks. The planner pulls an aliased env and rewrites the task's fields. A store env shadows the alias. An env definition naming an alias is refused.write_bundlewrites and sets up infra without running anything.mail.agent-env run mail-mcppasses. A task stored outside any bundle that namesmaildeploys the env, recorded asmail.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
The PR replaces the validator’s internal env with the shipped
mail-mcpexample and adds env aliases.mailenvironment when needed.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A["A2AAgent.validate()"] --> B["Turn namespace routing on"] B --> C{"Store has mail?"} C -->|No| D["write_bundle prepares mail-mcp"] C -->|Yes| E["Run validation"] D --> E E --> F["Deploy mail beside the agent"]Reviews (9) · Last reviewed commit: "test: treat a process reaped while its /..." · Reviewed by Greptile