Repository navigation
Say what clears a deployment id whose claim was never named - #2661
Merged
Merged
Conversation
A process death between the claim's exclusive `mkdir` and its ownership write leaves a directory that is refused forever, since unattributed is a deliberate permanent refusal and no retry of that id can clear it. Closing that needs the claim and its owner to be one recoverable transaction — deferred to #2315 step 5, which now carries @kriszyp's two designs and a third worth weighing first. Until then the refusal says what it costs and what clears it, rather than being a dead end that reads like a transient conflict. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the error handling in components/Application.ts when claiming a deployment directory. It adds an explanatory comment and expands the error message thrown when a deployment ID is already claimed, providing instructions on how to resolve the issue. There are no review comments, and I have no feedback to provide.
The block comment directly above already states that nothing on disk separates a claim in flight from one that got no further, and the string now says what clears it. A comment nobody sees at the moment this fires added neither.
dawsontoth
marked this pull request as ready for review
September 17, 2026 14:50
Contributor
|
Reviewed; no blockers found. |
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.
A one-string follow-up to #2605, which merged while this was being written.
Claiming a deployment id wins an exclusive
mkdirand then records who owns it. #2605 reclaims the directory when that write rejects, but a process death between the two leaves a directory naming nobody — and unattributed is a deliberate permanent refusal, so every retry of that id is refused by its own wreckage with nothing able to clear it.The message said only that the id was "already claimed by a build that has not named its component yet", which reads like a transient conflict you should retry. It is the opposite: no retry of that id can ever succeed. It now says what the state is and what clears it.
Closing the underlying window needs the claim and its owner to be one recoverable transaction, which is deferred to #2315 step 5 — that step now carries @kriszyp's two designs plus a third (build at
.deploy-staging/.claiming-<uuid>/, write the sidecar, thenrenameonto the id, so the directory only ever appears already attributed).For the human reviewer
No open judgment calls. The one thing worth a second's thought is whether "removed by hand" is the right advice to put in an operator-facing string, given the directory is under a dot-prefixed staging path — the alternative is to say nothing about it and only mention minting a fresh id.
The first revision also added a code comment explaining the refusal. @dawsontoth pointed out that the string is what the operator actually sees, so the context belongs there and nowhere else — and the block comment directly above already states the part about nothing on disk separating the two cases. It was dropped; the diff is now the string alone.
Verification
Written and verified on the #2605 branch before that PR merged:
npx mocha "unitTests/components/deploy*.test.js"197 passing, the fullunitTests/components/*.test.jssweep 885 passing with only the 5 pre-existing/private/varrealpath failures, plustsc --noEmit,lint:requiredand the stage/activate integration suite 7/7. Cherry-picked ontomainhere, and the resultingcomponents/Application.tsis byte-identical to the version those runs covered (diffagainst29a1d8e6b). Not re-run in this worktree, which has nonode_modules; CI covers it.No cross-model review round for this one: it changes one error string, which is below the threshold the review tiering sets for a re-run. #2605 carried 20 rounds over the code around it.
Complexity: easy