Skip to content

feat(api): support Swarm-Tag, Swarm-Pin, Swarm-Deferred-Upload on /soc#5461

Open
martinconic wants to merge 1 commit into
masterfrom
fix/5444-soc-tag-deferred
Open

feat(api): support Swarm-Tag, Swarm-Pin, Swarm-Deferred-Upload on /soc#5461
martinconic wants to merge 1 commit into
masterfrom
fix/5444-soc-tag-deferred

Conversation

@martinconic
Copy link
Copy Markdown
Contributor

@martinconic martinconic commented May 13, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

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

15s to return.

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

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@martinconic martinconic self-assigned this May 13, 2026
@martinconic martinconic added this to the 2026 milestone May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing tag and deferred headers for SOC

2 participants