Repository navigation
feat(computer): key installs, known failures and app declarations by distribution as well as OS type - #553
Merged
earakely-scale merged 3 commits intoNov 9, 2026
Conversation
…tion as well as OS type A driver's env.toml can declare [install."linux/omarchy"] and [[known_failures."linux/omarchy"]] beside [install.linux]: an entry for a base's distribution, its /etc/os-release ID, replaces its OS type's there and only there. Gate 1, the composer and gate 3 take the most specific entry through one lookup (install.for_os); a key that isn't an OS type or <os>/<distribution> is refused at put. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fuse a distribution no supports names An app declares for one distribution with @linux(distribution="omarchy", ...) or @install("linux/omarchy", ...): on that distribution its install, launch, paths, skill and settings replace the OS type's, and on the computer the class reads its platform's (platform_key, entry_for), its distribution's before its OS type's. An install step or ready check's os= takes OS types or distributions, one for an OS type running on all of it. The framework passes the computer's platform, <os>/<distribution>, wherever it reads an app's declarations (gate 1, the composer, gate 3, boot and the computer provider), and keeps the OS type where it means the OS (native links, sites, trust files). A driver's install or known failures, or an app's install, for a distribution no supports entry names is refused at put, as it would never apply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, and accept a distribution scope on its OS's install An app's server and install steps picked its declaration by /etc/os-release, while the composer picked its install by the base's distribution, so a base whose label and image disagree would run an app half one way and half the other. For an app that declares an install, install step or ready check for a distribution, the composer now sets AGENTENV_PLATFORM, the platform it composed for, in its services and install steps, and the protocol reads it before what it detects; an app that declares nothing for a distribution reads the same either way and its image is unchanged. An install step or ready check scoped to a distribution is accepted when that distribution or its OS type has an install, so @ready_check(os="linux/ubuntu") works on an app with only @linux. A distribution key now takes the computer artifact's own pattern (DISTRIBUTION), and boot's helpers name their parameter the platform they receive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
force-pushed
the
edgararakelyan/o2-install-keyed-by-distribution
branch
from
November 9, 2026 06:30
815c43f to
81562ca
Compare
earakely-scale
deleted the
edgararakelyan/o2-install-keyed-by-distribution
branch
November 9, 2026 06:47
Comment on lines
+628
to
+629
| if unknown := [os_type for os_type in method.os or [] | ||
| if entry_for(cls._installs, os_type) is None and os_type not in installed_os]: |
There was a problem hiding this comment.
Malformed scopes silently skip work
declaration() now accepts malformed scopes such as @install_step(os="linux/") or @ready_check(os="linux/ubuntu/extra") when the app declares @linux. entry_for finds the Linux fallback, so these values pass the check. Neither value matches a valid computer platform, so the step or check is silently skipped everywhere.
Validate the scope’s format before checking for a matching install, and add tests for both decorators.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/agentenv-protocol/src/agentenv_protocol/computer/app.py
Line: 628-629
Comment:
**Malformed scopes silently skip work**
`declaration()` now accepts malformed scopes such as `@install_step(os="linux/")` or `@ready_check(os="linux/ubuntu/extra")` when the app declares `@linux`. `entry_for` finds the Linux fallback, so these values pass the check. Neither value matches a valid computer platform, so the step or check is silently skipped everywhere.
Validate the scope’s format before checking for a matching install, and add tests for both decorators.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
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 driver's install and known failures, and an app's declarations, were keyed by OS type alone (
[install.linux],@linux(...)). So one driver or app couldn't install one way on Ubuntu (apt, X11, cua-driver 0.38) and another on Omarchy (pacman, Wayland, cua-driver 0.44 and Hyprland's plugin). They can now be keyed for one distribution, by its/etc/os-releaseID, as<os>/<distribution>:platform.py:platform_key(os, distribution);entry_for(by_platform, key): the distribution's entry, else the OS type's;applies(keys, key), for install steps' and ready checks'os=, where one for an OS type runs on all of it. A step or check scoped to a distribution is accepted when that distribution or its OS type has an install.install.platform_of(base.os)) wherever it reads an app's or driver's declarations: gate 1, the composer, gate 3's known failures, boot's settings and ready timeout, and the computer provider. It keeps the bare OS type where it means the OS (native links, sites, trust files,os_type=to boot and probe).AGENTENV_PLATFORM, the platform key it built the image for, in the app's services and install steps./etc/os-release(platform.detect()), so the app always acts on the install its image holds, even if a base's label and its image disagreed.detect().<os>/<distribution>;supportsentry names, which would never apply (a misspelt"linux/omarcy", say).Nothing changes for an env that declares no distribution: every lookup falls back to the OS type, as before.
Decided on FD-5339 (2026-11-09):
"linux/omarchy";Checking that a disk base's
/etc/os-releasematches its declared distribution belongs to O1 (FD-5338), at its builder boot.Before registering Omarchy envs into a shared store, upgrade its readers. Code from before this PR fails to read a driver stored with a
"linux/omarchy"install (KeyErrorinComputerDriverEnv.from_dict), and silently drops an app's or known failure's distribution entry. The pacman half of FD-5339 (packages.pacman, the resolver in a booted base, the lock, the offlinepacman -U) is a follow-up PR.Docs: the drivers README (known failures and installs by distribution), the protocol README (
@linux(distribution=...)), and AGENTS.md.Testing
installs()takeslinux/omarchywith Linux's model and refuses malformed keys;for_ospicks the distribution's entry, else the OS type's.linux/omarchywaiver isn't applied on an Ubuntu base. Alinux/ubuntuwaiver is, and replaces thelinuxentry there.[install."linux/omarchy"]and[[known_failures."linux/omarchy"]]whensupportsnames Omarchy, and refuses them, and a malformed key, before any write when it doesn't.@linux(distribution="omarchy")and no Omarchy insupportsis refused.linux/ubuntuinstall step on an Ubuntu base getsAGENTENV_PLATFORM=linux/ubuntuin its install step and its supervisord conf. Apps that declare nothing for a distribution keep their exact Dockerfile and conf, as the existing tests assert.linuxruns on Omarchy;@linuxtakesdistribution;AGENTENV_PLATFORMover what it detects;linux/ubuntustep or check on an app with only@linuxis accepted and runs only on Ubuntu, and one whose distribution and OS type have no install is refused.ruff check .is clean.mainon this machine (a Sail provider test and a Windows disk-recipe test), and CI runs everything.Part of FD-5339 (under FD-5336).
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the remaining malformed-scope finding is non-blocking.Fix with agent prompt
Summary
Adds distribution-specific installs, app declarations, and known failures with OS-level fallbacks.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR B[Base OS and distribution] --> K[Platform key] K --> E{Distribution entry exists?} E -->|Yes| D[Use distribution entry] E -->|No| O[Use OS entry] D --> C[Compose app] O --> C C --> P[Pass AGENTENV_PLATFORM when needed] P --> R[App reads matching declaration]Reviews (9) · Last reviewed commit: "fix(computer): tell an app the platform ..." · Reviewed by Greptile