Drop POST/DELETE /-/refs (publish is the only way refs enter)#42
Merged
Conversation
POST /-/refs (register-only) and DELETE /-/refs (unregister) had no production caller: the publish action uses /-/tarball + /-/publish, which registers the ref internally. Register-only only enabled the unsupported on-demand-build result (unversioned upstream bytes that pnpm-strict rejects). Removing both makes 'a ref exists only once it has been published with artifacts' an invariant and drops the now-dead unregisterRef. GET /-/refs (discovery) stays. The test fixture seeds its ref via /-/publish (the production path); the register/unregister/auth tests fold into publish-based equivalents; the optional-dependency URL rewriting moves to a buildPreviewTarball unit assertion (it had been covered only by the now-passthrough packument test).
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.
(Recreated from #41, which GitHub auto-closed when its stacked base
drop-static-preview-refswas deleted on #38's merge. Now targetsmaindirectly.)Why
POST /-/refs(register-only) andDELETE /-/refs(unregister) have no production caller , the publish action uses/-/tarball+/-/publish, which registers the ref internally. Register-only's only distinct capability was a "registered but unpublished" ref, which falls back to the on-demand build that serves the unversioned upstream bytes pnpm-strict rejects (the explicitly-unsupported path). Removing both makes the model an invariant: a ref exists only once it has been published with artifacts.What
POSTandDELETE /-/refshandlers and the now-deadunregisterRef.GET /-/refs(discovery) stays;registerRefstays (used by/-/publish)./-/publish(the production path). Register/unregister/auth tests fold into publish-based equivalents.buildPreviewTarballunit assertion.Verify
tscclean, 73 tests pass, action bundle unaffected. Net −57 lines.