Repository navigation
remote-worker: a container Release whose rename fails answers an error, not RELEASED (follow-up to #949) - #953
Merged
Conversation
…r, not RELEASED Follow-up to rossoctl#949 (rossoctl#338): the container tier's detachLocked logged a rename that failed for any reason other than ENOENT and returned "", so Release answered RELEASED with the directory still there. The wire contract says RELEASED means the workspace is freed, and a filesystem error is the error string a sender retries on; vmpool's Release already answers that failure so. detachLocked now logs the detail (path and OS error, as before) and returns a fixed, path-free error, since it travels to the client and the relay's audit: Release answers UNSPECIFIED plus it (the key is refused all the same, and stays tracked, so a later Release or the sweep finishes the job), and the release after a busy Exec logs it, as vmpool does. Assisted-By: Claude Code Signed-off-by: Rong Chang <[email protected]>
ingpaolodettori-dev
approved these changes
Nov 20, 2026
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Review — remote-worker: a container Release whose rename fails answers an error, not RELEASED (follow-up to #949)
The #949 nit, done better than it was asked: the failure now goes back as an error with outcome UNSPECIFIED, and the error itself is a fixed, path-free string, since it travels to the client and the relay's audit.
detachLockedreturns(tomb, error): ENOENT is still "nothing to remove", any other rename failure logs the detail (the host path and OS text stay in that log) and returnserrWorkspaceDetach, keeping the key tracked so the sweep retries — the same shape vmpool already had.- The string starts with none of
release_unsupported:,busy:,invalid-workspace-key:orempty-workspace-key:, so the relay'sreleaseErrorStatusmaps it to UNAVAILABLE: retryable, which is what the proto asks for a filesystem error. - The Exec-unwind path (a Release that met the Exec busy) now logs the failed detach too, rather than silently keeping the run.
- The test is careful about the environment: it skips under root (which can rename in a read-only directory), asserts the message has no
/or root path, that the workspace is still there, that an Exec is refusedreleased:anyway, and that a later Release — once the rename can succeed — finishes the job. That is exactly the contract.
Checks 17/17 green. Author: webchang (MEMBER — maintainer). One commit, signed off.
webchang
added a commit
to webchang/moca
that referenced
this pull request
Nov 20, 2026
Keeps both tests in workspace_release_test.go: the startup sweep's and rossoctl#953's failed-rename Release. Signed-off-by: Rong Chang <[email protected]>
webchang
added a commit
to webchang/moca
that referenced
this pull request
Nov 22, 2026
57 commits past Moca v0.11.0 (rossoctl#953-rossoctl#976), among them rossoctl#959 (the member routes write audit lines), rossoctl#960 (gate-image.py, Moca's general gate), rossoctl#976 (the vault credential store, inert with egress credentials off) and the lease-mode vmpool changes. No conflict; the fork-only set is unchanged. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
webchang
added a commit
to webchang/moca
that referenced
this pull request
Nov 24, 2026
The sync paragraph named upstream 49cce28 (API 1.35.0, harness 1.7.0); the branch is now at upstream de6c9b5 (rossoctl#953-rossoctl#990: API 1.37.0, harness API 1.8.0), merged in 27df5df. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
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.
Summary
Follow-up to #949 (#338), from the review there: on the container tier, a
Releasewhose workspace rename fails for any reason other than "not found" answeredRELEASE_OUTCOME_RELEASEDwith the directory still in place. The wire contract saysRELEASEDmeans the workspace is freed, and a filesystem error is the error string a sender retries on; vmpool'sReleasealready answers that failure that way, so the two tiers disagreed.What changes
remote-worker/internal/exec/workspace.go:detachLockedkeeps logging the rename's detail (the path and the OS error) and now returns a fixed, path-free error (workspace removal failed; the sweep retries) instead of"". The error goes back to the client and into the relay's audit, so it names no host path; it doesn't start withrelease_unsupported:,busy:orinvalid-, so the relay answers it as a retryable failure.ReleaseanswersRELEASE_OUTCOME_UNSPECIFIEDplus that error. The key is refused all the same (it is marked released before the detach), and it stays tracked, so a laterReleaseor the idle sweep finishes the job.Tests
TestReleaseWhoseDetachFailsAnswersAnErrorNotReleasedmakes the rename fail (Root not writable; skipped as root), and checks thatReleaseanswers(UNSPECIFIED, an error)whose message names no path, the workspace is still there, an Exec for the key is refusedreleased:, and a secondReleaseonce the rename can succeed answersRELEASEDand removes the directory.workspace.goRelease with a failing rename = (RELEASE_OUTCOME_RELEASED, <nil>)go vet ./...,go test ./...(remote-worker)go test -race ./internal/execPart of #338
Assisted-By: Claude Code