Repository navigation
[3807 by Claude Opus 5.5] Remote runtimes: apply instance runtime packages on Sprites and Fly Machines (refuse until supported) - #3816
Conversation
I implemented three of the issue's four items. Sprites now install the configured runtime packages, runtimes that can't apply packages are refused before launch, and the docs cover each runtime. Item 2, building a derived image for Fly Machines, is not done, so Fly runs are refused whenever packages are configured. Type-check, lint, the new tests and the affected runtime/registry suites pass. Nothing was run live: the `psql --version` checks on a real Sprite and a real Fly Machine still need doing. The refusal (item 3) - I added a `supportsRuntimePackages` capability next to `supportsExtensions`. Docker and Sprites declare `true` and Fly Machines `false`. A custom runtime that doesn't declare it is treated as unsupported, as with extensions. - `runAgent` checks it before launch. If packages are configured and the runtime can't apply them, the run fails with `AgentRuntimeCapabilityError` (capability `runtime_packages`). The message lists the packages and points to a supporting runtime, removing the packages in Settings, or `.propr/setup.sh`. - The package list is only read for runtimes that lack the capability, so Docker runs pay nothing extra. If the list can't be read or is invalid, the run is refused rather than started without packages. - I didn't block the setting in the Settings UI; the refusal happens at launch only. - The package list and validation now live in a new file, `agentRuntimePackageProfile.ts`, which doesn't depend on Docker. `agentRuntimePackages.ts` re-exports what it used before. Sprites (item 1) - Provisioning installs the configured packages with `apt-get` after `sprites-agent-setup.sh` and before the clean checkpoint. It uses the same flags as the Docker build, and package names are passed as arguments, never pasted into the shell script. - An apt failure fails provisioning with apt's error text and deletes the Sprite. - Sprites use the package list as saved in Settings, not the last list that built successfully in Docker. So a misspelled package that fails the Docker build will also fail Sprite provisioning. - Each pooled Sprite records a digest of its package list. When a run asks for a Sprite, the worker re-reads the list; it deletes warm Sprites built with an old list and provisions a fresh one. - This differs from the issue, which suggested putting the digest in the pool key or deployment marker. I did it per Sprite instead, because warm Sprites are held in each worker's memory, and that avoids changing the shared Redis marker. Each worker retires its own stale Sprites the next time it hands one out. - The provisioning deadline went from 21 to 36 minutes to make room for up to 15 minutes of package installs. Docs (item 4): `agent-runtime.md` has a new "Runtime Packages" section with a per-runtime table and `.propr/setup.sh` as the per-repository alternative. The Fly tutorial has a matching note. Tests: the new file `test/agentRuntimePackagesRemote.test.ts` (7 tests) covers: - the refusal message and error. - the install command. - installing before the checkpoint. - reusing a warm Sprite when nothing changed and replacing it when the list changes. - an apt failure. Two existing suites, `agentRuntimeRegistry` and `agentRunComputeUsage`, hung after the change: their fake runtimes now trigger the package read, which opens the test database. I added `after(closeConnection)` to both, as `spritesRuntime.test.ts` already does. Still open: - The Fly Machines image build (item 2). Once it lands, Fly's capability flag can be switched to `true`. - On a worker that runs only Sprites, the Settings package build job still runs the Docker image build, so it will probably show `failed` even though Sprites install the packages. This predates the change, and I haven't run it. There are no visual previews because nothing in the UI changed. ProPR-Agent: claude/claude-opus-5-5
Close the two open items in this PRThe issue asks for runtime packages on both remote runtimes, so please finish these here rather than leaving them open: 1. Fly Machines: install at Machine start (instead of a derived image for now). A derived image needs a builder the worker doesn't have: there's no Docker daemon on Fly, and adding a remote builder is a bigger change. Fly Machines runs are ephemeral, so the simplest correct approach is the same install Sprites now do, run in the Machine before the agent starts:
A cached derived image can come later as an optimization; note it in the docs as a known cost, not as missing support. 2. Settings package status on non-Docker workers. When the worker runs only remote runtimes (no Docker daemon), the Settings package build must not run the Docker build and report Live verification (required before merge): I'll run it on Fly with a package configured. Please make it easy to check: log one line per run or provisioning with the package digest and install duration, without the package names when the list is long. |
|
✅ Applied the requested follow-up changes in commit f13cec0 Summary of ChangesBoth open items are done: Fly Machines now install the configured runtime packages at every Machine start, and on a worker with only remote runtimes Settings reports the list as applied instead of running the Docker build. The affected suites pass (core, Fly, Sprites, registry, compute usage, the API route test and the Settings UI test), and typecheck and zero-warning lint are clean. Nothing ran on a real Fly Machine or Sprite, so your live check is still the real test. 1. Fly Machines install at Machine start
2. Settings on a worker with no Docker runtime
What to look for in your live check: one log line per run.
Tests:
Review digestRisk-tiered paths
Diff size: 20 files changed, +576/−49 lines Visual previewRuntime packages on a remote-only workerSettings → Agent extensions & packages with only Fly Machines configured: the list is reported ready and applied at every Fly Machine start, instead of an image build result or a failed status. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Both open items are done: Fly Machines now install the configured runtime packages at every Machine start, and on a worker with only remote runtimes Settings reports the list as applied instead of running the Docker build. The affected suites pass (core, Fly, Sprites, registry, compute usage, the API route test and the Settings UI test), and typecheck and zero-warning lint are clean. Nothing ran on a real Fly Machine or Sprite, so your live check is still the real test. **1. Fly Machines install at Machine start** - **Install step:** the launcher installs the packages as root before it reports ready and before dropping to `node`. It uses the same command as Sprites: same `apt-get` flags, package names passed as arguments, nothing pasted into the shell. Apt runs with a fixed, trusted environment. - **Time limit:** 15 minutes, with apt's process group killed at the limit. The worker keeps polling while the Machine reports `installing`, so `PROPR_FLY_BOOT_TIMEOUT` doesn't include the install. - **Failure:** a failed or timed-out install fails the run and never starts the agent. The error looks like `Fly Machine could not install the agent runtime packages (digest …): apt exited with code 100 after 3s …`, followed by the last 4 KB of apt's output. The Machine is then destroyed. - **No packages configured:** no install file is sent and there is no apt step. - **Package list:** it is re-read for every run, so a Settings change applies to the next Machine. A list that can't be read or is invalid fails the run before any Machine is created. - **Install time:** recorded in the run's compute usage as a new `packageInstallMs` field and also as `provisioningMs`, which already has a database column. The run summary shows it as "… installing packages". Sprites now record `packageInstallMs` too when a Sprite was provisioned for that run. - **Capability:** `supportsRuntimePackages` is now `true` for Fly Machines. The launch-time refusal only applies to custom runtimes that don't declare it. - **Docs:** the runtime table in `agent-runtime.md` and the Fly tutorial now say Fly installs on every run and suggest Sprites (warm pool) when installs are slow. A cached derived image is listed as a known cost, not missing support. **2. Settings on a worker with no Docker runtime** - **Detection:** this applies when no enabled agent runs on Docker. - **Build job:** it runs the same validator, then saves the list as `ready` with a new `appliedBy` note, e.g. "Installed at every Fly Machine start; no Docker image is built", or "when Sprites are provisioned", or both. It doesn't run the Docker build or remove old images. Mixed workers that also use Docker build the image as before. - **API:** the Settings checks also used Docker, so on such a worker validation and Apply now use only the name validator. A misspelled package is then reported by the runtime's apt install when a run starts. Package search returns no suggestions there, and the catalog warm-up is skipped. - **UI:** Settings shows "2 active · Installed at every Fly Machine start; no Docker image is built" instead of "N active across 0 agent images". I captured a preview of this. - **Not changed:** `propr runtime packages verify` still uses Docker, so it won't work on a worker without Docker. **What to look for in your live check:** one log line per run. - On success: `Installed agent runtime packages at Fly Machine start`, with `run`, `machine`, `packagesDigest`, `packageCount` and `installMs`. - On failure: `Agent runtime package install failed at Fly Machine start`, which adds `exitCode`. - Package names appear only when there are five or fewer. - Sprites log `Installed agent runtime packages on Sprite` with the same fields at provisioning. **Tests:** - `test/flyRuntimePackages.test.ts` covers: - no install step without packages - install before start, with the recorded time - a failed install that never starts the agent - an unreadable list - the log fields - the real Python launcher's success, failure and timeout paths - `test/agentRuntimePackagesRemoteSettings.test.ts` covers the remote-only build being `ready` rather than `failed`. It fails against the previous code. - I also added one API route test and one UI test, and updated `agentRuntimePackagesRemote.test.ts` for the new Fly capability. PR: #3816 Comment by: @integry (ID: 7179341931) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
Live verification: have the Fly smoke workflow exercise a runtime packageThanks, both items look right. To verify this live, and to keep it covered, extend
I'll run it on both runtimes and post the results. |
|
✅ Applied the requested follow-up changes in commit a537da7 Summary of ChangesI've extended 1. Runtime package. I picked
2. Fixture issue. The issue asks for
3. Log evidence. The verify step finds the latest
4. Extra steps a
The image build and push will make the Fly Machines run noticeably longer, but I haven't timed them. The job's 100-minute limit is unchanged. I updated the "Nightly smoke fixture" section of There are no visual previews, since nothing in the UI changed. Review digestRisk-tiered paths
Diff size: 3 files changed, +115/−20 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I've extended `.github/workflows/fly-e2e.yml` with all four items. Nothing has run live yet. Locally I checked that every step's bash parses, ran the new jq filters and file checks against made-up logs and files, and type-checked core. **1. Runtime package.** I picked `figlet`: it isn't in `Dockerfile.agent`'s apt list or in `sprites-agent-setup.sh`. The prepare step now fails if either file ever mentions it, since the smoke would then prove nothing. - The configure step, still before the idle stop, uses the same two functions as Settings → Apply. `requestAgentRuntimePackageBuild` is what the API calls, and `buildAgentRuntimePackageProfile` is what the worker's job calls. - It fails unless the package state comes back `ready`, holding exactly `figlet`, and marked as installed by the selected runtime. - It saves the list's digest as `RUNTIME_PACKAGES_DIGEST`. To read the digest over SSH I exported `agentRuntimePackagesDigest` from `@propr/core`; that one-line change in `packages/core/src/index.ts` is the only code change outside the workflow and docs. **2. Fixture issue.** The issue asks for `$APP.txt` with exactly two lines: `$APP`, then the output of `figlet -v | head -1`, copied as-is. The verify step prints both lines and checks: - there are exactly two lines and line 1 equals `$APP`. - line 2 is non-empty and doesn't contain "not found". - line 2 matches `^FIGlet Copyright \(C\) [0-9]`, the first line of Debian figlet 2.2.5's `-v` output as I recall it, not checked against a real install. If the live run shows a different banner, only the `RUNTIME_PACKAGE_BANNER` value needs changing. **3. Log evidence.** The verify step finds the latest `Installed agent runtime packages…` record, which covers both the Sprite and the Fly Machine wording. It prints `packagesDigest`, `packageCount` and `installMs`, and fails if the record is missing, the digest differs from the recorded one, the count isn't 1, or `installMs` isn't a number. - It only accepts records logged after the workflow saw the Machine stop. I didn't use the wake record's `wokeAt`, because a Sprite warmed at boot could log just before it. **4. `agent_runtime` input.** It's a `workflow_dispatch` choice, `sprites` (default) or `fly-machines`. The nightly cron has no inputs, so it stays on `sprites`. Deploy passes `--agent-runtime "$AGENT_RUNTIME"`, and the database check now matches `compute_runtime` against the selected runtime. **Extra steps a `fly-machines` run needs.** The Fly Machines runtime won't start without `PROPR_FLY_APP`, `PROPR_FLY_IMAGE` and `PROPR_FLY_API_TOKEN`, so for `fly-machines` the workflow also: - creates a throwaway agent app, `propr-e2e-agents-<run>-<attempt>`. - builds the agent image on the runner with `build-images.sh --only agent`, pushes it to that app and uses the pushed digest. - creates a 2-hour deploy token limited to that app, and adds all three values to the env file. - skips the Sprites token and `PROPR_SPRITES_MAX`, so `FLY_E2E_SPRITES_TOKEN` is only required for Sprites runs. - deletes the agent app during cleanup; the Sprite cleanup step now runs only for Sprites. The image build and push will make the Fly Machines run noticeably longer, but I haven't timed them. The job's 100-minute limit is unchanged. I updated the "Nightly smoke fixture" section of `docs/docs/tutorials/setup-fly.md` to describe the input, the agent app and the package checks. There are no visual previews, since nothing in the UI changed. PR: #3816 Comment by: @integry (ID: 7179771861) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
Fly Machines path: the agent token can't be created with
|
|
✅ Applied the requested follow-up changes in commit 06dd148 Summary of ChangesI changed the Fly Machines path in Agent token
Teardown
Review digestRisk-tiered paths
Diff size: 1 file changed, +13/−3 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I changed the Fly Machines path in `.github/workflows/fly-e2e.yml` so it derives the agent token locally instead of calling `tokens create`. It hasn't run live yet. The YAML parses; I couldn't run the `jq` caveat expression because `jq` isn't installed in this container, but it has the same structure as the stop-token one already in the workflow. **Agent token** - `flyctl tokens create deploy` is gone. The step now looks up `$AGENT_APP`'s internal numeric ID through the Machines API, the same way the stop token does. It requires the ID to be a positive integer, because an ID of 0 would grant access to every app. - It then pipes two caveats into `flyctl tokens attenuate`, which uses `FLY_E2E_TOKEN` as the parent token: - `Apps` for that ID only, with access `rwcdC`: read, write, create, delete and control. Read covers the app's images and logs. Create, delete and control cover creating, destroying, starting and stopping Machines. - `ValidityWindow` with `not_after` set to now + 7200 s, so the token lasts at most 2 h. - I checked the Fly Machines runtime (`packages/core/src/agents/runtime/fly/api.ts`). It only calls the Machines API and logs endpoints for that one app, so no other access is needed. - If the derived token comes back empty, the step fails. The token is masked and written to `PROPR_FLY_API_TOKEN` as before. **Teardown** - "Destroy the Fly Machines agent app" now runs on plain `always()` and destroys `$AGENT_APP` whenever the `destroy-agent-app` marker exists. - Before, it also required the main app step to have succeeded and the runtime to be `fly-machines`. Now only the marker decides. It's written right after `flyctl apps create "$AGENT_APP"` succeeds, so a failure at any later point still gets cleaned up. PR: #3816 Comment by: @integry (ID: 7179951337) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
Package (stdio) MCP servers now run on both Sprites and Fly Machines, and `packageMcp` is `true` for both. Nothing was tested live. Locally, the related suites, the core and root typechecks, and lint on the changed source all pass. **How the install works (both runtimes)** - The worker first installs and verifies each package server exactly as it does for Docker: same registry, exact version, integrity value, no lifecycle scripts. - The worker sends its verified `package.json` and `package-lock.json` to the sandbox. The sandbox replays them as root with `npm ci --ignore-scripts` against the same registry, so npm checks every dependency against the integrity value in the lock file. - The installer refuses a lock that doesn't pin the package at its stored integrity value, or any dependency not from the registry. It then checks the installed package's name and version and makes the result root-owned and read-only at `/opt/propr/packages/<key>`. - The servers run next to the agent through the same stdio bridge as on Docker. Plain variables are passed the same way, secrets only by environment name, and output redaction is the same. - A new test does the full replay locally: real `npm ci` against the fixture registry, then a tool call through the bridge. It also checks that a lock with the wrong integrity value is refused before npm runs. - **Registry reach:** the Sprite or Machine must reach the npm registry. A private mirror set with `PROPR_EXTENSION_NPM_REGISTRY` has to be reachable from there too. **Sprites** - The install runs during provisioning, after the setup script and before the clean checkpoint. A failure fails provisioning with the end of npm's output, and the Sprite is deleted. - Each pool slot carries a digest of its package-server set. An idle Sprite with a different digest is retired, not reused, and so is a background replacement built for another set. - Matching is exact, so a run with no package servers won't reuse a Sprite built with some. If runs with different sets alternate, Sprites will be reprovisioned more often. Background replacements are built for the set the latest run asked for. - The stdio bridge wasn't on Sprites before. It's now uploaded with the setup scripts and installed at `/opt/propr/extension-stdio-bridge.mjs`. - The install time is recorded as `packageServerInstallMs` in compute usage. A warm Sprite reports none. **Fly Machines** - At Machine start the wrapper reports `installing` and runs the installer as root, before the agent and before the start gate opens. The time limit is 10 minutes. - A failed or timed-out install reports `install-failed`. The run fails with an error naming the servers and digest, followed by the end of npm's output. The Machine is destroyed and the agent never starts. - A run without package servers gets no installer files and no install step. - The install time is recorded in compute usage (`packageServerInstallMs`, also counted in `provisioningMs`). **Interim rule** - The drop/refuse rule no longer applies to package servers on Sprites and Fly. It still applies to custom runtimes that don't declare `packageMcp`. - **Decision for you:** I split operator catalog stdio servers into their own class (`catalogMcp`, error capability `catalog_mcp`), and Sprites and Fly keep the drop/refuse rule for them. They run an executable that must already be in the run's image, which neither runtime provides, so turning on `packageMcp` would otherwise have launched them broken with no note. For custom runtimes `catalogMcp` defaults to their `packageMcp` value. Say if you'd rather handle those differently. **Log lines for your live check** - Every run that applies library items logs `Extension Library items applied to this run`. It carries the runtime, library revision, `extensionDigest` of the applied items, the counts `skills`, `urlServers`, `packageServers` and `catalogStdioServers`, and `packageServersDigest`. - The installs log `Installed package MCP servers on Sprite` and `Installed package MCP servers at Fly Machine start`, with the same digest and the install time. **Gateway reachability:** #3817 isn't merged, so it isn't wired. I left a `TODO(#3817)` in `extensionRuntimeSupport.ts` where URL servers are marked unsupported when there's no reachable URL. That's where the reverse forward's `/api/extensions/mcp` should go. **Docs:** the tables in `agent-runtime.md`, `agent-extensions.md` and the Fly tutorial now show package servers as supported, list catalog stdio separately, and describe the installs, failures and log lines. **Merging with #3816:** #3816 is also unmerged and edits the same spots: the Fly wrapper and probe states, Sprite provisioning and the compute usage fields. I used my own file names so the two installs can sit side by side, but whichever lands second will need its conflicts resolved. Updated tests cover: - the Sprite install happening before the checkpoint - warm-pool reuse versus retirement by digest - a Sprite provisioning failure - a Fly install that succeeds (with compute usage), fails, or isn't needed - the wrapper's install states - the remote launch carrying the install - catalog stdio refusal on both runtimes PR: #3818 Comment by: @integry (ID: 7180544030) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
Fly Machines smoke run: Machine create rejected with HTTP 422 (cause hidden)Live results on this PR:
F1 (blocker): surface Fly's validation message. F2: find the 422. With F1 the next run will say what Fly rejected. Meanwhile, please check what this PR adds to the create request against the Machines API schema: the package-install I'll re-run the Fly Machines variant once F1 lands. |
|
✅ Applied the requested follow-up changes in commit a1b7ea6 Summary of ChangesI've done F1: the next Fly Machines run will show Fly's reason for the 422. For F2, the package install is unlikely to be the cause, but I couldn't pin down what is. The new tests, the existing Fly suites (39 pass), the core typecheck and lint all pass. Nothing ran against the real Machines API. F1: Fly's validation message is now in the error
F2: what this PR adds to the create request
The only thing that differs from a run without packages is that one small file, so I don't think it causes the 422. The rejection may come from config that was already there before this PR; the error text from your re-run should say which. New tests (
No previews, since nothing in the UI changed. Review digestRisk-tiered paths
Diff size: 3 files changed, +144/−7 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I added the `extensions` mode to `.github/workflows/fly-e2e.yml`. It hasn't run live yet. Locally, the workflow parses as YAML and every step passes `bash -n`. I also ran the new parts against the repo's real validators and sample data: the skill archive, the library save body, the jq filters and the three-line check all pass. **#3816 isn't merged, so the mode is Sprites-only.** A comment at the `EXTENSIONS` env var says to combine it with `agent_runtime` once #3816 lands. **How it turns on** - **Manual runs:** a `workflow_dispatch` boolean input `extensions`, default `false`. - **Nightly runs:** only when the repo variable `FLY_E2E_NIGHTLY_EXTENSIONS` is `true`. **One fixture change.** The library API only accepts a stored administrator, and nothing signs in on the fixture. So in extensions mode the deploy step adds the `FLY_E2E_GITHUB_TOKEN` user's login to `PROPR_ADMIN_USERS`. The new step then claims the administrator role through `POST /api/admin/members/claim`. **1. Setup, before the idle stop (new step)** - It calls the Settings → Extensions API itself (`/api/instance/extensions/v1/…`), using the fixture GitHub token as a bearer token. - **Skill bundle:** a ustar archive holding one `SKILL.md` named `fixture-token`. When asked for the fixture skill token, it answers `SKILL-OK-<run id>-<attempt>`. It goes through the same archive upload route as Settings. - **Package MCP server:** `fixture-echo`, running `@modelcontextprotocol/server-everything` 2.3.1 with the `stdio` argument and the `echo` tool. - The integrity value is pinned in the workflow. Settings' "Check" lookup has to return that value, and so does the saved library. Otherwise the step fails. - I ran this version locally: `echo` with `MCP-OK-1` returns `Echo: MCP-OK-1`. - Both items are auto-applied and limited to the fixture repo. The step checks the saved revision afterwards. - **No URL MCP server.** The step summary says why: the fixture has no reachable URL MCP server of its own, and the gateway route from #3817 isn't merged. - Only the read requests retry. A repeated save would fail on the library revision check. **2. The issue** asks for `$APP.txt` with three lines: `$APP`, the skill token, and the `echo` output for `MCP-OK-<run id>-<attempt>`. Without the mode, the issue text is unchanged. **3. The verify step** - It checks all three lines, expecting line 3 to be `Echo: MCP-OK-…`, and that the file has exactly three lines. - It requires an `Extension Library items applied to this run` log line with runtime `sprites`, `skills>=1` and `packageServers>=1`. - It then requires an `Installed package MCP servers on Sprite` (or `… at Fly Machine start`) line with the same `packageServersDigest`. - It prints `extensionDigest`, `packageServersDigest`, the item counts and `installMs` to the log and the step summary. - The step streams app logs in the background from its start. `flyctl logs --no-tail` keeps only recent lines, and the install line could be gone by the time the PR exists. **Docs** - In `agent-runtime.md`, the operator catalog stdio row is now labelled `catalogMcp`. For Sprites and Fly it says "dropped with a note when auto-applied, run refused when added explicitly". - `setup-fly.md` has a new "Extension Library check" section covering the input, the nightly variable, the admin change, the pinned package and what gets verified. One thing to check before you run it: if the fixture's env sets a GitHub user whitelist, the token user has to be on it, or the API calls get a 403. There's no visible UI change, so I made no previews. PR: #3818 Comment by: @integry (ID: 7180949991) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
I've done F1: the next Fly Machines run will show Fly's reason for the 422. For F2, the package install is unlikely to be the cause, but I couldn't pin down what is. The new tests, the existing Fly suites (39 pass), the core typecheck and lint all pass. Nothing ran against the real Machines API. **F1: Fly's validation message is now in the error** - When a request fails, `MachinesClient.request` reads up to 64 KB of the body. It keeps only Fly's JSON `error` string and drops the rest, so the echoed config never reaches the error. A body that isn't JSON, or has no string `error`, gives the same message as before. - Before that string is used, three kinds of value are redacted: - the run's known secrets (the Fly token, transport token, provider and GitHub credentials), using the same redactor as run output, so their base64, hex and URL-encoded forms are caught too. - anything that looks like a known kind of secret (`redactSecrets`). - any unbroken run of 80+ base64-style characters, such as an echoed file `raw_value`. I added this because the agent's env travels inside base64 file contents, where a plain match on the secret wouldn't find it. Image digests (64 hex characters) still show. - It is then truncated to 300 characters, so the error reads `Fly Machines API POST returned HTTP 422: <error>`. - To pass the secret list to the client, `flyMachinesRuntime.ts` now prepares the launch before creating the client. **F2: what this PR adds to the create request** - It adds one entry to `files`: `/root/propr-run/packages.json`. It sits in the same root-owned directory as the `input` and `stdin` files that were already sent. Its `mode` is the number `0o600`, and its `raw_value` is a few hundred bytes of base64. - Nothing is under `/run`, `/proc`, `/sys`, `/dev` or `/data`. - The PR adds no `init`, `env`, mount or service fields. The only thing that differs from a run without packages is that one small file, so I don't think it causes the 422. The rejection may come from config that was already there before this PR; the error text from your re-run should say which. **New tests** (`test/flyMachinesCreateRequest.test.ts`, 3 tests): - the parsing rules: non-JSON or a missing or non-string `error` gives no detail, secrets are redacted, and long messages are truncated. - an end-to-end rejected create where the 422 body echoes an env secret and an agent-file `raw_value`. The run fails with the redacted message, and the error contains neither the secret nor the Fly token. - the full create body for a run with two packages, checked against `validateContainerFilePaths` (imported from the CLI). It also checks that paths are absolute and normalized, there are no duplicates, modes are integers from 0 to 0o777, `raw_value`s are valid base64, the config has no new keys, and the Fly token is absent. No previews, since nothing in the UI changed. PR: #3816 Comment by: @integry (ID: 7181040823) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
Both runtimes verified live — one docs addition before ultrafixSprites and Fly Machines both pass (evidence in the description). The earlier 422 was Fly's org Machine limit, and your F1 message is what showed it. Please document that in the Fly tutorial and the Fly Machines runtime docs:
If the Fly Machines runtime has no concurrency cap today, add one ( |
|
✅ Applied the requested follow-up changes in commit 144f727 Summary of ChangesI documented the Fly Free Plan Machine limit in both docs. The Fly Machines runtime had no concurrency cap, so I added How the cap works
Docs
Tests: the new
With the cap turned off, the third test hangs instead of passing, so it does catch a missing cap. Results:
There are no visual previews because nothing in the UI changed. Review digestRisk-tiered paths
Diff size: 7 files changed, +198/−5 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I documented the Fly Free Plan Machine limit in both docs. The Fly Machines runtime had no concurrency cap, so I added `PROPR_FLY_MACHINES_MAX` (default unlimited). Runs over the cap now wait their turn instead of failing. Nothing new was run live on Fly; the cap is covered by local tests only. **How the cap works** - A run over the cap waits before it creates its Machine. Waiting runs go in arrival order. - A slot is freed only after the previous run's Machine is destroyed, because a stopped Machine still counts against the org limit. - Cancelling a waiting run takes it out of the queue without creating a Machine. - An unset or empty value means no cap. Anything other than a positive integer is rejected with `Invalid PROPR_FLY_MACHINES_MAX`. - The cap counts only one worker process's Machines in `PROPR_FLY_APP`. It doesn't see other workers or other apps in the org, and the docs say to split the free slots across workers. This differs from `PROPR_SPRITES_MAX`, which workers share through Redis; the Fly runtime has no Redis access today. - There is no wait timeout, unlike Sprites' `PROPR_SPRITES_QUEUE_TIMEOUT`. - The code is in a new file, `packages/core/src/agents/runtime/fly/capacity.ts`. It is read in `fly/config.ts` and applied in `flyMachinesRuntime.ts`. **Docs** - **`agent-runtime.md` (Fly Machines section):** a Free Plan org can have 3 Machines, stopped ones included. The control plane is one, so at most 2 agent runs can run at once, fewer if other apps have Machines. It quotes the exact `HTTP 422: Your organization has reached its machine limit` error and recommends Sprites or `PROPR_FLY_MACHINES_MAX`. A new paragraph covers what the cap does, including that it is per worker process. - **`setup-fly.md`:** a "Fly Machines on the Free Plan" note with the same facts and advice. The Fly Machines setup step now suggests adding `PROPR_FLY_MACHINES_MAX=2` to the environment file. - **`.env.example`:** a commented `PROPR_FLY_MACHINES_MAX=2` entry next to the other Fly settings. **Tests:** the new `test/flyMachinesCapacity.test.ts` has 4 tests: - the setting's parsing. - arrival order, leaving the queue on cancel, and releasing a slot only once. - with a cap of 2, a third run creates its Machine only after one is destroyed. - a stopped waiting run never creates a Machine. With the cap turned off, the third test hangs instead of passing, so it does catch a missing cap. Results: - The new tests plus the existing `flyMachinesRuntime` and `flyRuntimePackages` suites: 43 of 43 pass. They need `PROPR_DEMO_MODE=true`; without it, `flyMachinesRuntime` reports a failure from the GitHub-auth startup check even though all its subtests pass. - The suites that read `.env.example` pass. - Core type-check and lint of the changed files are clean. There are no visual previews because nothing in the UI changed. PR: #3816 Comment by: @integry (ID: 7184736439) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
All seven review items (R1–R7) are fixed. One gap: I couldn't read `/etc/os-release` on a real Sprite, because this container has no Sprites token. Type-check, lint (zero warnings) and the affected suites pass. I haven't triggered the live Sprites and Fly Machines runs or ultrafix. **R1: index per runtime** - **Sprite distro:** I recorded **Ubuntu 26.04 LTS (resolute)** in the docs, with Ubuntu's default sources (`resolute`, `-updates`, `-backports`, `-security`; `main restricted universe multiverse`; amd64). That comes from Fly's July 2026 changelog, not from a live Sprite; Fly's own base-images page still names an older Ubuntu. - **Detection during provisioning:** every new Sprite reports its `/etc/os-release` and apt sources (one-line `.list` and the newer `.sources` format). The worker records them, and later checks use the recorded base. If a new Sprite's base differs from the one the list was checked against, the list is checked again before apt runs. - **Which index:** Fly Machines, and Docker when no daemon is reachable, use the agent image's index. Sprites use the recorded Sprite base. Each index is cached separately. - **Settings validation** checks every runtime in use, and errors name it, e.g. `Sprites (Ubuntu 26.04 LTS (resolute)): Unknown package: postfix`. Docker's image check still runs when Docker is reachable; its errors get a `Docker:` prefix. - **Real archives:** I loaded both actual indexes with the new code. Ubuntu resolute has `libssl3t64` and `python3.14`, and bookworm lacks both. **R2: `cli.github.com`:** the agent image's sources now include GitHub's repo, and `gh=2.106.0` resolves against the real archive. A new test reads `Dockerfile.agent`'s base image and every `deb` line it writes, and fails if the source list drifts from it. **R3: each remote runtime has its own accepted list** - The worker's build job checks the list per remote runtime against that runtime's index. - If the check passes, that runtime accepts the list. If it fails, the runtime keeps its previous list and the record shows the refusal. - Sprites and Fly Machines install only their accepted list, so a change still `pending` changes nothing on them. Warm Sprites are retired only when the Sprites list actually changes. - Package states saved before this change have no per-runtime record; they fall back to the last applied list, never the desired one. - Settings now shows a row per runtime: status, active list, the distro it installs from, and any refusal. **R4:** Sprite installs no longer delete the apt lists, so they stay in the checkpoint. Fly start-time installs still clean them. **R5:** when `ready` follows `installing`, the Fly start gate gets a fresh `bootTimeout`. The new test fails without the fix. **R6:** `appliedBy` is recomputed from the runtimes in use whenever Settings loads or the state changes. **R7:** - Stale warm Sprites are deleted in the background, and shutdown still waits for those deletes. - The worker starts loading the indexes at startup, but only when remote runtimes are in use and packages are configured. - The index now keeps only package names and `name=version` pins. - `getAgentImagePackageIndex` uses `startupStep`. - `setup-fly.md` has the blank line after the Free Plan blockquote. **Live-run prep:** the Sprites variant of `fly-e2e.yml` now configures `figlet` and `libssl3t64`, an Ubuntu-only name that the old Debian check would have refused. It also checks the list the runtime accepted and the package count in the install log. actionlint passes, and I simulated the edited shell steps locally. **Tests:** - New: a suite covering Sprite base detection, the re-check before apt, kept apt lists and background deletes. Added tests for Fly's fresh boot window, per-runtime build outcomes (pending, refused, mixed Docker failure, old saved state), the API's per-runtime errors and state, and the UI rows. - Updated for the new index format: the existing index, remote-settings and API suites. - Re-run and passing: the Sprites pool and runtime, Fly Machines, registry, compute-usage and worker-preparation suites. **For your next steps:** watch for `Detected the Sprite base image package sources` in the worker logs. It is logged only when a new Sprite's sources differ from the recorded ones. The first live Sprite logs it only if its base isn't the documented Ubuntu 26.04 default, so a silent first run means the documented base was right. The preview shows Settings with Sprites accepting `libssl3t64` and Fly Machines refusing it and keeping `figlet`. Its data is mocked. Sources: - [Sprites now run Ubuntu 26.04 LTS (Fly community)](https://community.fly.io/t/sprites-now-run-ubuntu-26-04-lts/28250) - [Fly changelog: Sprites Ubuntu 26.04](https://fly.io/changelog/sprites-ubuntu-26-04.md) - [Sprites base images docs](https://docs.sprites.dev/reference/base-images) PR: #3816 Comment by: @integry (ID: 7200489050) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements start-time package installation on Fly Machines and checkpoint-based installation on Sprites, with capability checks and runtime-specific Settings feedback. It needs changes before merge because inactive runtimes can retain cleared packages, and slow index downloads defeat the documented save-with-warning behavior. ✅ Installation precedes execution — Fly’s wrapper installs before reporting readiness; Sprites install before creating the clean checkpoint. ✅ Safe package arguments — Package specifications pass as positional arguments after validation, rather than being interpolated into shell scripts. ✅ Substantial validation — Tests cover installation failures, stale Sprite replacement, lease renewal, and runtime-specific indexes. The authoritative current-head status reports 35 passed checks and no failures. This review uses static tracing of the supplied code; no commands or tests were run. Neither the derived Fly image nor the concurrency cap is required here. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F19: 🔴 Clearing packages preserves inactive runtime records
F20: 🔴 Index timeout prevents unverified saves
SuggestionsThese are optional follow-ups and are not sent to S16: 🟢 Correct the tutorial’s distribution description
ScoreThe implementation has strong coverage and passing current-head checks, but two localized correctness fixes remain necessary before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit edcbc6f
Summary of ChangesI fixed both findings. The regression tests and the existing runtime-package suites pass (142/142), and core and API typecheck and lint cleanly. Without the fixes, both new tests fail. F19: clearing packages left records for runtimes not in use
F20: a slow index download blocked saving
Separate issue, not fixed (outside F19/F20): the same stale record affects non-empty lists. Apply No previews: nothing visible changed. Review digestRisk-tiered paths
Diff size: 6 files changed, +112/−6 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed both findings. The regression tests and the existing runtime-package suites pass (142/142), and core and API typecheck and lint cleanly. Without the fixes, both new tests fail. **F19: clearing packages left records for runtimes not in use** - When a build clears the list, it now also deletes the stored package list of every remote runtime, including ones no agent uses at the moment (`packages/core/src/agents/runtime/agentRuntimePackages.ts`). A Sprites or Fly Machines run then reads the empty applied list, so re-enabling Sprites installs nothing. - The fix is in the shared clearing step, so it also covers a clear run on a Docker-only worker. That path had the same problem, because it kept the old records untouched. - Regression in `test/agentRuntimePackagesRemoteSettings.test.ts`: apply `jq` on Sprites, switch to Fly Machines and clear. Both runtimes now return an empty list, and Settings shows Sprites as `disabled`. **F20: a slow index download blocked saving** - The index check now takes an optional deadline for the whole call (`packages/core/src/agents/runtime/agentRuntimePackageIndex.ts`). If the index isn't loaded in time, you get the usual "could not verify availability … not loaded within Nms" warning and the list stays valid. The download keeps running in the background, so later checks use it. - Invalid syntax is still refused, and cancelling through the caller's own signal still fails the check. - The Settings routes pass a deadline 15 seconds short of the request timeout (105 s of the default 2 minutes; a quarter less for short timeouts) (`packages/api/routes/agentRuntimeRoutes.ts`). The 2-minute request timeout stays as a backstop. - One related change: hitting a deadline would have skipped the existing fallback to the last good index while a refresh is running. A deadline now still falls back to that index; an explicit cancel doesn't. - Regressions: - In `packages/api/test/agentRuntimeIndexRoutes.test.ts`: an index download that never answers, with a 400 ms request timeout. Save returns 202, the build is queued and the warning is shown; validate returns 200; bad syntax still returns 400. - In `test/agentRuntimePackageIndex.test.ts`: the warning on a stalled download, cancellation, later checks using the finished download, and the fallback to the last good index. **Separate issue, not fixed (outside F19/F20):** the same stale record affects non-empty lists. Apply `jq` on Sprites, switch to Fly Machines, apply `figlet`, then re-enable Sprites: Sprites still install `jq`. A build only checks and updates the runtimes it is using, so it can't validate a new list for the others. Fixing it means deciding whether to drop those records, which changes behaviour on instances where each worker runs a different remote runtime. No previews: nothing visible changed. PR: #3816 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements package installation during Sprite provisioning and every Fly Machine start, consistent with the revised scope. It needs a localized correctness fix before merge. ✅ Installation precedes execution — Sprite installs occur before checkpoint creation; Fly’s launcher installs before reporting readiness and surfaces installation failures. ✅ Focused regression coverage — Added tests cover installation errors, stale Sprite replacement, runtime-specific package indexes, and lease renewal during long provisioning. This review is based on static inspection of the supplied code; no commands were run. Current checks report 30 passed, four pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F21: 🔴 Reactivated runtimes retain obsolete packages
SuggestionsThese are optional follow-ups and are not sent to S17: 🟢 Correct the tutorial’s distribution description
ScoreThe installation paths and targeted tests are substantial, but the persistent stale-profile behavior needs correction. Pending checks alone do not reduce the score. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit d28b5a2
Summary of ChangesF21 is fixed. When a package list is applied, a remote runtime that isn't in use no longer keeps its old record. If you switch to Fly-only, apply What changed
Same defect elsewhere: the build job is the only place these records are written for inactive runtimes. The empty-list path already dropped all records, and the loader and Settings view read the result. I found no other occurrence. Tests (two new ones in
Not covered by a test: this container has no Docker, so the successful Docker-build path is changed but not exercised. There are no previews, since nothing visible changed. Review digestRisk-tiered paths
Diff size: 4 files changed, +60/−4 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
F21 is fixed. When a package list is applied, a remote runtime that isn't in use no longer keeps its old record. If you switch to Fly-only, apply `['figlet']`, then turn Sprites back on, Sprites now install `figlet` instead of the old `jq`. **What changed** - **New helper:** `remoteRecordsForAppliedProfile` in `agentRuntimeRemotePackages.ts` keeps only the records of remote runtimes that took part in the build. - **Where it runs:** `buildAgentRuntimePackageProfile` uses it at both points where a list counts as applied: - a remote-only build whose outcome is `ready`. - a successful Docker build, which on a mixed instance also covers remote runtimes not in use. - **Reactivated runtime:** with no record, its loader falls back to the applied list (`activePackages`). Before the next install, that list is checked against the runtime's own index (`checkAgentRuntimePackagesBeforeInstall`), so a name the Sprite base lacks fails the run rather than bringing back the old list. - **Pending and refused changes are unchanged:** a build that's still pending, refused or failed keeps every record. So a Fly-only list that Fly refuses leaves the Sprites list as it was. - **Docs:** the per-runtime paragraph in `docs/docs/architecture/agent-runtime.md` and the module comment now describe this. **Same defect elsewhere:** the build job is the only place these records are written for inactive runtimes. The empty-list path already dropped all records, and the loader and Settings view read the result. I found no other occurrence. **Tests** (two new ones in `test/agentRuntimePackagesRemoteSettings.test.ts`): - **Reactivation:** Sprites `['jq']`, then a Fly-only apply of `['postgresql-client']`, then Sprites turned back on. Sprites load and show `['postgresql-client']`, and it passes their index check. A Fly-only list missing from the Sprite base (`postfix`) is loaded and then refused by the Sprites install check. - **Kept records:** a refused Fly-only change and a pending change both leave the Sprites list at `['jq']`. - With the helper turned into a no-op, the reactivation test fails; with the fix in place, it passes. - Core typecheck, zero-warning lint on both source files, and the four package suites (32 tests) pass. **Not covered by a test:** this container has no Docker, so the successful Docker-build path is changed but not exercised. There are no previews, since nothing visible changed. PR: #3816 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements runtime packages for Sprites and installation at every Fly Machine start, consistent with the revised scope. It needs a localized state-persistence correction before merge. ✅ Installation ordering — Both remote runtimes install packages before agent execution; Sprites include them in the clean checkpoint. ✅ Useful regression coverage — Added tests exercise install failures, stale Sprite replacement, runtime-specific package validation, and long installation timing. This review is a static analysis of the supplied code; no commands were run. Current checks show no failures, with four pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F22: 🔴 Superseded builds can overwrite newer settings
SuggestionsThese are optional follow-ups and are not sent to S18: 🟢 Correct the tutorial’s package sources
ScoreThe implementation has substantial focused coverage and reported live verification, but the new activation path can discard a newer Settings change. Correct that persistence ordering before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 419a420
Summary of ChangesI fixed F22. A remote-only build that a newer Settings request has superseded can no longer overwrite that request, and the newer request's own build then applies. The new regression tests fail on the previous code and pass on the fix. The fix (
Regression tests (
Checks
Found separately, not changed: these saves already existed on
The gap is small there because nothing is awaited between the check and the save. The same conditional save would close it if you want that done. Nothing in the UI changed, so there are no previews. Review digestRisk-tiered paths
Diff size: 3 files changed, +97/−34 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed F22. A remote-only build that a newer Settings request has superseded can no longer overwrite that request, and the newer request's own build then applies. The new regression tests fail on the previous code and pass on the fix. **The fix** (`agentRuntimePackages.ts`, `agentRuntimeRemotePackages.ts`) - **Conditional save:** a new `saveAgentRuntimePackageStateForBuild` writes the state in one `UPDATE … WHERE json_extract(value,'$.buildId') = ?` statement. If a newer request has replaced the build ID, it writes nothing and returns the newer state. The database is SQLite only, so a single statement is atomic. - **Writes it covers:** - the remote-only outcome (`ready` or `failed`). - the cleared-list (`disabled`) outcome. This path now runs after the awaited usage read and index checks, so it had the same gap. - the remote-record save before a Docker build on a mixed instance. - **Intermediate save removed** for remote-only and cleared-list builds, as the finding asked. The records are saved together with the outcome. The one before a Docker build stays, because the later `ready` step reads the records from storage. - **Old images are only cleaned up after a successful write.** A superseded cleared-list build therefore leaves the newer state's images alone. - **Refactor for lint:** the change pushed the file over the 400-line limit and the function over the complexity limit of 20. I replaced `remoteOnlyBuildOutcome` with `buildOutcomeWithoutDocker`, which builds both no-Docker outcomes. The resulting states are the same as before. Nothing else used the old function. - **One log line changed:** "Agent runtime packages applied by remote runtimes" is now "Agent runtime packages applied without a Docker image build", and it is also logged for cleared lists. **Regression tests** (`test/agentRuntimePackagesRemoteSettings.test.ts`, one for an applied list and one for a cleared list) - Settings request B is written through a second SQLite connection at the exact moment build A issues its outcome write. This is the latest point B can land. - Each test checks that A returns B's state and that B's newer list stays pending. A must activate nothing, and Sprites must keep their previous list. B's build must then apply its list. - Against the previous code both tests fail: A's older build ID replaces B's. **Checks** - `tsc --noEmit` on core passes. - `eslint --max-warnings 0` passes on both changed source files. - 89 of 89 tests pass across `agentRuntimePackagesRemoteSettings`, `agentRuntimePackages`, `agentRuntimePackageVerification`, `agentRuntimePackagesRemote` and `agentRegistryOpenCode`. - The existing mixed-instance test covers the record save before a Docker build. I did not add a separate race test for that path. **Found separately, not changed:** these saves already existed on `main` and use the same read, check, then unconditional save pattern. A Settings request landing in between could still be overwritten: - the first `building` save in `buildAgentRuntimePackageProfile`. - the Docker `ready` and `failed` saves. - the save in `resolveAgentRuntimeImage`. The gap is small there because nothing is awaited between the check and the save. The same conditional save would close it if you want that done. Nothing in the UI changed, so there are no previews. PR: #3816 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
|
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements runtime packages on Sprites and at every Fly Machine start, with runtime-specific availability checks and Settings reporting. The derived-image and Fly concurrency-cap work are correctly outside this review’s scope. The implementation appears merge-ready within scope, conditional on the pending checks completing successfully. This was a static review of the supplied diff and surrounding context; no commands or tests were run. ✅ Install before execution — Fly’s wrapper installs packages before reporting readiness, bounds the installation, and preserves apt’s output tail on failure. Sprites install before creating the clean checkpoint. ✅ Warm Sprite reuse — Package digests distinguish stale slots from reusable checkpoints. Availability checks apply to new installations, while matching warm Sprites remain usable after an archive removes a package or version. ✅ Targeted regression coverage — Added tests exercise runtime-specific indexes, installation failures, prolonged provisioning with lease renewal, and superseded remote-build outcome writes. The supplied current-head status reports no failures, with 17 checks still pending. Historical failures are not treated as current failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S19: 🟢 Align tutorial package-source wordingIn S20: 🟢 Isolate unrelated maintenance changesThe changes to ScoreThe changed paths have substantial targeted coverage and no verified blocker in this static review. Final merge confidence remains conditional on the pending current-head checks. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
The epic (937768d) is merged in, and the Sprite pool now uses one key built from both digests. Nothing has run live; the Sprites and Fly Machines extension runs are still yours to do. The epic merge was already on the branch as e660300, from ProPR's automatic conflict resolution. I checked every conflicted file against your points, and only the pool needed more work. **1. Pool (`spritesProvisioning.ts`, `spritesSlot.ts`)** - Before, the merged code still matched idle Sprites, cap evictions and background replacements on the package-server digest alone. They now all use one key built from the runtime-package digest plus the package-server digest. - R1's behaviour is kept for that key: - the most recently used matching Sprite is reused. - Sprites with other package-server sets stay warm. - at `PROPR_SPRITES_MAX`, the least recently used Sprite with another key is evicted. - a background replacement gets the server set of the Sprite it replaces and the current runtime packages. - When the instance's runtime-package list changes, idle Sprites built with the old list are still deleted straight away, as #3816 does. That list is instance-wide, so those Sprites can't match again. Under strict per-key LRU they would only go when the cap forced them out. Say if you'd rather have that. - New test in `test/spritesPool.test.ts`: runs A (servers), B (none), A, B on one runtime-package list reuse their own two Sprites. After the list changes, run A gets a new Sprite and the old two are deleted. **Fly boot wait (already correct after the merge, unchanged)** - `fly/wrapper.ts` installs runtime packages, then package servers. Both report `installing`, and the agent's boot window opens only after both finish. - The worker runs one state machine (`waitForExit`). It allows extra install time only for the installs a run actually has, and starts a fresh boot window when the Machine reports ready after installing. - Either `install-failed` fails the run with its own error, through `FlyStartInstalls.failure`. Compute usage reports `packageInstallMs` and `packageServerInstallMs` separately. **2. Smoke workflow (`fly-e2e.yml`, already correct, unchanged)** - `EXTENSIONS` has no runtime restriction; only `MCP` requires Sprites. - On Fly Machines the agent app, image and token come from #3816's step. - The same run checks the runtime package (file line 2 plus the install log for the chosen runtime), then the extension lines 3–4. It accepts the "applied to this run" record for that runtime and either the Sprite or the Fly Machine package-server install record. - I couldn't parse the YAML here (no `yaml` module), but I didn't edit the file and it passes its own workflow test, `flyE2eMcpAutomation`. **3.** The URL-server-through-the-forward change (f6085da) is intact. **Checks:** the Sprites pool, Sprites runtime, runtime packages, Fly Machines, Fly runtime packages, create request, the workflow test, extension notice and MCP forward suites all pass. `spritesRuntime` only passes with `PROPR_DEMO_MODE=1`, as before. The core typecheck and lint on the changed source are clean. There are no visual changes, so I made no previews. PR: #3818 Comment by: @integry (ID: 7203509507) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5

AI Implementation Summary
Closes #3807
Branch:
3807/claude-opus-5-5-remote-runtimes-apply-ins-20261126-0040-t2wCommits: ✅ Changes committed (cf0e9d3)
AI Processing Completed
Execution Details:
Summary:
I implemented three of the issue's four items. Sprites now install the configured runtime packages, runtimes that can't apply packages are refused before launch, and the docs cover each runtime. Item 2, building a derived image for Fly Machines, is not done, so Fly runs are refused whenever packages are configured. Type-check, lint, the new tests and the affected runtime/registry suites pass. Nothing was run live: the
psql --versionchecks on a real Sprite and a real Fly Machine still need doing.The refusal (item 3)
supportsRuntimePackagescapability next tosupportsExtensions. Docker and Sprites declaretrueand Fly Machinesfalse. A custom runtime that doesn't declare it is treated as unsupported, as with extensions.runAgentchecks it before launch. If packages are configured and the runtime can't apply them, the run fails withAgentRuntimeCapabilityError(capabilityruntime_packages). The message lists the packages and points to a supporting runtime, removing the packages in Settings, or.propr/setup.sh.agentRuntimePackageProfile.ts, which doesn't depend on Docker.agentRuntimePackages.tsre-exports what it used before.Sprites (item 1)
apt-getaftersprites-agent-setup.shand before the clean checkpoint. It uses the same flags as the Docker build, and package names are passed as arguments, never pasted into the shell script.Docs (item 4):
agent-runtime.mdhas a new "Runtime Packages" section with a per-runtime table and.propr/setup.shas the per-repository alternative. The Fly tutorial has a matching note.Tests: the new file
test/agentRuntimePackagesRemote.test.ts(7 tests) covers:Two existing suites,
agentRuntimeRegistryandagentRunComputeUsage, hung after the change: their fake runtimes now trigger the package read, which opens the test database. I addedafter(closeConnection)to both, asspritesRuntime.test.tsalready does.Still open:
true.failedeven though Sprites install the packages. This predates the change, and I haven't run it.There are no visual previews because nothing in the UI changed.
Review digest
Risk-tiered paths
packages/core/src/agents/runtime/agentRuntimePackageProfile.ts(added, +79/−0)packages/core/src/agents/runtime/agentRuntimePackages.ts(+9/−30)packages/core/src/agents/runtime/dockerRuntime.ts(+1/−0)packages/core/src/agents/runtime/flyMachinesRuntime.ts(+1/−1)packages/core/src/agents/runtime/registry.ts(+31/−2)packages/core/src/agents/runtime/sprites/spritesProvisioning.ts(+53/−10)packages/core/src/agents/runtime/spritesRuntime.ts(+7/−4)packages/core/src/agents/runtime/types.ts(+6/−0)packages/core/src/index.ts(+1/−1)docs/docs/architecture/agent-runtime.md(+14/−2)docs/docs/tutorials/setup-fly.md(+2/−0)test/agentRunComputeUsage.test.ts(+4/−1)test/agentRuntimePackagesRemote.test.ts(added, +134/−0)test/agentRuntimeRegistry.test.ts(+4/−1)Diff size: 14 files changed, +346/−52 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3807.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Live verification on Fly
Both runs:
propr deploy fly, idle stop, then wake via the labeled issue (webhookRecovery.redelivered=1).figletis absent fromDockerfile.agent; the agent's file line 2 wasFIGlet Copyright (C) 1991-2012 Glenn Chappell, Ian Chai, John Cowan,. Clean teardown each time: no apps, branches, PRs or issues left.Installed agent runtime packages on Sprite: packagesDigest=eaeead723146fff2 packageCount=1 installMs=7443compute_runtime: spritesInstalled agent runtime packages at Fly Machine start: packagesDigest=eaeead723146fff2 packageCount=1 installMs=3990compute_runtime: fly-machines(separate agent app, attenuated 2 h token)An earlier Fly Machines run failed with
HTTP 422: Your organization has reached its machine limit. The F1 error message surfaced it: the org was at the Free Plan's 3 Machines, and stopped Machines count.Derived-image path (Fly Machines), after R0: https://github.com/integry/propr/actions/runs/45830138638 on 56d79e2 ✅
Installed agent runtime packages in a derived Fly Machine image: packagesDigest=eaeead723146fff2 packageCount=1 installMs=2842FIGlet Copyright (C) 1991-2012 ….compute_runtime: fly-machines, clean teardown.figlet: command not found. The live run caught it, and the publish-time check now refuses such a layer.After the split (derived Fly image moved to #3821), ec956c8
Installed agent runtime packages on Sprite: … packageCount=1 installMs=5191Installed agent runtime packages at Fly Machine start: … packageCount=1 installMs=4074On both, the agent's file line 2 was the figlet banner,
webhookRecovery.redelivered=1, and teardown was clean. The earlier SpritesSprite lease expired(actually a swallowed provisioning error, fixed in 25b5fdf) didn't recur. The derived-image results above are kept for #3821.After my review fixes (R1–R7), e6741f9
Accepted for Ubuntu 26.04 LTS (resolute): figlet libssl3t64(libssl3t64exists only in Ubuntu),Installed agent runtime packages on Sprite: packageCount=2 installMs=4493, and line 2 was the figlet banner.Final head 419a420 (after F19–F22): Sprites https://github.com/integry/propr/actions/runs/45892690062 ✅ and Fly Machines https://github.com/integry/propr/actions/runs/45894502589 ✅. Review 8/10 with no blockers, CI clean.