Repository navigation
[3785 by Claude Opus 5.5] propr deploy fly: fit the Fly Free plan (legacy Docker on a persistent rootfs, 5 GB volume preflight) - #3787
Conversation
I've implemented #3785: `propr deploy fly --legacy-docker` should now fit the Fly Free plan. The 112 deploy-fly tests pass and both typechecks are clean. Nothing has run against a real Fly org yet. That includes the Free-plan check, which could misread the plan (see below). 1. Docker images on a persistent root filesystem - In legacy mode the Machine gets `rootfs: { size_gb, persist: true }`. The size comes from a new `--rootfs-size` option: default 20 GB, minimum 10, and it only works with `--legacy-docker`. Both the Machines API path and the flyctl path send it. - The Docker disk image moves off the volume to `/var/lib/propr-docker/docker.ext4` on the root filesystem. It is the root filesystem size minus 4 GB, left for the Machine's own container images. The loop mount (so the storage driver is overlay2) and the stale PID cleanup work as before. - The volume now defaults to 1 GB in legacy mode too, and the old "volume must be 10 GB or more" rule is gone. - Existing deployments: on its first boot after a redeploy, the new script deletes the old `/usr/src/app/data/docker.ext4` from the volume. Agent images get downloaded again once, and the volume keeps its old size because Fly volumes can't shrink. - Memory change (not asked for in the issue): legacy mode now accepts `--memory 1024`, following the issue's note that 1 GB is enough. The default stays at 2048 MB, because agent containers need room on top of dockerd. Say if you'd rather keep the 2 GB minimum. 2. Free-plan volume check - If `--volume-size` is over 5 GB, the deploy asks Fly for the org's plan before creating anything. If the org is on the Free plan, it stops with "the Free plan caps volumes at 5 GB… Nothing was created. Rerun without --volume-size (default: 1 GB…)". - It reads the plan from Fly's GraphQL API (the `paidPlan` field on the organization). I'm assuming that field identifies the Free plan; it's worth checking against a Free-plan org. - With flyctl, it uses the token from `fly auth token`; without flyctl, it uses the Machines API token. If the plan can't be read, the deploy logs that and carries on. - `--dry-run` makes no call to Fly. If the volume is over 5 GB, it prints a note that a real run will check the plan. 3. Plan output, `--dry-run` included I ran a real dry run. With `--legacy-docker` the summary now shows: ``` Machine: shared-cpu-1x, 2048 MB, iad; volume propr_data (1 GB) Root fs: 20 GB, persistent (Docker images; SQLite and Redis stay on the volume) Root fs cost: $3.00/month while the Machine is stopped ($0.15/GB-month) ``` 4. Docs - `deploy-fly.md` has a new "Fly Free plan" section listing what fits: 1 GB Machine, 1 GB volume, Sprites agents, opt-in idle shutdown, and legacy Docker on the root filesystem. I also updated the legacy mode, cost, preflight, dry-run and options sections. - The changelog and `propr-cli.md` are updated, and so is the CLI help text. Tests: new or updated unit tests cover: - the root filesystem fields in legacy Machine configs, and their absence otherwise - the 1 GB default volume and the `--rootfs-size` checks - Docker disk sizing taken from the root filesystem rather than the volume - the old-image cleanup - the cost line - the Free-plan check for both backends: free plan refused before anything is created, paid or unknown goes ahead, volumes of 5 GB or less skip the lookup The new plan lookup lives in `packages/cli/src/commands/deploy/flyOrgPlan.ts`, with its tests in `flyOrgPlan.test.ts`. This is a CLI-only change, so I didn't make any visual previews. ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=10 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR moves legacy Docker storage off the Fly volume, adds root filesystem sizing, and introduces an early volume-plan check. It needs a localized correction before merge: redeploy validation can check the wrong organization. ✅ Consistent configuration — Both deployment backends receive the same persistent root filesystem settings through the shared configuration builder. ✅ Focused coverage — Added tests cover default volume sizing, root filesystem options, and refusal before resource creation when the selected organization is Free-plan. This review used static analysis of the supplied code only; no commands were run. The authoritative checks report 30 passed, four pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Check the existing app’s organization
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Validate the external plan contractThe new tests supply boolean S2: 🟢 Exercise persistence on FlyA deployment smoke test covering initial boot, restart, and root filesystem growth would strengthen confidence in the storage move. Current tests verify generated configuration and filesystem operations, but do not establish Fly’s handling of persistence in this multi-container layout. No platform incompatibility is established by the supplied evidence. ScoreThe implementation is focused and has useful unit coverage, but the organization-selection regression needs correction. Pending checks alone do not lower 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 068b46c
Summary of ChangesI fixed F1. When How it works
Tests and docs
The change is mainly in Review digestRisk-tiered paths
Diff size: 8 files changed, +200/−12 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed F1. When `--volume-size` is over 5 GB, the Free-plan check now reads the plan of the org that owns an existing app. `--org` is used only when the app doesn't exist yet. So redeploying an app that lives in a paid org is no longer refused because `--org` names a Free-plan org. The reverse case is caught too: an existing app in a Free-plan org is refused even when `--org` is paid, and the error names the org that owns it. All 117 deploy-fly tests pass and both typechecks are clean. As with the original change, nothing has run against a real Fly org.
**How it works**
- Both targets have a new read-only `appOwner(app)` lookup. The preflight calls it before the plan lookup and before anything is created.
- With flyctl, the owner comes from `Organization.Slug` in `apps list --json`, in either letter case. With the Machines API, it comes from `organization.slug` in `GET /apps/{app}`, and a 404 means the app doesn't exist.
- If an app exists but Fly doesn't say which org owns it, the deploy logs that and goes on. It does not fall back to checking `--org`, which would bring the same bug back. This matches the existing rule that an unreadable plan never blocks a deploy.
- I'm assuming the JSON field names above from the flyctl and Machines API response formats. They haven't been checked against a live account.
- The lookup and `ensureApp` each check whether the app exists, so it is read twice, but only when the volume is over 5 GB. Another tool could create or delete the app in between, a gap common to all API-driven tools. It can't be closed from the client.
**Tests and docs**
- New runner tests cover three cases with fake targets: an existing app in a paid org deploys, one in a Free-plan org is refused, and a new app is checked against `--org`. Another test covers an existing app whose owner can't be read.
- End-to-end tests run both targets through `runFlyDeploy` and check which org's plan is read and that nothing is created before the refusal. There is also a parsing test for the Machines API lookup.
- To make sure the tests catch the bug, I put the old behaviour back (always checking `--org`): the four new runner tests then fail.
- I updated the preflight paragraph in `deploy-fly.md` and the `CHANGELOG.md` entry to say which org is checked.
The change is mainly in `preflightFlyPlan` in `packages/cli/src/commands/deploy/flyDeployRunner.ts`. I found nothing else outside F1 worth reporting. It's a CLI-only change, so there are no visual previews.
PR: #3787
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 moves legacy Docker storage onto a persistent root filesystem, reduces the default data volume to 1 GB, and adds an organization-plan preflight. The implementation is coherent, but a material verification gap remains around the external Fly contracts. ✅ Correct organization selection — The preflight checks an existing app’s owning organization and uses ✅ Consistent configuration — Both configuration builders emit the same persistent-rootfs fields, and Docker disk sizing is independent of the data volume. ✅ Focused regression coverage — Tests cover defaults, option validation, preflight ordering, unknown-plan fallback, and preservation of larger existing volumes. This was a static review of the supplied code; no commands were run. The authoritative checks show 31 passed, three pending, and no failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Verify Fly contracts independentlyThe S4: 🟢 Explain small-rootfs build limitationsThe accepted ScoreThe changed paths and tests are consistent, with no verified code blocker. Independent verification of the Fly plan and persistence contracts remains a material gap before confidently calling the deployment behavior merge-ready. Score: 7/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
|
|
/ultrafix goal=8 max=6 I verified this PR live on a real Fly Free-plan org (flyctl v0.5.16, region ams, app propr-deploy-test). Results: WORKS:
MERGE BLOCKERS (fix both and add tests):
Keep changes scoped to legacy-docker deploy config, docs and tests. |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 6) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationNot ready to merge: the new ✅ Correct organization selection — The preflight checks an existing app’s owning organization, with coverage for both backends. ✅ Storage sizing separated — Both configuration builders size Docker storage from ✅ Live preflight confirmation — Your reported Free-plan test confirms oversized volumes are refused before Fly resources change. Current-head checks report 35 passed, none failed or pending, and 19 skipped/neutral. This review uses the supplied code and live results; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F2: 🔴 Emit the supported persistence string
SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Resolve the existing shared-volume failureYour live results establish that the S6: 🟢 Explain practical rootfs sizingThe documentation permits a 10 GB rootfs, which yields only 6 GiB for Docker through ScoreThe implementation has useful coverage and passing checks, but the newly introduced configuration type error blocks real deployment. The correction is localized; the independently reported shared-volume failure also needs follow-up before claiming successful live operation. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit ed60eda
Summary of ChangesI fixed F2: legacy Machine configs now send The fix
Tests
Docs
Not done in this run: this run was limited to F2, so your other two requests are untouched:
Ask for those findings by ID and I'll do them next. Review digestRisk-tiered paths
Diff size: 6 files changed, +43/−10 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed F2: legacy Machine configs now send `rootfs.persist` as the string `"always"` instead of `true`. All 118 deploy-fly tests pass and both typechecks are clean. Nothing has been run against real Fly; your redeploy is the live check.
**The fix**
- `flyMachineConfig.ts` now holds the value in one constant, `LEGACY_DOCKER_ROOTFS_PERSIST = "always"`. A comment there notes Fly's three accepted strings (`never`, `always`, `restart`) and the flyctl error a boolean causes.
- Both deploy paths build their config from this one helper, so both now send the string:
- **flyctl:** the value is written into `propr-machine.json`.
- **Machines API:** it goes into both the create and update calls. The client passes the config through unchanged.
**Tests**
- The tests that asserted `persist: true` in `flyMachineConfig.test.ts` and `flyDeployRunner.test.ts` now require `"always"`.
- New: the flyctl deploy test reads the `propr-machine.json` it wrote and checks `rootfs` is `{ size_gb: 20, persist: "always" }`.
- New: a Machines API test updates an existing legacy Machine and checks that the update payload sends `persist` as a string. Until now only the create call was checked.
**Docs**
- `deploy-fly.md`, `CHANGELOG.md` and the comments in `flyLegacyDocker.ts` now say `rootfs.persist: "always"`.
- The comment change in `flyLegacyDocker.ts` also lands in the generated startup script, as a shell comment only.
**Not done in this run:** this run was limited to F2, so your other two requests are untouched:
- **Item 2, the Docker sidecar crash-loop:** the shared `temp_dir` volume still doesn't mount on a real multi-container Machine, so the app still won't become healthy. The PR still needs a working layout, either the localhost TCP socket or the socket on the persistent rootfs. It stays a merge blocker.
- **Item 3, the S4 sizing advice:** the docs still don't say that the smallest accepted root filesystem leaves less than the 12 GiB build reserve.
Ask for those findings by ID and I'll do them next.
PR: #3787
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 moves legacy Docker storage off the data volume and adds an organization-aware volume preflight. It needs changes before merge: the string persistence fix is complete, but the requested shared-volume correction and rootfs sizing guidance remain missing. ✅ Correct persistence encoding — Both configuration paths emit ✅ Correct organization selection — The preflight checks an existing app’s owning organization instead of blindly using The supplied current-head status shows 30 passed checks, four pending, and no failures. This review uses the supplied code and live-test report; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Requested shared-volume fix remains undelivered
F4: 🔴 Rootfs sizing recommendation is missing
SuggestionsThese are optional follow-ups and are not sent to S7: 🟢 Refresh volume-sizing commentsComments in ScoreThe persistence and preflight changes are well covered, but two explicit follow-up requirements remain unresolved, including the reported deployment startup failure. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 5086d37
Summary of ChangesI've moved the directory the app and Docker containers share off the F3: shared directory
F4: rootfs sizing
The recommendation is 20 GB or more, sized as 4 GB headroom + 12 GB build reserve + about 4 GB for each agent image you want to keep. What your redeploy needs to confirm:
A guess I couldn't check: the Sources: Review digestRisk-tiered paths
Diff size: 6 files changed, +120/−27 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I've moved the directory the app and Docker containers share off the `temp_dir` volume and onto the Fly volume, and added the rootfs sizing advice to the docs (F3 and F4). The 121 deploy-fly tests pass and the typecheck is clean, but none of this has run on real Fly yet. The `persist: "always"` fix was already on the branch from the previous commit, so I didn't touch it. **F3: shared directory** - **Why the Fly volume:** Fly's multi-container guide doesn't describe sharing a `temp_dir` volume between containers. A Fly community thread from Oct 2025 reports that the Machine's own volume shows up at the same path in every container. Our Redis container already depends on that: it writes its append-only file to the volume without mounting it itself. - **What changed:** - Clones, worktrees and egress sockets now live under `/usr/src/app/data/propr-shared` on the volume (`flyLegacyDocker.ts`). - Both deploy paths drop the Machine `volumes`/`temp_dir` entry and the mounts on the `app` and `docker` containers. - The app keeps reaching `dockerd` at `tcp://127.0.0.1:2375`. That gives it the socket, but agent containers bind-mount worktrees by path, so the files must be visible to both containers too. - **New boot check:** if the volume isn't mounted in the `docker` container, it exits with "the Fly volume is not mounted at /usr/src/app/data in the docker container". Without this, it would create the folders on its own disk and agents would silently get empty folders. - **Cost of this layout:** clones and worktrees now take space on the volume, which defaults to 1 GB. The docs suggest raising `--volume-size` (up to 5 GB fits the Free plan) for larger repositories or several tasks at once. - **Tests:** - Neither deploy path emits `volumes` or any container mounts. - Every shared path sits under the volume mount, and the worker and the daemon see the egress folder at the same path. - The boot check really runs and exits 1 when the volume is missing. **F4: rootfs sizing** `deploy-fly.md` now has a sizing table, and the options table and changelog repeat the advice. The Docker filesystem gets the root filesystem minus 4 GB, and an agent image build needs 12 GiB free on it: | `--rootfs-size` | Room left for kept images | | --- | --- | | 10 (the minimum) | none, so agent image builds are refused | | 20 (the default) | about 4 GB, roughly one agent image | | 30 | about 14 GB, several agent images | The recommendation is 20 GB or more, sized as 4 GB headroom + 12 GB build reserve + about 4 GB for each agent image you want to keep. **What your redeploy needs to confirm:** 1. The `docker` container sees the volume at `/usr/src/app/data`, so the boot check passes and `dockerd` turns healthy. If the check fails, that error means the volume isn't visible in that container, which would rule out this layout. 2. An agent container can bind-mount a worktree from `/usr/src/app/data/propr-shared/git-processor/worktrees/...` and see its files. 3. Agents in restricted network mode can reach the egress socket under `/usr/src/app/data/propr-shared/egress`. 4. With `rootfs.persist: "always"` and `size_gb` set, the ext4 image mounts and `docker info` reports `overlay2`. 5. A Machine deployed with the old `propr_shared` layout gets updated cleanly, since the new config no longer includes `volumes`. A guess I couldn't check: the `/upper/dev/vdb` path in the error hints that `temp_dir` breaks when a rootfs size is set. You saw it fail without `persist` too; I'm not sure whether that test also dropped `size_gb`. Sources: - [Fly multi-container Machines docs](https://docs.fly.io/machines/guides-examples/multi-container-machines) - [Fly community: Multi-Container Machine Mounts](https://community.fly.io/t/multi-container-machine-mounts/25838) and [page 2](https://community.fly.io/t/multi-container-machine-mounts/25838?page=2) PR: #3787 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 addresses the reported configuration failures and documents rootfs sizing. No verified code blocker remains in the supplied diff, but the replacement shared-directory layout needs live confirmation before I would call it merge-ready. ✅ Consistent persistence configuration — Both configuration builders emit ✅ Correct organization selection — Volume preflight checks an existing app’s owning organization, with coverage for both backends and unknown ownership. ✅ Explicit sizing guidance — Documentation explains why the accepted 10 GB rootfs cannot satisfy the 12 GiB build reserve and recommends 20 GB or more. This was a static review of the supplied code; no commands were run. Current checks report 30 passed, four pending, and no failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S8: 🟢 Confirm shared paths on FlyThe new layout in S9: 🟢 Update stale storage commentsComments in ScoreThe implementation addresses the reported failures with focused regression coverage and no verified remaining code defect. Live verification of the replacement sharing layout remains a material gap; pending checks alone do not lower the score. Score: 7/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
|
Live verification on the Fly Free plan at
|
| Check | Result |
|---|---|
Free-plan preflight (--volume-size 20) |
✅ refused before anything was created; volume list unchanged |
| Plan | ✅ 2 GB shared-cpu-1x, 1 GB volume, 20 GB rootfs, persist: "always", cost line $3.00/month while stopped |
| Fresh deploy | ✅ Machine created; docker container healthy; app /health 200 |
| dockerd | ✅ storage-driver=overlay2, API listen on 127.0.0.1:2375; app has DOCKER_HOST=tcp://127.0.0.1:2375 |
| Agent-style bind mount (S8) | ✅ the app wrote data/worktrees/e2e/probe.txt; docker run -v …/worktrees/e2e:/w alpine read it and wrote back.txt; the app read that back |
| Rootfs persistence across stop and start (S3) | ✅ Machine events: stopped exit_code=0 requested_stop=true, then start by proxy (HTTP wake). After the restart, alpine:3.20 and uv:0.8.17 were still in docker images, the driver was still overlay2, and back.txt was still present |
Remaining finding: redeploy keeps keys removed from machine_config (follow-up, not blocking)
Redeploying this layout over a Machine created with the earlier temp_dir layout left the old top-level volumes: [{name: propr_shared, temp_dir…}] and the per-container mounts on the Machine. flyctl deploy merges machine_config into the existing config and does not drop keys that are missing. So the sidecar kept crash-looping with cannot stat /upper/dev/vdb/propr_shared. A fresh Machine works.
No real deployment has the old layout (it never ran on Fly), so this does not block this PR. But the next layout change will hit the same problem. Proposed follow-up: on redeploy, compare the live Machine config with the plan and explicitly clear stale volumes and container mounts. If flyctl will not clear them, replace the Machine, keeping the volume. Cover this with a redeploy test.
|
/review Re-review with the live Fly verification taken into account. It is posted in #3787 (comment): the preflight, rootfs persist "always", overlay2 on 127.0.0.1:2375, an agent bind mount of an app-created worktree, and images surviving a real stop and proxy wake all passed on a Free-plan org. The redeploy stale-key issue is tracked as a follow-up and does not block this PR. |
|
✅ Applied the requested follow-up changes in commit d5948e3 Summary of ChangesA flyctl redeploy now removes the Why the keys stayed. I read the flyctl v0.5.16 source. What changed
Tests: the new redeploy test is
I updated one existing test because the flyctl file now contains To confirm on Fly, redeploy over a Machine created with the temp_dir layout. Then check that Review digestRisk-tiered paths
Diff size: 8 files changed, +414/−23 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
A flyctl redeploy now removes the `volumes` and container `mounts` that the temp_dir layout left on the Machine. If any survive, it replaces the Machine and keeps the data volume. This is tested only against a fake flyctl so far, not real Fly. **Why the keys stayed.** I read the flyctl v0.5.16 source. `fly deploy` reads `propr-machine.json` into a copy of the live Machine config. Keys the file leaves out keep their old values. Each container in the file is merged into the live container at the same position, which is why the old `mounts` survived. An explicit `[]` in the file does clear a key. **What changed** - **Explicit clearing:** `propr-machine.json` now sends `"volumes": []` and `"mounts": []` on every container. On a fresh Machine these empty lists change nothing. - **Check before deploying:** the deploy reads the control-plane Machine with `fly machine list --json`. It compares that with the plan (`flyStaleMachineConfig.ts`) and logs any stale keys it is about to clear. - **Check after deploying:** it reads the Machine again. If stale keys remain, it: 1. runs `fly machine destroy <id> --force`. 2. polls `fly volumes list` for up to 2 minutes until the data volume is no longer attached to that Machine. 3. runs `fly deploy` again, so flyctl attaches the existing volume to the new Machine instead of creating an empty one. If the volume never detaches, it stops before a second deploy. If stale keys are still there after replacement, it stops with an error. - **Machines API backend:** unchanged. It already sends the whole config on update, not a merge. - **Docs:** a changelog entry and a new troubleshooting item in `deploy-fly.md`. **Tests:** the new redeploy test is `flyStaleMachineConfig.test.ts`. Its fake flyctl merges config the way flyctl does, starting from a Machine with the exact temp_dir layout. It covers: - clearing the stale keys in place. - a flyctl that ignores `[]`, which leads to destroy, waiting for the volume, and redeploying on the same volume. - a volume that never detaches. - no replacement for a fresh Machine or one already on the current layout. - a negative check that the merge without `[]` does leave all three stale keys. I updated one existing test because the flyctl file now contains `[]` where it used to leave the keys out. All 128 deploy tests pass and both typechecks are clean. To confirm on Fly, redeploy over a Machine created with the temp_dir layout. Then check that `fly machine status <id> --display-config` no longer shows `volumes` or container `mounts`, and that the `docker` container starts. PR: #3787 Comment by: @integry (ID: 7132656603) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements the Free-plan storage change coherently. It is merge-ready within the reviewed scope, conditional on pending checks completing successfully. ✅ Live deployment evidence — The supplied verification confirms Free-plan refusal before resource creation, ✅ Consistent backend configuration — Both deployment paths receive the persistent rootfs configuration, with tests covering creation and Machines API updates. ✅ Correct organization selection — Oversized-volume preflight checks an existing app’s owning organization rather than blindly using This review is based on the supplied diff, surrounding code, and reported live results; I ran no commands. Current checks show zero failures, 21 pending, five passed, and ten neutral/skipped. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S10: 🟢 Exercise failed redeploy recoveryKeep the stale-key issue in the explicitly deferred follow-up. In S11: 🟢 Warn about undersized rootfsConsider a CLI warning when the accepted ScoreThe supplied live verification closes the central deployment and persistence gaps, and the changed paths have substantial regression coverage. Pending checks should complete before merge; the deferred redeploy follow-up does not block this assessment. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
Live check of |
AI Implementation Summary
Closes #3785
Branch:
3785/claude-opus-5-5-propr-deploy-fly-fit-the--20261124-1107-3voCommits: ✅ Changes committed (0b0ad16)
AI Processing Completed
Execution Details:
Summary:
I've implemented #3785:
propr deploy fly --legacy-dockershould now fit the Fly Free plan. The 112 deploy-fly tests pass and both typechecks are clean. Nothing has run against a real Fly org yet. That includes the Free-plan check, which could misread the plan (see below).1. Docker images on a persistent root filesystem
rootfs: { size_gb, persist: true }. The size comes from a new--rootfs-sizeoption: default 20 GB, minimum 10, and it only works with--legacy-docker. Both the Machines API path and the flyctl path send it./var/lib/propr-docker/docker.ext4on the root filesystem. It is the root filesystem size minus 4 GB, left for the Machine's own container images. The loop mount (so the storage driver is overlay2) and the stale PID cleanup work as before./usr/src/app/data/docker.ext4from the volume. Agent images get downloaded again once, and the volume keeps its old size because Fly volumes can't shrink.--memory 1024, following the issue's note that 1 GB is enough. The default stays at 2048 MB, because agent containers need room on top of dockerd. Say if you'd rather keep the 2 GB minimum.2. Free-plan volume check
--volume-sizeis over 5 GB, the deploy asks Fly for the org's plan before creating anything. If the org is on the Free plan, it stops with "the Free plan caps volumes at 5 GB… Nothing was created. Rerun without --volume-size (default: 1 GB…)".paidPlanfield on the organization). I'm assuming that field identifies the Free plan; it's worth checking against a Free-plan org.fly auth token; without flyctl, it uses the Machines API token. If the plan can't be read, the deploy logs that and carries on.--dry-runmakes no call to Fly. If the volume is over 5 GB, it prints a note that a real run will check the plan.3. Plan output,
--dry-runincludedI ran a real dry run. With
--legacy-dockerthe summary now shows:4. Docs
deploy-fly.mdhas a new "Fly Free plan" section listing what fits: 1 GB Machine, 1 GB volume, Sprites agents, opt-in idle shutdown, and legacy Docker on the root filesystem. I also updated the legacy mode, cost, preflight, dry-run and options sections.propr-cli.mdare updated, and so is the CLI help text.Tests: new or updated unit tests cover:
--rootfs-sizechecksThe new plan lookup lives in
packages/cli/src/commands/deploy/flyOrgPlan.ts, with its tests inflyOrgPlan.test.ts.This is a CLI-only change, so I didn't make any visual previews.
Review digest
Risk-tiered paths
packages/cli/src/commands/deploy/flyDeployRunner.ts(+30/−2)packages/cli/src/commands/deploy/flyLegacyDocker.ts(+37/−10)packages/cli/src/commands/deploy/flyMachineConfig.ts(+26/−5)packages/cli/src/commands/deploy/flyMachinesApi.ts(+7/−0)packages/cli/src/commands/deploy/flyOrgPlan.ts(added, +64/−0)packages/cli/src/commands/deploy/flyctlBackend.ts(+8/−0)packages/cli/src/commands/deployFly.ts(+44/−9)CHANGELOG.md(+11/−1)docs/docs/features/propr-cli.md(+1/−1)docs/docs/operations/deploy-fly.md(+23/−6)packages/cli/src/commands/deploy/flyDeployRunner.test.ts(+60/−8)packages/cli/src/commands/deploy/flyLegacyDocker.test.ts(+11/−4)packages/cli/src/commands/deploy/flyMachineConfig.test.ts(+19/−0)packages/cli/src/commands/deploy/flyOrgPlan.test.ts(added, +45/−0)packages/cli/src/commands/deploy/flyRedeploy.test.ts(+1/−0)packages/cli/src/commands/deployFly.test.ts(+21/−5)Diff size: 16 files changed, +408/−51 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3785.
💡 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!