Repository navigation
Count workspace uploads in progress as runner work - #57
Conversation
A workspace creation, push upload or push apply in progress is now counted by the runner and reported in /v0/info as transfers. The cloud peer's idle check counts it as work, so a lease is not released under an upload that outlasts idle_timeout, and setup refuses to restart a runner in the middle of one. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
|
You have reached your Codex usage limits for security reviews. Please try again later. |
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. |
|
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: d669af62a4
ℹ️ 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 transfer now starts only if no setup hold is in place, checked under the lock that counts it, and is refused as a job submission is meanwhile, so a transfer cannot begin after setup found the runner idle and then be cut off by the restart. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
@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. You're on a roll. 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. Chef's kiss. 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. |
1 similar comment
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
Keeps both #57's workspace transfers and this branch's unfetched results: /v0/info reports transfers and the latest admitted/unfetched times, and the broker counts transfers as work alongside jobs and the lease's own results. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
|
@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". |
Before: the cloud peer's idle check counted only staging, starting, running and queued jobs from
/v0/info. A workspace being created or pushed to a leased machine (errand workspaces create --on <lease>,errand push --on <lease>), or a push being applied, was invisible to it, so a lease could be released in the middle of an upload that took longer thanidle_timeout.errand setupcould likewise restart a runner in the middle of one.After: a workspace creation, push upload or push apply in progress counts as work.
/v0/inforeports it astransfers, the cloud peer's idle check treats it like a job, and setup's quiesce refuses to restart a runner while one is in progress; while setup holds the runner, a new transfer is refused as a job submission is (503).max_lifetimestill ends the lease whatever is in progress.errand ps,errand dfand placement load are unchanged: they are about jobs and storage, and an upload does not take a job slot.How: the daemon wraps the three workspace transfer handlers (
POST /v0/workspaces/{id},.../push,.../push/{transfer}/apply) so each counts itself inDaemon.transfersfor as long as the handler runs, under the daemon lock that/v0/infoalready takes.occupancyLockedcarries the count, so reading it is O(1) with no extra I/O.proto.Infogets one field,Transfers. The broker'sbusyadds it to the job counts. The setup quiesce check refuses with "runner has N workspace transfers in progress" after its job check, and the wrapper refuses a transfer while an unexpired setup hold is in place, checked under the same lock that counts it. Negotiation and checkpoint reads (.../snapshot/diff,.../push/diff,.../push/base) are short reads and are not counted.Tests:
TestInfoCountsWorkspaceUploadInProgressholds a push upload open mid-body and checks that/v0/infocounts it, that setup quiesce is refused meanwhile, and that the count drops once the upload ends.TestSetupQuiesceRefusesWorkspaceTransferschecks that create, push and apply are refused while setup holds the runner.TestUploadInProgressKeepsLeasechecks that a lease whose runner reports an upload is not released at its idle deadline, and is released at the next one after the upload ends.Closes the #33 item "Uploads do not count as busy".
🤖 Generated with Claude Code
https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
Generated by Claude Code