Skip to content

feat(deploy): P1 — cap /deploy/new tarball at 10MB (413 + prebuilt-image nudge)#220

Merged
mastermanas805 merged 2 commits into
masterfrom
feat/deploy-tarball-10mb-cap-2026-06-03
Jun 3, 2026
Merged

feat(deploy): P1 — cap /deploy/new tarball at 10MB (413 + prebuilt-image nudge)#220
mastermanas805 merged 2 commits into
masterfrom
feat/deploy-tarball-10mb-cap-2026-06-03

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

Phase 1 of the multi-source deploy plan. /deploy/new direct uploads cap at 10MB (was 50); over-cap → 413 tarball_too_large with an agent_action nudging to slim the upload or deploy a prebuilt image (source=image, P2). Fiber global BodyLimit unchanged (50 MiB). Scoped to /deploy/new; redeploy + /stacks/new stay 50MB as the P1.1 fast-follow. White-box + DB-gated integration tests; contract test green. 🤖 Generated with Claude Code

First phase of the multi-source deploy plan (PLAN-deploy-multisource-2026-06-03).
Direct source uploads on POST /deploy/new now cap at 10 MB (was 50): a 10 MB
gzipped source tar is ample for app code; larger almost always means vendored
deps / build output that belong in the build, not the upload.

- maxTarballBytes (10<<20) + enforceTarballCap() helper, applied on /deploy/new.
- Over-cap → 413 Payload Too Large (was 400), code stays `tarball_too_large`
  (no breaking rename), with a routed agent_action nudging the caller to slim
  the upload or deploy a prebuilt image (source=image, P2) instead of uploading.
- Updated codeToAgentAction["tarball_too_large"] (was 50 MiB copy) + openapi.
- Fiber global BodyLimit stays 50 MiB (/stacks/new multi-service + webhooks).
- Scope: /deploy/new only this phase. Redeploy + /stacks/new keep 50 MB —
  tightening them to 10 MB is the P1.1 fast-follow (they sit behind extra
  gates that need their own fixtures).

Tests: white-box TestEnforceTarballCap (413 + agent_action + at-cap boundary,
100% on the helper) + DB-gated TestDeployNew_OversizedTarball_413 (end-to-end
413). build + vet + agent_action contract green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 enabled auto-merge (squash) June 3, 2026 07:05
- go1.25.10 → go1.25.11 fixes GO-2026-5039/5038 (net/textproto, mime), which
  blocked govulncheck/osv-scan (same pre-existing stdlib CVE as worker #79).
- Regenerated openapi.snapshot.json for the /deploy/new 10MB cap description
  change (snapshot-drift gate).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 merged commit e57d197 into master Jun 3, 2026
19 checks 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