Skip to content

PFA-10: explain a 413 with the request size and the server upload limit - #197

Merged
taleodor-claude merged 3 commits into
2026-11-product-fixesfrom
2026-11-pfa-10-upload-limit-message
Nov 17, 2026
Merged

taleodor-claude merged 3 commits into
2026-11-product-fixesfrom
2026-11-pfa-10-upload-limit-message

Conversation

@taleodor-claude

@taleodor-claude taleodor-claude commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PFA-10 (child 3 of PFA-3): the CLI explains an HTTP 413 in its own words. Built from PFA-3 ARCHITECTURE round 2, sections 3.3 and 4.3.

What changes

  • cmd/client.go: new uploadLimitMessage(err, batch). It applies only when errors.As finds a *rearm.StatusError with status 413, and returns one line:

    the request of 90.0 MB exceeds the upload limit of this server (HTTP 413). The default limit is 50 MB, but it may be different on this server; it is set by the server's administrator (Helm value max_upload_size_in_MB).

    Without a known request size the words of <size> MB are left out. For addreleases (AddReleasesProgrammatic_Operation) For a batch, send fewer releases per call. is appended.

  • describeError calls it first, so every command and the session reports get the message; uploadMultipart passes the batch flag. Other statuses keep their text; the 413 body (nginx page or backend JSON) is not printed.

  • go.mod / go.sum: rearm-client-go pinned with make pin-client-go REF=2ca4b8879acca1d64fe69a485aa24a2fab9e75e8, the merge commit of PFA-9: typed StatusError for an HTTP error status, with status and request size rearm-client-go#112 (PFA-9, the typed StatusError) on 2026-11-product-fixes; the previous pin v0.11.0 (a5413a3) is its ancestor. make pin-client-go-check passes. No re-pin is pending. The base has since gained the same pin (386916e), merged in at f13b8d6, so against the current base this PR changes only cmd/.

Tests

New cmd/uploadLimit_test.go (design T-9 to T-13), including a real 413 HTML answer from an httptest server through the key client and the session-report upload path, asserting the size the server saw and a single upload.

gofmt -l . empty, go vet ./... clean, go test ./... green. go test -race ./cmd/ reports data races only in agentDocPublishJson_test.go, which race the same way on the base tip 800df62 without this change.

🤖 Generated with Claude Code

Claude Code (ReARM Agent) and others added 3 commits November 17, 2026 17:45
make pin-client-go REF=2ca4b8879acca1d64fe69a485aa24a2fab9e75e8, the merge
commit of rearm-client-go#112 on 2026-11-product-fixes. It brings the typed
StatusError the 413 message reads. The previous pin v0.11.0 (a5413a3) is an
ancestor of the new one.

ReARM-Agentic-Session: PFA-coder-1794931848
ReARM-Agent: 24acc7bd-1858-4e7f-a374-e03843f92e20
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A 413 from the server or an ingress printed only
rearm: request failed with status 413 and the start of nginx's page.
uploadLimitMessage reads the typed rearm.StatusError of rearm-client-go
and says how large the request was, that it exceeds this server's upload
limit, that the default is 50 MB but may differ, and that the
administrator sets it with the Helm value max_upload_size_in_MB.
describeError uses it for every command and the session reports;
uploadMultipart adds the hint for addreleases to send fewer releases per
call. Other statuses keep their text.

PFA-3 design round 2, sections 3.3 and 4.3 (tests T-9 to T-13).

ReARM-Agentic-Session: PFA-coder-1794931848
ReARM-Agent: 24acc7bd-1858-4e7f-a374-e03843f92e20
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keeps the PR mergeable before sign-off.

ReARM-Agentic-Session: PFA-coder-1794931848
ReARM-Agent: 24acc7bd-1858-4e7f-a374-e03843f92e20
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@taleodor-claude
taleodor-claude merged commit b67a751 into 2026-11-product-fixes Nov 17, 2026
1 check passed
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.

1 participant