feat(api): support Swarm-Tag, Swarm-Pin, Swarm-Deferred-Upload on /soc#5461
Open
martinconic wants to merge 1 commit into
Open
feat(api): support Swarm-Tag, Swarm-Pin, Swarm-Deferred-Upload on /soc#5461martinconic wants to merge 1 commit into
martinconic wants to merge 1 commit into
Conversation
akrem-chabchoub
approved these changes
May 13, 2026
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.
Checklist
Description
The POST /soc handler previously hardcoded TagID=0, Pin=false, and
Deferred=false, forcing every SOC upload through the direct-push path
to the target neighborhood. On public networks this commonly takes
Bring /soc to parity with the other upload endpoints by reading and
respecting Swarm-Tag, Swarm-Pin, and Swarm-Deferred-Upload. Resolution
order is conservative to avoid changing existing behavior: an explicit
Swarm-Deferred-Upload value wins, otherwise a non-zero Swarm-Tag opts
the caller into deferred mode (matching /chunks), otherwise the upload
remains direct as before. When a session is in use, the response
echoes the resolved Swarm-Tag header (exposed via CORS).
openapi/Swarm.yaml is updated to document the new request parameters,
the swarm-tag response header, and the 404 response path introduced
by the new "tag not found" handling. Pre-existing spec drift on
402/413/422 for this endpoint is left for a separate alignment pass.
Fixes #5444
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):
AI Disclosure