Skip to content

fix(bundle): bundle init names a registered installed alias an exported entity names by the alias - #795

Merged
earakely-scale merged 3 commits into
mainfrom
edgararakelyan/bundle-init-nested-alias
Nov 19, 2026
Merged

earakely-scale merged 3 commits into
mainfrom
edgararakelyan/bundle-init-nested-alias

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Follows #789 (merged), which this builds on.

What

bundle init now leaves an installed alias as a reference wherever the export names it: in a task's step, as #789 does, and also inside an entity the export writes. It does so when the store's registration ledger says that version was written from the installed bundle.

Why

A computer env registered into a shared store on agent-env's own base and driver names them there by their aliases, ubuntu-24.04 and reference (or cua-driver). bundle init copied both into the folder: the base's 37 files, its clock and egress sources included, and the driver's. The exported bundle then ran frozen copies instead of the runner's agent-env's. Found in psi-benchmark-tasks #19.

How

  • Nested references: _EntityOut.ref, which an entity's to_toml calls for each entity it names, floats a registered alias as _ref does for a step.
  • Folder names: fix(bundle): bundle init names an installed agent registered under its alias by the alias #789 kept folders off the aliases the export's steps name, collected before any folder is named. An alias an entity names can only be found by reading that entity. So the import now runs twice:
    • A first pass writes nothing and finds the aliases the export floats.
    • The real pass keeps those names off folders.
    • The first pass gets copies of the tasks, since an import edits the steps it reads. The real pass reads its entities again for the same reason.
  • Narrower than fix(bundle): bundle init names an installed agent registered under its alias by the alias #789: only an alias the export actually floats is reserved, so a stored claude-code that nothing floats keeps its own name. An export that names no alias still reads no registration ledger.

Tests

  • register_test.py: a desktop on ubuntu-24.04 and reference, registered into a shared store, exports as the desktop alone, its env.toml naming both aliases.
  • register_test.py (continued): planned in a fresh store, that export resolves ubuntu-24.04 and reference to agent-env's own bundles.
  • importer_test.py:
    • A multi env naming a registered mail writes mail into its env.toml floating. A stored team/mail that another step deploys, named before it, goes to envs/mail-2.
    • An eval's tasks keep a hand-put claude-code v2 off the alias another task floats, in either task order.
    • A ledger row of another bundle, kind or version floats nothing.
    • A skill named like an artifact alias the export floats fails the import.
  • tst/unit/bundle/: 1293 passed.

Chaos testing (30 minutes, scratch tests against this branch) turned up one gap, fixed in the last commit. A skill's folder takes its skill's name, and skills share names with artifacts, so a skill named like a floated artifact alias would have taken the alias's place in a run. These came out as expected:

  • eval task order;
  • rows for another bundle, kind or version;
  • one alias floated by a step and inside an entity at once;
  • a missing entity reported once, though the import runs twice;
  • task_images leaving out a floated entity's image;
  • ledger reads only when an alias is named, once per pass;
  • the register, export and fresh-store plan round trip.

End to end, with the PSI laptop task (scaleapi/psi-benchmark-tasks #19), whose desktop names ubuntu-24.04 and cua-driver:

  • Register: registered on AgentEnvHub's dev hub with 0.9.1565. The hub's store got ubuntu-24.04 and cua-driver under their aliases, with ledger rows from installed:agentenv-framework/computers and installed:agentenv-framework/drivers. The cua-driver desktop composed on Modal VMs.
  • Export: with this change cherry-picked onto 0.9.1565, the desktop's env.toml names computer = "ubuntu-24.04" and driver = "cua-driver", floating, and the bundle has no base or driver folder. Before, it carried the base's 37 files and the driver's. The PR's diff dropped 7,198 lines of copied agent-env code. The export still floats both after a second registration, when the hub's desktop names the hub's stored copies rather than writing them.
  • Run: a fresh copy of that bundle on a Linux VM, with agent-env 0.9.1565 from PyPI and fresh local stores:
    • The plan resolved claude-code, cua-driver and ubuntu-24.04 to agent-env's agents, drivers and computers bundles.
    • It composed the desktop from the runner's base (published image ghcr.io/scaleapi/agentenv-ubuntu-24.04) and cua-driver, ready in 14 minutes.
    • A full model run completed in 14 minutes with every verifier run. The assistant used cua-driver's own tools beside the computer's, and failed the task on its merits.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Bundle exports keep registered installed aliases as references, including inside exported entities, and keep local folders from taking those names.

  • Exported environments keep registered aliases in their settings.
  • Local entities keep their names unless an export floats the alias.

No new actionable issues found.

Reviews (2) · Last reviewed commit: "fix(bundle): task_images refuses what im..." · Reviewed by Greptile

Base automatically changed from edgararakelyan/bundle-init-installed-alias to main November 18, 2026 23:51
…ed entity names by the alias

A computer env registered into a shared store on agent-env's own base and
driver names them by their aliases there (ubuntu-24.04, reference), and
bundle init wrote both into the folder as copies. An entity another exported
entity names now floats by its alias, as a step's does, when the store's
registration ledger says that version came from the installed bundle.

No folder takes an alias the export floats: a first pass, writing nothing,
finds them, a nested one as well as a step's, so the names are known before
any folder is named. It takes copies of the tasks, since an import edits what
it reads. An export that floats nothing reserves nothing, so a stored
claude-code nothing floats keeps its own name again, and an export that names
no alias still reads no registration ledger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale force-pushed the edgararakelyan/bundle-init-nested-alias branch from 98ef152 to 410863c Compare November 18, 2026 23:53
…ails the import

A skill's folder takes its skill's name, and skills share their names with
artifacts, so a skill named like an artifact alias the export floats would
take the alias's place in a run. The import refuses it, as it does a skill
named like another artifact in the folder.

Tests found in chaos testing: an eval's tasks keep a hand-put version off the
alias another floats in either order; a ledger row of another bundle, kind or
version floats nothing; a desktop registered on the shipped base and driver,
exported, plans in a fresh store from the installed bundles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale marked this pull request as ready for review November 19, 2026 00:49
@earakely-scale
earakely-scale requested a review from a team as a code owner November 19, 2026 00:49
Comment thread src/agent_env/bundle/importer.py Resolved
…ted alias

task_images listed a task's images in one pass with no names reserved, so it
missed a skill named like an artifact alias the export floats, which
import_task refuses: a caller could push images for an export that fails.
It now takes the same first pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit 9b804d8 into main Nov 19, 2026
35 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/bundle-init-nested-alias branch November 19, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant