Skip to content

fix(bundle): an installed entity pulled into a plan binds its own aliases to its bundle, whatever the store holds - #800

Merged
earakely-scale merged 2 commits into
mainfrom
edgararakelyan/fd-6309-an-installed-entity-pulled-into-a
Nov 19, 2026
Merged

earakely-scale merged 2 commits into
mainfrom
edgararakelyan/fd-6309-an-installed-entity-pulled-into-a

Conversation

@earakely-scale

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

Copy link
Copy Markdown
Collaborator

What

When the bundle planner pulls in an entity from an installed bundle, that entity's own references to aliases now bind what its installed bundles give those aliases, even where the store holds an entity of the alias's id. Those targets are pulled in too and written again under the alias. References a bundle makes itself keep #733's rule, where the store's entity shadows the alias.

  • _Planner._pointed: for an entry in origins (pulled from an installed bundle), a store reference to an alias points at the alias's installed target (_installed_alias, a direct alias-table lookup), whatever the store holds. A refused alias, or a reference pinning a version, falls back to _alias_of as before.
  • _renamed rewrites only unpinned fields naming a pointed alias (Greptile r1). Only an unpinned reference is ever pointed, so a pinned field naming the same alias keeps naming the store's entity.
  • Those internal references aren't recorded in Plan.alias_uses. That map lists the aliases the bundle itself names, and bundle run reports it as such. Recording them would report "the store's env 'page' v1, which shadows the alias" for a reference that was in fact bound to the installed one.
  • AGENTS.md: the exception, next to feat(env): the env store refuses an alias's id only where aliases resolve, so a service may hold one #733's shadowing rule.

Why

Chromium's 0.9.1574 dev promotion on AgentEnvHub registered the installed chromium by its own id (agentenvhub-sdk 0.42.2). Its references to its driver and base computer (page, ubuntu-24.04-browser, both aliases) bound to the hub's copies from the 0.9.1558 promotion, so chromium v2 was composed over them. That closure's composition key (1e8fcaf9…) isn't the release's (102edd82…). So the worker composed chromium itself (amd64 only) into the hub's registry instead of reusing the released image. The promotion's gate passed, but on that image, and the promotion then reported failed, because its index digest isn't the release's.

Registering an installed entity means its closure as installed. Its references bind to that closure the same way whether the store is empty, which is why the first promotion worked, or already holds older copies.

Tests

  • New: test_the_installed_chromium_registers_over_its_own_driver_though_the_store_holds_another_under_the_alias. It registers the installed chromium into a shared store, edits the store's page, and registers again. The installed page is written again (v3) and chromium points at it. Without the fix it fails with KeyError: 'page', the same failure as on the hub.
  • New: test_pointing_an_alias_rewrites_only_the_fields_naming_it_unpinned. _renamed rewrites only unpinned fields, so a pinned field keeps naming the store's entity, as its reference does (Greptile r1).
  • tst/unit/bundle/: 1293 passed before the new test, and tst/unit/bundle/, tst/unit/store/, tst/unit/env/ together: 5229 passed with the change. One failure, test_disk_recipe.py::test_a_windows_install…, fails the same way on main on macOS and is unrelated.

FD-6309

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Installed entities pulled into a bundle plan now keep their installed alias targets, even when the store holds another entity under that alias.

  • Pulled entities keep the alias dependencies from their installed bundle.

No new actionable issues found.

Reviews (5) · Last reviewed commit: "fix(bundle): pointing an alias rewrites ..." · Reviewed by Greptile

…ases to its bundle, whatever the store holds

A reference an installed bundle's entity makes to an alias was resolved like any other: where the store held an
entity of the alias's id, that one shadowed it. So registering the installed chromium into a hub that already held
`page` and `ubuntu-24.04-browser` from an earlier release composed it over those, under a key no release published,
and the worker built chromium itself. Such a reference now binds what its installed bundles give the alias, pulled in
and written again under the alias; references the bundle itself makes keep the store-shadows-alias rule, and only
they are Plan.alias_uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/agent_env/bundle/plan.py Resolved
…inned

Greptile r1: an entry naming an alias both unpinned and pinned had both fields rewritten to the alias's entity, the
pinned one keeping its version, so it read that version of the installed id instead of the store's entity. Only an
unpinned reference is ever pointed at an alias's entity, so _renamed now leaves pinned fields as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit 7f2d775 into main Nov 19, 2026
35 of 36 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/fd-6309-an-installed-entity-pulled-into-a branch November 19, 2026 03:37
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