Skip to content

feat(env): the env store refuses an alias's id only where aliases resolve, so a service may hold one - #733

Merged
earakely-scale merged 4 commits into
mainfrom
edgararakelyan/fd-5908-store-released-alias-env
Nov 17, 2026
Merged

earakely-scale merged 4 commits into
mainfrom
edgararakelyan/fd-5908-store-released-alias-env

Conversation

@earakely-scale

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

Copy link
Copy Markdown
Collaborator

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with no new actionable findings.

Summary

The env store now reserves installed aliases only while namespace routing is on.

  • Services can store environments under installed alias names.

Reviews (12) · Last reviewed commit: "refactor(env): the env store refuses an ..." · Reviewed by Greptile

…s id when its metadata says so

A service resolves no alias, so for a task naming `chromium` to deploy chromium on the hub, the hub holds that env
under the id `chromium`, which the store refused: it refuses to start any env under an installed alias's id, so a
deployment recorded under the alias reloads the alias's env. The alias's own env reloads as the same env, so the
store now lets it take the id when its metadata carries `released_alias_metadata(alias)`: the alias, its target's id
without its namespace (an entity outside a local namespace may not name one) and the agent-env version. Any other
env is refused the id as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/agent_env/env/store.py Resolved
@earakely-scale

Copy link
Copy Markdown
Collaborator Author

Closing this in favour of FD-6071, as agreed with Edgar.

Greptile's finding is that the alias's target and the hub's stored chromium would share one id, so a saved alias deployment could fail to reattach, or reattach to the other env. FD-6071 already has to settle how the low-level API resolves aliases with routing on and off. It will settle that a service, which has routing off, resolves an alias to the store's env marked as that alias's release, under the env's own id. No store env then takes an alias's id, the store's rule stays as it is, and that problem can't arise. M8.60's hub part (scaleapi PR 2) follows FD-6071.

earakely-scale and others added 3 commits November 16, 2026 21:49
…lder alias deployments included

Writing it shadows the alias as any store env of the alias's id does, since Env.get and the planner read the store
first. A deployment recorded under the alias in that store before then, with routing on, reattaches to it from then
on, or isn't found when it lacks that deployment's version: a one-time moment per store and alias, documented
rather than handled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The store checked the mark only on an env's first version under an alias's id, so once the released env was
written, any later version, marked or not, could become the latest and shadow the alias for every task naming
it. A new version of an env whose latest version is marked must now carry the mark too. An env that held an
alias's id before the alias existed carries none, and keeps taking versions as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… resolve, in place of the released-alias mark

The store refuses an env under an installed alias's id so that a deployment recorded under the alias reloads the
alias's env, and deployments are recorded under an alias only where aliases resolve, with namespace routing on. A
service runs with routing off and resolves none, so there the refusal protected nothing. The refusal now applies
only with routing on, and a service may hold an env under an alias's id, as the hub will hold `chromium`, with no
mark: `released_alias_metadata`, `RELEASED_ALIAS` and the rule that each version keeps the mark are gone. The
store's env of an id still wins over the alias wherever that store is read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale earakely-scale changed the title feat(env): an env store holds the env an alias names under the alias's id when its metadata says so feat(env): the env store refuses an alias's id only where aliases resolve, so a service may hold one Nov 17, 2026
@earakely-scale
earakely-scale merged commit ff2a011 into main Nov 17, 2026
36 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/fd-5908-store-released-alias-env branch November 17, 2026 16:40
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