Skip to content

feat(skills): configure upload size limit#1156

Closed
evgyur wants to merge 1 commit into
nextlevelbuilder:devfrom
evgyur:feat/skills-upload-size-config
Closed

feat(skills): configure upload size limit#1156
evgyur wants to merge 1 commit into
nextlevelbuilder:devfrom
evgyur:feat/skills-upload-size-config

Conversation

@evgyur

@evgyur evgyur commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds skills.max_upload_size_mb to the JSON/JSON5 config with the current 20 MiB behavior as the default.
  • Adds GOCLAW_SKILLS_MAX_UPLOAD_SIZE_MB as an environment override.
  • Clamps the effective global upload size to the documented safety range and wires it into /v1/skills/upload.

Test plan

  • gofmt -w internal/config/defaults.go internal/config/config.go internal/config/config_load.go internal/config/skills_config_test.go internal/http/skills.go internal/http/skills_upload.go internal/http/skills_upload_test.go
  • go test ./internal/config -run 'TestSkillsConfig|TestLoadSkillsMaxUploadSize' -count=1
  • go test ./internal/http -run 'TestHandleUpload_UsesConfiguredMaxUploadSize|TestHandleUpload_AutoInstallsMissingDepsAndKeepsSkillActive' -count=1
  • go test ./internal/config ./internal/http ./cmd -count=1
  • git diff --check

Closes #1153

Add a skills.max_upload_size_mb config option and GOCLAW_SKILLS_MAX_UPLOAD_SIZE_MB override while preserving the 20 MiB default upload cap.

Wire the effective limit into skill ZIP uploads and cover config/env parsing plus handler enforcement.
@mrgoonie

Copy link
Copy Markdown
Contributor

Review result: closing as superseded.

The requested skill upload-size configuration already exists on dev as a broader implementation than this PR:

  • Implemented by commit 1296031d / merge 14b32bd2 (feat(skills): configure upload size limits).
  • First shipped in beta release v3.12.0-beta.1, whose release notes include Merge pull request #61 ... issue-28-skill-upload-size and feat(skills): configure upload size limits.
  • First stable release containing it: v3.13.0.

Current dev covers the requested behavior and more: skills.max_upload_size_mb, GOCLAW_SKILLS_MAX_UPLOAD_SIZE_MB, tenant system_configs["skills.max_upload_size_mb"], SKILL.md frontmatter max_upload_size_mb, 1-500 MB clamping, HTTP upload enforcement, Web UI setting, docs, and tests.

No fixes pushed. CI was not run because this PR is not being merged; it is currently conflicted (mergeStateStatus: DIRTY) and duplicates shipped functionality.

Unresolved questions: none.

@mrgoonie mrgoonie closed this Jun 15, 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.

[Feature Request] Add configurable max upload file size for skills (currently hardcoded at 20MB)

2 participants