Repository navigation
Rent from a Lambda account with one setting - #47
Conversation
A [cloud.lambda] table with an API key file is now a complete cloud peer. The broker takes a catalog besides configured offers: the Lambda catalog lists the account's instance types with capacity every two minutes and before each lease, and turns each into an offer whose GPUs, CPUs, architecture and price come from Lambda. max_price_per_hour and instance_types narrow it. Each lease keeps the provider of the offer it was made from, so a lease outlives its offer leaving the catalog. A cloud peer no longer has to be a Linux build of the machine's architecture: without errand_binary it installs itself when it is, and otherwise downloads its version's release for the machine once, checked against the release's checksums. Development builds still need errand_binary. docs/CLOUD.md leads with the three-step Lambda setup. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60f9589bfb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… request max_price_per_hour in [cloud.lambda] now defaults to 10, enough for every single-GPU type Lambda lists and not for a sold-out type to become an eight-GPU box; 0 lifts the cap. Dearer types stay in the catalog as unavailable: they are not advertised or rented, and a request only one of them would serve is refused with its price and the setting to raise. One catalog listing runs at a time, so a listing that started earlier can no longer land after a newer one. TestLeasesEndWithoutSubmit waits for the lease before each one to finish releasing, since a releasing lease still counts toward max_leases. An opt-in test lists a real account when ERRAND_LAMBDA_API_KEY_FILE is set, and checked every type Lambda lists today. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd53aa08ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…an match - The cap on a Lambda machine's price is checked again against the price Lambda lists right before launching, so a price rise or a stale listing cannot launch above max_price_per_hour. - With file systems, a type is offered only with capacity in their region, the only one a launch may use. pickRegion and the catalog share launchRegions. - With errand_binary set, only types of its architecture are offered. - A GPU's variant (SXM5, PCIe) is left out of its name: the driver's name the leased machine is checked against may not carry it, so gpu=sxm5 could rent a machine that never matches. - Offers above the cap are advertised, so a request only they would match reaches the cloud peer and is refused with the price and the setting. - Offers wait for the catalog's first listing right after the cloud peer starts, instead of reporting none. - Requests waiting on a listing in progress take its outcome, even a failure, instead of each listing again. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QRtura6rhpHQz6RRGcL3uk
|
Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a3c7aa547
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A request the owner's ready or launching lease already serves no longer waits for a stale catalog to be listed again; only a new lease does. A launching lease keeps the offer it was made from, so a matching request still shares it after the catalog drops that offer instead of renting another machine. A listing that fails is tried again after 5 s, doubling up to the refresh interval, instead of leaving the catalog's offers missing for two minutes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QRtura6rhpHQz6RRGcL3uk
Keeps #49's changes: no Lambda user setting, optional prices, the Seen check on release, and installing the copy of errand that was checked, which now covers downloaded and self builds too. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QRtura6rhpHQz6RRGcL3uk
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd5b00a032
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| arch, ok := lambdaArch(t.Architecture) | ||
| if !ok || binaryArch != "" && arch != binaryArch { | ||
| continue // errand has no build for it, or errand_binary is for another |
There was a problem hiding this comment.
Filter architectures unavailable to development builds
When errand_binary is unset, this retains every known architecture even if the cloud peer is a development build. The explicit-binary fix does not cover this path: errandBuild can use the running executable only for the peer's own Linux architecture and rejects every other architecture because a -dev version has no downloadable release. Consequently, an arm64 request from a Linux/amd64 development peer—or an ordinary request for which an ARM offer is cheapest—selects an offer guaranteed to fail instead of using a compatible catalog offer. Restrict such catalogs to the runnable host architecture, or mark the other offers unavailable.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in #50: Lambda types this cloud peer has no errand build for, including the other architectures of a development build without errand_binary, are now listed as unavailable with the launch's reason. Placement passes over them, and a request only they match says what to set.
Generated by Claude Code
|
@codex security review Generated by Claude Code |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex security review Generated by Claude Code |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex security review Generated by Claude Code |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Before: renting from Lambda meant an offer per instance type, each repeating what Lambda already knows (GPU model, VRAM, CPUs, price) plus the API key file, and a cloud peer had to be a Linux build of the machine's architecture or name one with
errand_binary.After: a cloud peer is three steps. Save the API key in a file, add two lines to
errandd.toml, restart:Every instance type the account can launch right now is an offer, shaped and priced from Lambda's listing, and
--whererents the cheapest match. Machines abovemax_price_per_hourare never rented; it defaults to $10/h, which covers every single-GPU type Lambda lists today (the dearest is the 1x B200 at $6.99) and stops a sold-out $3/h type from quietly becoming a $16 to $54/h box. A request only a dearer type could serve is refused with the price and the setting to raise;0lifts the cap.instance_typesandregionsnarrow further. The cloud peer can run anywhere: withouterrand_binaryit installs itself when it is a Linux build for the machine, and otherwise downloads its version's release for that architecture from GitHub once, checked against the release'schecksums.txt. Development builds still neederrand_binary.How:
cloud.Configtakes aCatalogbesides configured offers. The broker lists it every two minutes and again before any lease from a listing older than that, one listing at a time; a failed listing keeps the last one. Configured offers hide listed ones of the same name. Each lease keeps the provider of the offer it was made from, so a lease launches and is released as it was made when the catalog no longer lists its offer.LambdaCatalogturnsGET /instance-typesinto offers: name from the type (gpu-1x-h100-sxm5), GPU model and memory parsed fromgpu_description("H100 (80 GB SXM5)" becomesH100, 80 GiB; the variant is left out because the driver's name the leased machine is checked against may not carry it), count and CPUs fromspecs, arch fromarchitecture. Types with no capacity in a wanted region, or an architecture errand has no build for, are left out. Types above the cap are advertised but refused, so a request only they would match gets the price and the setting from the cloud peer. The cap is checked again against the price Lambda lists right before the launch. Withfile_systems, only types with capacity in their region are offered, and witherrand_binary, only types of its architecture. The region-picking code shares the same listing.[cloud.lambda]isLambdaAccountin config;[cloud.offers.lambda]still works for one instance type with a shape and timeouts of your own, and both shareLambdaSettings.Validation:
gofmt,go vetfor darwin, linux and windows, andgo test -race ./...pass locally. New tests cover catalog listing, filtering and ordering, the capped refusal, GPU description parsing, leasing from a catalog offer that then disappears, failed and stale listings, the account table's validation and default cap, and the release download with its checksum check, caching, tampered archive, development build and wrong build cases. An opt-in test (ERRAND_LAMBDA_API_KEY_FILE) listed a real account: all 24 types Lambda lists today parse into a model and memory, and the 7 with capacity at that moment became offers. Nothing was rented.TestLeasesEndWithoutSubmitnow waits for the previous lease to finish releasing before acquiring the next, since a releasing lease counts towardmax_leases; it was racy before and this change widened the window.🤖 Generated with Claude Code
Generated by Claude Code