Repository navigation
Fly workers choose their CPU kind, performance by default; AGENTS.md no longer published; release 0.8.0 - #39
Merged
Merged
Conversation
cpuKind ('performance' or 'shared') is accepted by adapter.preflight, adapter.provision and a managed fleet worker's provisionInput. The bundled bridge applies it at creation and at bootstrap, the journal and receipts record it. Memory follows the kind within Fly's limits for two CPUs: performance 4096-16384 MB in steps of 2048 (4096 when omitted), shared 1024-4096 MB in steps of 256 (2048 when omitted). A size outside the range is refused before anything is created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38.
Cost change, please read first: a managed Fly worker that does not choose now gets two performance CPUs with 4096 MB instead of two shared CPUs with 2048 MB. While it runs, that costs about five times as much (Fly lists $66.00 against $13.39 a month, November 2026). Pass
cpuKind: 'shared'to keep the old size and price. A call that setsmemoryMb: 2048withoutcpuKind: 'shared'is now refused, because Fly does not accept that size on performance CPUs.What changes
One setting,
cpuKind('performance'or'shared'), onadapter.preflight(...),adapter.provision(...)and a managed fleet worker'sprovisionInput:deploy/managed-cloud/lib/bridge.mjs) applies the kind when the machine is created and again at bootstrap. The journal, the local records and the receipts carry it.MANAGED_CLOUD_INPUT_INVALID); a refusal by the service would reach the caller without a reason.scripts/cloud-pilot.mjsasks forcpuKind: 'shared', so the pilot keeps its size and price.provenance.jsonlists the local changes to the bundledflujo-cloudfiles with their new sizes and SHA256 values. The manifest hash inDockerfile.factory,deploy/factory-service.broker.mdandtest/capacity-service.test.mjsis recomputed from the files.PUBLIC_SDK.mddescribes the setting, the sizes and the price difference.package.json,package-lock.json).Not changed: cloud lite fleets. Their plan already has
cpuKind(shared by default) besidecpusandmemoryMb.Known limit: the SDK passes
cpuKindon to whateverflujo-cloudmodule it is given. The publishedflujo-cloud(0.2.0) still creates shared CPUs, so with that module the setting has no effect yet; a receipt withoutcpuKindshows that. The bundled bridge in the FACTORY image applies it.AGENTS.mdis removed from the repository. It holds working rules for one machine and stays there as a local file.Tests
test/fly-cpu.test.mjs: invalid kinds, the memory range of each kind, the default size of each kind, the SDK refusing a misfit size before the service is called, and a full synthetic provision for default, performance and shared that checks the machine configuration at creation and at bootstrap plus the journal.test/managed-cloud.test.mjsandtest/managed-fleet-real-module.test.mjscover the default and the shared kind through the adapter and the real ManagedCloud module.test/fly-cpu.test.mjs,test/managed-cloud.test.mjsandtest/managed-cloud-source.test.mjs.Local CI before GitHub
The steps of
.github/workflows/public-sdk.yml, run on commit6e5eff6from a clean source snapshot (git archive) with a cleannpm ci:tar.exeahead of Git's)node:22.17.0-bookworm-slimcontainer, non-root usernode:24.22.1-bookworm-slimcontainer, non-root userEach run:
npm cinpm audit --omit=dev --audit-level=high: passes; it reports 2 moderate findings, which are the same onmain(no dependency changed).node scripts/test-temp-guard.mjs <focused list from the workflow>: 287 tests, 287 pass, nothing left in the temp location.python -B -m unittest discover -s selfhost/modal -p "test_*.py": 11 tests pass.npm pack, a fresh install offlujo-factory-0.8.0.tgzinto an empty folder,scripts/verify-public-sdk.mjs,--helpoffactory-public,factory-liteandfactory-evidence,factory-selfhost profiles, and the installed MCP stdio test: pass.node scripts/test-temp-guard.mjs test/generic-swarm-evidence.test.mjs: 7 tests pass.test/capacity-service.test.mjspasses with the new hashes.The slim Linux images got
python3andgitfrom Debian inside the container first, as the GitHub runner has both. The Linux container is Debian 12, not the runner's Ubuntu image.