Repository navigation
feat(store)!: name every derived id <base>__<suffix>, bare or @local - #26
Merged
Merged
Conversation
An id a step or a validator names after something else now keeps that thing's namespace: store.ids.derived_id(base, suffix, legacy=...) gives derive_id(base, suffix) for an @Local base, and otherwise the legacy spelling, passed verbatim at every call site, so bare ids are byte-identical. - Ids a run creates are named after the run when its instance id is @Local: collect_artifacts' universe and per-file ids, snapshot_env's derived snapshot id, snapshot_series' workspace and env captures, and the unit-test verifier's stdout and stderr artifacts. collect_artifacts refuses a bare universe before any sandbox work; mkstemp prefixes go through fs_safe. - Ids named after an entity use its namespace: the MCP server, website, multi and A2A validation tasks, create_cli, the A2A install image and fixtures (key_segment keys, the entity's own object store), the universe compatibility task and roundtrip ids (one validation_id helper), env snapshots and the add_skills name for an @Local universe. - The temporary refusals that stood in for this go, and so does the put commands' validation skip for @Local ids. An env snapshot checks that the store can sign its upload before the sandbox runs anything, and refuses an env and universe in different namespaces. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d-ids-keep-namespace # Conflicts: # README.md
earakely-scale
requested review from
a team and
polakamtejas
as code owners
September 30, 2026 20:36
…work - task run-batch checks each seed's @Local universe id before any run starts, and names the seed row; collect_artifacts validates an @Local universe before reading the sandbox, so a bad universe_id_suffix fails early too. - Test data no longer uses an internal codename; the prefix-key test uses the shared signing fake. - AGENTS.md lists the gnu_stat capability; the ids.py comment and derived_id docstring say what holds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
run-batch's up-front check stopped a whole batch over a seed name that a task without a collect_artifacts step never uses as a universe id. It now runs only when the task collects. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The fake VM collect_artifacts reads and the env-snapshot reattach setup were copied between three test files; they live once in tst/unit/store/fakes.py now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d-ids-keep-namespace
Collaborator
Author
|
@greptileai review |
- collect_artifacts names a per-file artifact with an explicit branch, so a bare universe runs exactly the expression it always has and only an @Local one hashes the name. - validation_id lists its three cases (an @Local env, an @Local universe, neither) in order. - run-batch's seed rule is explained once, in _seed_universe_id's docstring, and its check skips a seed with no universe before validating. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
earakely-scale
marked this pull request as draft
October 1, 2026 18:59
Every id named after another now uses derive_id(base, suffix), so a bare base and an @Local base are spelled the same way and the core keeps no legacy spellings: derived_id goes, and so do the legacy expressions, collect_artifacts' sanitizer and its 100-char cap, and the snapshot series' discriminator. - Ids a run creates derive from the run's instance id, or an adhoc-<12 hex> base when there is none; the snapshot export's temp file is named after the environment only. - An env's CLI artifact is <env>__cli, named by build_mcp_cli's default alone; the bundle resolver keeps a defaulted output under the task. - add_skills names a file universe's skill <slug>-<12 hex>-files for every universe. - The compatibility id is owned by its @Local side when only one side is @Local, else by the env. Prod writes these names for new entities; stored ones keep theirs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e bad ones before work - The env snapshot image name falls back to an env slug and a hash when the full name is over 200 characters or not a valid Docker name, so a long or mixed-case universe no longer fails `docker build`. - `key_segment` gives a bare id over 200 bytes a bounded `<slug>-<12 hex>` segment, so long run and seed ids fit the local filesystem store's 255-byte path component. Ids stay whole. - The verifier and workspace capture keys go through `key_segment`; `file-artifact-universe get-many` names its directories the same way. - `task run-batch` checks each seed's universe with the collect step's suffix, and `snapshot_env`, a capture series and the unit-test verifier refuse a step id an @Local id can't hold before they export or run anything. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d-ids-keep-namespace
Collaborator
Author
|
@greptileai review |
Bounding every directory name and flattening its `/` put universes `crm/eu` and `crm-eu` in one directory, where same-named files overwrote each other. A directory is named after the universe again; only a bare id too long for one filename takes `key_segment`'s bounded name. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
@greptileai review |
…d-ids-keep-namespace
earakely-scale
marked this pull request as ready for review
October 5, 2026 16:03
Collaborator
Author
|
@greptileai review |
…d-ids-keep-namespace # Conflicts: # tst/unit/config/test_fixture_prefix_keys.py # tst/unit/task_step/test_agent_state_capture.py
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.
The rule
Every id core names after an entity or a run is
derive_id(base, suffix), for a bare base and an@localone alike, so the base's namespace carries over and each site has one spelling. Only one naming rule branches on namespace: a universe-compatibility id belongs to the env, unless only the universe is@local.Documents keep the whole id. Object keys and image repositories take it through
key_segment, and filenames throughfs_safe. An@localid becomes the boundedlocal/<slug>-<12 hex>. In an object key or image repository, a bare id over 200 bytes becomes<slug>-<12 hex>. Any other bare id passes through unchanged.What changes for existing deployments
New entities get new names. Stored entities keep theirs: stores are append-only, so an old id keeps resolving to what was written under it.
validate-<env>-v<n><env>__validate-v<n>validate-universe-compat-<env>-v<ev>-<u>-v<uv><env>__validate-universe-compat-v<ev>-<u>-v<uv>-export1…,-export2-…,-fau)validate-<env>-v<ev>-<u>-v<uv>-…<env>__validate-v<ev>-<u>-v<uv>-…validate-a2a-<agent>-v<n>,validate-install-image-<agent>-v<n>-<ts><agent>__validate-a2a-v<n>,<agent>__validate-install-image-v<n>-<ts>create_clitask, CLI artifact (build_mcp_cli's default)create-cli-<env>-v<n>,cli-<env><env>__create-cli-v<n>,<env>__clienv-snapshot-<env><env>__env-snapshotenv-snapshot-<env>-<universe>env-snapshot-<env slug>-<12 hex>snapshot_envwith nosnapshot_idsnapshot-<env>-<last 16 of the instance id><instance id>__snapshot-<step id><step>-workspace-<tail>,snapshot-<env>-<tail><instance id>__<step>-workspace,<instance id>__snapshot-<step>verifier-stdout-<step>-<instance id>-<ts>-<hex><instance id>__verifier-stdout-<step>-<ts>-<hex>collect_artifactsuniverse<universe or instance id><suffix>, spaces to-,/to_, cut to 100 chars<universe>-<path with / as _>, cut to 200<universe>__<sha256(path)[:16]>task run-batch --seedsuniverse<task id>__v<n>-<seed id or name><universe>-files<slug of its last segment>-<12 hex>-filesadhoc-<12 hex>__…(collect still falls back tounknown<suffix>)Unchanged: the put commands' image ids (
mcp-server-<id>,a2a-agent-<id>, …), per-service ids<snapshot>-<service>and…-file, the-fau/-export…suffixes, the A2A fixture keys of a bare agent, and step ids.snapshot_envand a capture series on the same env in one run no longer write versions of one universe. Intask run-batch, the same seed name in two tasks, or in two versions of a task, no longer collects into one universe.file-artifact-universe get-manywrites a bare universe over 200 bytes into its key segment's directory.cli-<env>untilcreate_cli(force=True)builds<env>__cli.env_snapshotted_universes,collected_artifacts, the env'scli_artifact, the compatibility record) rather than rebuilding them.<env>__validate-v<n>and<env>__validate-universe-compat-v<ev>-<universe>-v<uv>(an@localuniverse goes throughfs_safe).@localentities and runscollect_artifactsrefuses a bare universe, or an@localone that isn't a valid id, before any sandbox work. For a task that collects,task run-batchchecks each seed's@localuniverse, including the step'suniverse_id_suffix, before any run starts, and names the seed row.snapshot_env, a capture series and the unit-test verifier refuse a step id that can't sit inside an@localid before they export or run anything.key_segmentkeys. For an@localagent, validation stops at the existing "requires a signable object store" error and writes nothing to the configured store.key_segmentkey; the snapshot checks that the store can sign the upload before the sandbox runs anything; an env and a universe in different namespaces are refused up front.Rollout
Re-running a stored compatibility task
A universe-compatibility task created before this release pins its judge's
load_artifactstep to the old file-universe id,validate-<env>-v<ev>-<u>-v<uv>-fau, while the roundtrip step derives the id when it runs. Re-run on this release, the task writes<env>__validate-v<ev>-<u>-v<uv>-fau, and the judge loads the latest version of the old universe, so it grades the previous run's files. Re-create the task withvalidate_universe_compatibilityrather than re-running a stored one.Removed
refuse_local_derivationand its six calls: the stop-gaps that refused these cases until now.@localids, soenv multi put --validatenow validates an@localenv. Thea2a-agent,mcp-serverandwebsiteputs still stop earlier, at their<prefix>-<id>image id, until the put commands' image ids keep the namespace too.collect_artifacts' id sanitizer and its 100-char cap.create_cli's own CLI id:build_mcp_cli's default names it. The bundle resolver keeps that default's last segment, so a CLI built for another bundle's env is still named under this task.Testing
make unit-test): 5,856 passed, 13 skipped.tst/unit/store/derived_ids_test.pypins a bare and an@localrow per site, including the two link spellings, and the Docker validity of the snapshot image name.@localfence and acceptance tests assert that nothing reaches the configured store (sentinel stores).file-artifact-universe get-manywrites a 300-byte universe.tst/integration/cli/run_bundle_test.pygains a bundle task that ends withcollect_artifacts; it needs GNUstat, so it skips on macOS and runs in CI. CI'sintegration-localandintegration-local-sloware green.🤖 Generated with Claude Code
The PR does not appear safe to merge: public staging uploads and broken agent transfer paths need attention.
Summary
The PR gives derived entity and run IDs a shared
base__suffixformat, so stored tasks and artifacts keep a clear link to the entity or run that produced them. It also updates local-ID handling and storage names to support these IDs, including long ones.@localentities while keeping their writes in the matching local store.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[AgentEnv snapshot call] --> G[Local store grant] G --> R[Remote agent cannot reach host grant] S[SDK staging route] --> E[Agent endpoint] A -. no staging transfer .-> SReviews (12) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."