Repository navigation
fix(deploy_env): deploy the env version a run's step_params pin - #739
revan-aleti wants to merge 1 commit into
Conversation
DeployEnvTaskStep.execute loaded its env at the step's stored env_version and never read step_param_overrides, so a run pinned to an earlier env version through user_overrides.step_params[<step id>].env_version deployed whatever the step names, usually the latest. load_artifact, deploy_agent and install_agent already honour their step_params. An override wins over the stored value and leaves the stored step unchanged; null means the latest, as a stored null does; any other value that is not a positive int raises before the env is loaded, naming the key. A version the store lacks fails the deploy as a stored one would. preflight still checks the stored version: it runs at save, when no run's overrides exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Automated Claude routine — Env Pod PR Context Review. This is a bot, not Edgar Arakelyan; not a human review. Context from outside this diff: there is another open PR in this repo doing the same thing. #569 (open, not draft, last pushed Nov 9) adds a method with the same name — Two behavioural differences worth settling before either one lands, since whichever merges second will be rebasing on the other:
#569 is currently showing conflicts against Generated by Claude Code |
Tl;dr
deploy_envignored a run's per-stepenv_versionoverride, so a run pinned to an earlier env version deployed whatever the stored step names (usually the latest). It now deploys the pinned version; a run with no override is unchanged.For Reviewers
DeployEnvTaskStep.run_env_versionplus one call site inexecute(src/agent_env/task_step/task_steps/deploy_env.py).preflight()still checks the stored version on purpose. It runs at save time, when no run overrides exist.ValueErrorbefore the env loads.boolis refused explicitly becauseTrue == 1. This is stricter thandeploy_agent/install_agent, which pass version overrides through unchecked, and matchesload_artifact's check of itsartifact_idoverride.pytest tst/unit/task_step/deploy_env_test.py(77 passed). Of the 13 new cases, 9 fail on main; the other 4 are the no-override regression cases.For Agents
deploy_env.py: newrun_env_version(context)readsstep_param_overrides(context)["env_version"];executecallsEnv.get(self.env_id, self.run_env_version(context)).tst/unit/task_step/deploy_env_test.py: 6 tests (13 cases): override honoured, override wins and leaves the stored step as stored, null means latest, no override unchanged (4 cases), bad values refused before load (5 cases), a missing version fails as a stored one does.TaskStep.step_param_overrides(task_step.py:152-158), the same oneload_artifact,deploy_agent,install_agentanddeploy_user_sim_agentread.to_dictare never mutated by an override.preflight()/deploys_env()(save-time, stored version).bundle/preflight.pystored_infra, which still reads the stored version for the CLI's localtask run.agent_env_hub/routers/qc.py_pinned_step_paramsbuilds{<step id>: {"env_version": <int>}}and_with_pinsplaces it atuser_overrides.step_params, which is whatstep_param_overridesreads.env.py), so it needs no change.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
deploy_envnow uses the run’s per-stepenv_versionoverride without changing the stored step.deploy_envloads.Intentional exclusions acknowledged by
revan-aleti: save-timepreflight()anddeploys_env()keep using stored versions; CLIstored_infra, version logging, and delivery pin bumps remain outside this change.Reviews (1) · Last reviewed commit: "fix(deploy_env): deploy the env version ..." · Reviewed by Greptile