Repository navigation
wire: site_withdrawn, the publish refusal for a site that has been withdrawn - #104
Merged
Merged
Conversation
…thdrawn A deploy whose site has been withdrawn (it expired, or its owner or the service took it down) will never be published again, and no code in the contract said so. deploy_not_ready would tell a client to wait, and deploy_failed would tell a person their build was refused; neither is true. site_withdrawn is terminal, carries no Retry-After and is never a stream event, and it is appended at the end of the code list so nothing a released client can observe moves. The client stops on it at the publish step with its own failure, site-withdrawn: the site has been withdrawn, a withdrawn site is not published again, and a fresh deploy is the way forward, with the server's own message quoted. It exits 1, not the closed-door 3, and it does not say nothing was deployed, because the deploy may have been live before its site was withdrawn and this client cannot tell. Every routing table over the contract states a route for it; the create and login tables declare it as one of the publish step's codes, which cannot reach them. The failure id is registered, the catalog is regenerated and the README carries its entry. A golden fixture holds the envelope.
enesismail
force-pushed
the
the-site-withdrawn-code
branch
from
October 5, 2026 15:44
8c82da4 to
38a8d2b
Compare
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.
What was missing. A deploy whose site has been withdrawn (it expired, or its owner or the service took it down) will never be published again, and the contract had no code for that. The two publish refusals it would otherwise borrow both say something false:
deploy_not_readytells a client to wait, anddeploy_failedtells a person their build was refused. A client switches on codes, so the refusal needs its own.What changes.
pkg/wire:CodeSiteWithdrawn=site_withdrawn, documented as terminal, with noRetry-After, and never a stream event. It is appended at the end of the const block and ofAllErrorCodes, so no position a released client can observe moves. It is pinned in every contract table: the order, the constants, the names,CarriesRetryAfterfalse andStreamOnlyfalse. A golden fixtureerror_response_site_withdrawn.jsonholds the envelope and passes the existing marshal-match and unmarshal round-trip rows.site-withdrawn. "This deploy's site has been withdrawn." / "A withdrawn site is not published again." / next step "Runcurious deployagain to make a fresh one.", with the server's message quoted. It exits 1, not the closed-door 3. It does not say "Nothing has been deployed": the deploy may have been live before its site was withdrawn, and the client cannot tell.catalog.jsonis regenerated (one entry added), and the README has its troubleshooting entry. The publish endpoint's code pass-through test gains the new code, and its comment no longer says the endpoint answers with two.Shown red first. With the constant added and the routing rows absent, all three range rows went red on
site_withdrawn: publish ("the contract defines "site_withdrawn" and the publish has no stated route for it"), create, and login. The new refusal row was red against the old fall-through on all five of its assertions.The exit row and its control. The refusal table runs every stop code through the same harness. The new row expects exit 1; the capacity and maintenance rows in that same table expect 3, which is what makes the 1 a measurement.
Mutations, each run and reverted: