Skip to content

Lease machines from cloud peers (provider commands) - #32

Merged
lydakis merged 34 commits into
mainfrom
claude/errand-cloud-leases
Oct 6, 2026
Merged

lydakis merged 34 commits into
mainfrom
claude/errand-cloud-leases

Conversation

@lydakis

@lydakis lydakis commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Before: when --where matched none of your runners, the run failed.

After: a runner with [[cloud.offers]] becomes a cloud peer. When no runner of yours matches but a cloud peer's offer does, --where leases a machine, waits until it answers as an errand runner with matching facts, and runs the job there directly. Machines come from two provider commands (acquire, release); docs/cloud/static-pool.sh is a complete example.

Which cloud peer supplies the machine: every reachable cloud peer with a matching offer can. The cheapest matching offer wins (priced before unpriced, equal ones at random). If a cloud peer turns the request down before starting anything (no permission, nothing matches, or it is at max_leases), the next one is asked. Neither the default peer nor a cloud peer's own load plays a part, and there is no new setting.

The surface stays narrow. A ready lease shows up as a peer, so errand peers, errand peers --on cabal-7f3a, --on cabal-7f3a and job handles all work on it. errand leases lists your leases through their whole lifecycle, and errand leases release cabal-7f3a releases one and waits until the provider confirms the machine is gone. You can only get a lease through --where. The per-run withdraw endpoint (DELETE /v0/lease-requests/<id>) is part of acquisition and has no command.

This is the second of three PRs split out of #26. The first, #31 (GPU where terms), is merged, and this PR now targets main. The built-in Lambda provider stays in #26, which is stacked on this one, as is #35 (SSH leases usable from all your devices).

The lease rules are written down in docs/DESIGN.md under "Lease guarantees", and each broker test names the guarantee it checks. In short:

  • A lease is recorded before anything is acquired.
  • A run holds the lease it was handed until it settles. It withdraws if no job was admitted there; otherwise the idle rule decides.
  • Every automatic release is decided against the record at the moment the release is recorded.
  • A release counts only once the provider confirms the machine is gone.

How: the cloud peer keeps the only lease record. One worker goroutine per lease makes every provider call, and every change is checked, persisted and only then made visible. Ownership is a set of holder requests plus one bit for "a job has run here". The client keeps no lease state: it finds its leases in /v0/info and settles one claim per run. It also has its own SSH key and pins host keys for machines reached over SSH. Callers need a new lease action in the errand capability on top of submit. A caller that loses submit loses its leases at its next request of any kind.

🤖 Generated with Claude Code

https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6

claude added 17 commits October 5, 2026 02:28
A cloud peer is an errand daemon with machine offers. When no runner you
own matches --where (new terms: gpu, gpus>=N, gpu=MODEL, vram>=N), it
leases a machine, the machine joins as a runner, and the job runs there.
Leases end on idle, at a max lifetime, or with `errand leases rm`, and
survive restarts. Providers are two commands (acquire, release) or the
built-in Lambda Cloud provider, which installs errand over SSH and never
leaves an instance billing after a crash.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
- Ctrl-C during the lease request no longer drops the lease: the request
  finishes, and the launching lease it names is released.
- A launch is canceled at the offer's max_lifetime, not only at
  acquire_timeout.
- A lease is ready only once that is recorded; a failed write releases it
  instead of leaving a record a restart would release under a job.
- The running broker forgets leases that ended over a week ago, as
  startup already did.
- Offers are shown only to callers that may see their lease IDs, so a
  caller without the lease action never forgets live lease peers.
- doctor still runs its automatic-apply checks when a run would lease.
- GPU facts refresh in the background, so a hung nvidia-smi cannot push
  /v0/info past the client's placement deadline.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
Without tailscale_auth_key_file, a leased Lambda machine runs its runner
with transport = "ssh": no network port, and jobs reach it over SSH on
port 22 like any SSH peer. Clients' public keys come from the offer's
authorized_keys. The lease carries the host key the machine booted with,
and errand pins it for that target, so no known_hosts entry or prompt is
needed and a reused IP cannot impersonate the machine. The cloud peer
watches the runner with the key it installed it with.

Command providers can return the same host_key with an ssh target.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
- A workspace's own run.where never rents a machine; personal defaults,
  profiles and --where can.
- Lease requests must be application/json without an Origin header, so a
  web page cannot start a billable machine.
- A run rents a machine only after its local preparation (forwards,
  snapshot) succeeds.
- Placement drops ended lease peers and runs again, even when the machine
  still answers.
- Releases are acknowledged only once recorded.
- The reaper checks max lifetime before probing and probes ready leases
  concurrently.
- static-pool.sh claims a slot and records its lease in one atomic step.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
The cloud peer makes its own SSH key on first use, adds it to the Lambda
account, and installs and watches machines with it, so ssh_key_name and
ssh_private_key_file are gone. Each client makes an errand SSH key of its
own and sends the public half with the lease request; the machine admits
only that key, so authorized_keys is gone too. A lease is reused only for
the same client key. Command providers get the key as ERRAND_LEASE_SSH_KEY.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
- Tailnet leases run Tailscale-only, so no SSH key reaches their runner.
- A runner with active leases refuses to start without its [cloud] section,
  and a command offer's leases are bound to its exact commands.
- Host key pins live in the state directory and are written before the
  lease is recorded; pinned connections get their own control path.
- The idle check records a release before destroying the machine.
- Lease records keep their cloud peer's entry, so release works after the
  name changes.
- workspaces create rents only after its snapshot is prepared.
- Provider stderr is drained past an over-long line.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
The cloud peer now drives each lease with one worker goroutine that makes
every provider call. Every change goes through one update that writes the
whole record before readers see it, and only moves leases forward. A lease
records how to release itself (release command or Lambda API key file),
its idle timeout and the key the cloud peer probes it with, so changing or
removing offers or the whole [cloud] section only stops new leases. Every
runner now has a broker; the refuse-to-start checks are gone. A restart
still releases interrupted launches.

Clients keep no lease records, pin files or peer aliases. /v0/info lists
the caller's active leases with their targets, host keys and admitted SSH
key; placement, ps, peers and lease peer names (cloud-7f3a, any
unambiguous ending of the lease ID) all come from that list, and host
keys are trusted in memory for the process. Lease requests carry a
request ID, so a client that lost the answer gets the same lease again.

Release cancels a running acquire or probe. Leases reached over the
tailnet are reused across a user's machines; SSH ones only by the machine
whose key they admit. Offer gpus is capped at 64 and acquire stdout at
16 KiB, which keeps release's state within Windows' environment limit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
…lease

Ctrl-C before the job starts now withdraws the run's lease request. The
cloud peer ends the lease only if that request made it and no other request
was handed it; a ready lease is released at its next check unless a job is
running on it. This replaces the client deciding from the lease state.

Also: a cloud peer without offers keeps leftover [cloud] settings and stays
listed by errand leases while it holds leases, and the client SSH key is
placed private half first, with a missing public half derived again.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
… terminated

A leased machine admits its owner for every action, so holding a lease
needs submit on the cloud peer. A caller without it is no longer shown
lease targets, and its leases end when it next asks about them.

Lambda release now counts only once Lambda's instance list shows every
instance of the lease terminated (or gone). Release returns ReleasePending
while termination is under way, and the broker asks again shortly.

Docs say the idle and lifetime limits hold only while the cloud peer runs
and are not a spending cap.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
…s leases

A lease now records each request it was handed. An interrupted run
withdraws its own request, and the lease ends only once no request still
holds it; a job seen running, or more than 32 requests, leaves it to the
idle rule. A withdrawal the cloud peer no longer ties to a lease is
reported as kept rather than as a failure.

errand leases also asks the implicit local peer, which placement can rent
from.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
A run that resolved a lease now withdraws its request whenever it ends
before anything was submitted there, not only on Ctrl-C. The idle
deadline is derived from when the lease was last busy, so it is right
after a restart. The state directory is made absolute so recorded
identity paths survive a different working directory, and pinned lease
sessions offer only their own keys.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
A machine resolved for one run is now held by an explicit claim, which
the run settles once with what became of its request there: nothing
admitted (not submitted, or definitely refused) withdraws the lease
request; admitted, or possibly admitted after a lost answer, leaves the
lease to the cloud peer's idle rule. Run and workspace creation share
the contract, and a target never tried also gives up its claim.

The cloud peer decides an automatic release against the lease record as
it is when the release is recorded, not as it was when the idle probe
began, so a lease handed to a request during a probe is not released.
Handing out a ready lease counts as use.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
The broker's ownership fields (request ID, request list, kept, unwanted)
become one holder set and a "a job has used this machine" bit, from
which everything else is derived. docs/DESIGN.md states the lease
guarantees, and the broker tests name the guarantee they check. A lease
takes at most 32 waiting runs.

From the first real Lambda run: errand leases rm finds a bare lease ID's
cloud peer without --on, and the cloud peer logs each lease's lifecycle.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
Runners report the GPUs nvidia-smi lists, refreshed at most once a
minute in the background so a slow driver never holds up info. --where
gains gpu, gpus>=N, gpu=MODEL and vram>=N, combined per GPU, plus
os=windows. Runners recheck them at admission, and errand peers shows a
GPUS column.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
…ases

# Conflicts:
#	cmd/errand/peers_render.go
#	docs/CONFIGURATION.md
#	internal/daemon/server.go
#	internal/placement/requirements.go
#	internal/placement/requirements_test.go
This branch carries cloud leasing with provider commands: the broker,
the CLI, the daemon endpoints and the client lease flow. The built-in
Lambda provider follows separately.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
Active copied the stored lease instead of its view, so /v0/info listed
ready leases without the derived idle deadline.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
The test waited for a second probe that a withdraw could make
unnecessary, so it sometimes hung. It now reuses the lease while the
first idle probe is held, which is the window the guarantee is about.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
claude added 6 commits October 5, 2026 05:39
…s --on

errand peers lists leased machines, so peers --on now accepts their names
too. leases rm becomes leases release, which says what it does to a
rented machine. The lease endpoints, including the internal per-run
withdraw, are written down with the rest of the protocol.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
launch looked up the lease's offer and creation time without the lock
while a withdraw could replace the record, which the race detector
caught in CI.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
Every reachable cloud peer with a matching offer can supply a machine.
--where ranks their cheapest matching offers by price, priced before
unpriced and equal ones at random, and asks the next cloud peer when one
turns the request down before starting anything. A cloud peer leases its
own cheapest matching offer the same way. The default peer and a cloud
peer's own load play no part.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
When ssh exited with 255 before saying anything, a read reported the
peer unreachable but a write reported only that ssh ended. Whether the
request write or the response read hit the closed pipe first depended on
timing, so TestSSHConnectFailureIsUnreachable was flaky in CI. Both now
explain the error through one function.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6

lydakis commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

Check (ubuntu-24.04) failed on 30e7b98 in TestSSHConnectFailureIsUnreachable with "unreachable: exit status 255". This test comes from main (#28) and its flake isn't caused by this PR. When ssh exits before the request is written, the write side reported "ssh ended" rather than "unreachable". The fix is #34, ported into #31 (bb0e731) and merged up into this branch.

The same run also caught a data race in this PR's own code: launch read the lease's offer without the lock. That's fixed in c6ea8db.


Generated by Claude Code

@lydakis
lydakis marked this pull request as ready for review October 5, 2026 06:03

lydakis commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

The only red check left is github-advanced-security. That's GitHub's Copilot autofind job failing with "402: You have exceeded your monthly quota", so it isn't caused by this PR. Re-running won't help until the quota resets. Linux, macOS and Windows checks are green on 38205ff.


Generated by Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T00:06:52.772017Z fcf95d8 New commits
🔒 Security Review ✅ Completed 2026-10-06T00:00:12.146007Z fcf95d8 New commits

Security findings

Advisory findings (1)

ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

claude added 3 commits October 5, 2026 06:09
The check that ends the leases of a caller that lost submit ran only in
lease handlers and in /v0/info behind the lease action, so a caller left
with read-own, or with nothing at all, kept its leased machine until the
idle or lifetime limit. It now runs in the auth wrapper for every
identified caller, before the action check.

Also take lease offers only from configured peers. A leased runner that
offers machines itself is probed as a runner, and renting from it would
leave a machine nobody ends once the intermediate lease goes idle.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
/bin/true is /usr/bin/true on macOS, so the lease ended in the first
step stayed releasing and the next step saw two leases.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
…eases

# Conflicts:
#	cmd/errand/peers_render.go
#	docs/CONFIGURATION.md
#	internal/daemon/server.go
#	internal/placement/requirements.go
#	internal/placement/requirements_test.go
@lydakis
lydakis changed the base branch from claude/errand-gpu-where to main October 5, 2026 06:44

lydakis commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

@codex security review


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 48e5fafa2a

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48e5fafa2a

ℹ️ 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".

Comment thread internal/daemon/leases_http.go Resolved
Comment thread cmd/errand/leases.go Resolved
Comment thread internal/cloud/provider.go Resolved
Comment thread cmd/errand/leases.go Resolved
Comment thread internal/cloud/broker.go Resolved
claude added 2 commits October 5, 2026 23:03
A buffer that limits what it keeps by overriding Write while embedding
bytes.Buffer also exposes Buffer.ReadFrom. exec.Cmd copies a child's
output with io.Copy, which prefers ReadFrom, so the limit never applied:
git merge-file's stderr was kept in full. internal/limitbuf wraps the
buffer instead, and merge uses it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
limitedBuffer embedded bytes.Buffer, so exec copied acquire's stdout and
release's output through Buffer.ReadFrom and never hit the limit: an
acquire that printed more than 16 KiB was accepted and kept in memory in
full. The provider now uses limitbuf.Buffer, which is also on its way to
main for the same bug in merge.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
@lydakis
lydakis force-pushed the claude/errand-cloud-leases branch from 5aea0d2 to 1a52e8c Compare October 5, 2026 23:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a52e8ce77

ℹ️ 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".

Comment thread internal/client/leases.go Resolved
Comment thread internal/cloud/provider.go Resolved
Comment thread internal/cloud/broker.go Resolved
Comment thread internal/cloud/broker.go Resolved
A caller that keeps the lease action but loses submit has its leases
ended, and list and get already hid their targets from it. Release
returned the raw lease, so its target leaked. Every response that
carries one lease now goes through leaseView.

Also covers a child of the acquire command that keeps stderr open: a
release still goes ahead once the command is stopped.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0600050769

ℹ️ 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".

Comment thread internal/cloud/broker.go Resolved
Comment thread internal/client/ssh_pin.go Resolved
Comment thread cmd/errand/placement.go Resolved
Comment thread cmd/errand/leases.go Resolved
--where turned a ready lease the cloud peer listed into an ordinary
candidate and ran on it directly. Nothing then held the lease for the
run, so it could go idle and be released while the run was still
preparing (lease guarantee 5). A ready lease is no longer a placement
candidate: the run asks the cloud peer, whose Acquire already hands a
matching ready lease to the request as a holder and starts a full idle
window.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 307e8df40a

ℹ️ 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".

Comment thread internal/placement/requirements.go Resolved
Comment thread cmd/errand/leases.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 307e8df40a

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread internal/daemon/leases_http.go Resolved
A caller with lease but not submit was shown its leases without their
targets, but the progress and error lines still carried the provider's
output, and a pool provider prints the URL it claimed. Those callers
now see neither.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84a351249d

ℹ️ 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".

Comment thread internal/cloud/broker.go Resolved
claude added 2 commits October 5, 2026 23:50
Since 307e8df every --where run that reuses a ready lease is handed it
by the cloud peer, and each hand-out added a holder. A run whose job
started and ended between two idle checks never withdraws, so holders
piled up until the 32-holder bound turned later runs away. Handing out
a ready lease now counts as use, as a job seen on the machine does:
holders stop mattering and only the idle and lifetime rules end it. The
latest run is kept as the one holder, so its retry and withdrawal still
find the lease.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
The release script returns at once, so by the time info answers the lease
can already be released and is no longer listed. What the test checks is
that no listed lease shows its target.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcf95d817b

ℹ️ 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".

Comment thread internal/cloud/broker.go Resolved
Comment thread internal/client/leases.go Resolved
Comment thread cmd/errand/leases.go Resolved
@lydakis
lydakis merged commit c74b4b7 into main Oct 6, 2026
8 of 9 checks passed
@lydakis
lydakis deleted the claude/errand-cloud-leases branch October 6, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants