Repository navigation
feat(bundle): leave a step's user-scoped fields out of an import, and name what a task needs beyond core - #243
Merged
earakely-scale merged 8 commits intoOct 19, 2026
Conversation
… name what a task needs beyond core A stored task carries values that only work where it was stored: the sandbox provider its run used, where it wrote trajectories, the model endpoint, billing tags. An import copied them, so a folder written for elsewhere could fail on a provider plugin it has no use for, or leak internal ids. Each step type now declares its fields' scopes, field_scopes (dotted path to a FieldScope). A scoped field is optional, and a field with no scope is material. The base scopes metadata.attribution to the user. The deploy steps scope sandbox_type, the judge judge_sandbox_type, prompt_agent its trajectory prefix and user endpoint, deploy_agent its LiteLLM URL, deploy_human_agent its endpoint and snapshot_env its gateway URL. bundle init leaves user-scoped fields out and reports each one, unless --include-scope user keeps them for a folder run against the same store. The import also lists, in its report and README, each step type and referenced env or artifact type that core doesn't ship, by the distribution that registers it (or configuration). A test holds every step type's scoped fields to optional parameters of its own. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ser runs a task with to the user FieldScope gains TASK, the scope of every field not declared otherwise, which an import always writes. A task doesn't depend on the agent or the models that attempt it, and a user's agent ids and model names may not exist for another user, so these are now user-scoped: deploy_agent and install_agent's a2a_agent_id and version, and deploy_agent's env_vars; prompt_agent's model, model_params, effort, max_thinking_tokens, harness and user_model; and the judge's agent, model, model endpoint, effort and thinking budget. So are deploy_env's env state provider and instance, and snapshot_env's env instance. Left out, each falls back to the run's own: the configured default agent, its model config, its providers. An import prunes a step before collecting its references, so a pruned agent id is never pinned back. The verify_a2a steps keep their agent id, which they require. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…'s scope, and credit a type to what registered it snapshot_env's gateway_url is how the step finds its gateway when no deployed env gives one, so leaving it out wrote a task that couldn't run. prompt_agent's user_a2a_url also tells a human counterpart from a simulator, so leaving it out turned a human into a simulator and dropped the attachments of its replies. Both stay task-scoped. A need was credited to whichever installed distribution claimed its name, even when a config file's impls replaced that class. It's now credited to the distribution only when its entry point names the class that registered, and to configuration otherwise. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…on't load a skipped plugin to credit a need install_agent requires a2a_agent_id and has no default to install in its place, so leaving it out broke the import. The contract test now builds each step type that scopes fields of its own from a minimal step without them. A plugin the registry build skipped registers nothing, so crediting a need reads that record instead of importing the plugin again, which could raise and abort the import. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ent changelogs out of an import as user scope install_agent naming no agent installs the configured default, as deploy_agent does, so its agent is user-scoped. So are load_artifact.urls, run_docker_container.docker_context_url, a skill's object_url, and deploy_agent's changelog url and position: each points into its user's store. A step left without its only source still builds; the new TaskStep.config_problems() names what's missing wherever preflight runs, including for a step a dry run can't preflight, and the step raises the same at run time. An integration test imports for another machine (two local stores, the source's config registering a sandbox provider and a step type) and runs each folder on both. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…out a user-scoped field set to zero Without the changelog the agent starts fresh instead of from the earlier run's state, and nothing left in the task says so; a field an import can drop with no trace changes what the task is. An import now leaves out any user-scoped field that is set, a zero or false included, and keeps one set to nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tity agent_env.entity.refs holds the ref declarations, agent_env.entity.scopes the field scopes and prune (moved out of the importer, since leaving out the fields of other scopes isn't import-specific), and agent_env.entity.paths the path syntax both use. Imports move with them; nothing changes behavior. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It re-exports what moved to agent_env.entity.refs, so a plugin importing the old path keeps working. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-3989-import-store-only-values
branch
October 19, 2026 03:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A stored task carries values that only work in the setup it was stored from:
beta_scaleexists only where a plugin registers it;metadata.attribution).agent-env bundle initcopied all of them. A folder written for another machine could then fail on a provider plugin or an agent that has nothing to do with the task.The principle: each field of a step describes either the task itself or the setup of the user who ran it. An import keeps the first kind and leaves out the second; a run elsewhere fills those in from its own setup.
Field scopes.
FieldScope(agent_env/entity/scopes.py) has two values.TASKis the default for any field not declared otherwise;USERmarks setup fields. Each step type declaresfield_scopes, a path → scope mapping that merges its parent's. Paths are dotted keys, with[]for each element of a list. These core fields are user-scoped:metadata.attribution;deploy_env:sandbox_type,env_state_type,env_state_instance_id;deploy_agent:a2a_agent_id,a2a_agent_version,env_vars,sandbox_type,litellm_base_url;install_agent:a2a_agent_id,a2a_agent_version;deploy_sandbox:sandbox_type;deploy_human_agent:a2a_url;prompt_agent:model,model_params,effort,max_thinking_tokens,harness,user_model,trajectory_output_prefix;rubrics_verifier:judge_a2a_agent_id,default_model,default_model_api_base,effort,max_thinking_tokens,judge_sandbox_type;load_artifact:urls;run_docker_container:docker_context_url;add_skills: each skill'sobject_url(skills[].object_url);snapshot_env:env_instance_id.Each one is optional. When it's left out, the run uses its own setup: the
--sandboxflag or config default, the configured default agent and models, its own object store, and its own endpoints.install_agentwith no agent now installs the configured default, asdeploy_agentalready did.Three of them have no default to fall back on:
load_artifact.urls,docker_context_urland a skill'sobject_urlcan each be a step's only input. A step left without its only input still builds, so the import works. A newTaskStep.config_problems()names what's missing: problems in a step's own fields, found without a store. It's checked whereverpreflight()is, including for a step a dry run can't preflight, and the step raises the same at run time. So a receiver's run stops before it starts and names the field to supply.These stay task-scoped:
deploy_agent's changelog (agent_changelog_object_urland its cutoff): without it the agent starts fresh instead of from the earlier run's state, and nothing left in the task says so;a2a_agent_idon theverify_a2a_*steps: the agent is what the task verifies;verify_a2a_skill_config.skill_bundle_object_url: without it the bundle probe scores as failed, which lowers the grade instead of stopping the run;snapshot_env.gateway_url: with no deployed env, it's how the step finds the gateway;prompt_agent.user_a2a_url: setting it is what tells a human counterpart from a simulator.Imports leave user-scoped fields out by default. Any set value is left out,
0andFalseincluded, and listed under "Left out". A step left with no agent is listed under "Floating", as deploying the configured default.--include-scope userkeeps the fields as stored, for a folder that runs against the same store."Needs beyond core". The report and README list each step, env and artifact type that core doesn't ship. Each type is credited to the distribution whose entry point registered it, or to "configuration". These types are task-scoped: a run without the plugin fails, and the folder now says so up front.
An
agent_env.entitypackage for what an entity's fields say:entity/refs.pyholds the ref declarations, which wereagent_env/entity_refs.py;entity/scopes.pyholds the field scopes andprune, moved out of the importer;entity/paths.pyholds the path syntax both use.agent_env/entity_refs.pystays as a re-export of its six public names, so plugins importing the old path, the sdk among them, keep working; the plugin-api check reports no break.git diff -Cshowsrefs.pyasentity_refs.pywith 24 lines changed.This is off the hot path: imports change, and steps gain a class attribute and a store-free check.
Tests
tst/unit/task_step/test_field_scopes.py), for every registered step type:config_problems().include_scopes=[FieldScope.USER]keeps them as stored;tst/integration/cli/bundle_init_scopes_test.py): two machines as two local stores. The source's config registers its own sandbox provider and step type; the receiver's registers nothing. A folder imported by default runs on the receiver, while an--include-scope usercopy runs only at its source. An agent task takes the receiver's own default agent. A plugin step, and an input left out with no default, are refused on the receiver before anything runs, naming what's missing.Checked on two machines
Two fresh Ubuntu VMs:
acme_vmand a step typeacme_note;A stored three tasks that name A's own setup: its provider, a custom agent, models, a LiteLLM URL, env vars, a trajectory bucket and attribution. A imported each task by default and with
--include-scope user, and B ran the folders.--include-scope userUnknown sandbox backend: 'acme_vm'a2a-default--include-scope useracme-solverin the store'acme_note' is not a known step type; its README namesagentenv-acmeThe default folders mention
acmein only two places: the plugin step itself, and the README line naming the plugin it needs.Real CoopBench tasks. I imported five CoopBench tasks (t01 to t05) from the prod store, each by default and with
--include-scope user. All ten imports succeeded.beta_scaleormodalprovider,claude-code-cliagent, model, attribution, ors3://trajectory prefix; the agents float to the configured default. The--include-scope usercopies keep all of these.coopbench-star-pm-v2, the universe, and the task's evidence-collector script. Bringing those along is the next step. Each user copy is also refused forclaude-code-cli.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues remain.Summary
Bundle imports now leave out user-specific setup by default and report types that need plugins or configuration.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Stored task or eval] --> B[Leave out user-scoped fields] B --> C[Pin retained references] C --> D[Report needs beyond core] D --> E[Check staged bundle] E --> F[Write bundle folder] F --> G[Check receiver setup and missing inputs] G --> H[Run with receiver defaults]Reviews (6) · Last reviewed commit: "refactor(entity): keep agent_env.entity_..." · Reviewed by Greptile