fix: resolve all 10 open playground issues#11
Merged
Conversation
- #1/#2: Add per-IP rate limiting (10 req/min) on /api/run and /api/share - #3: Validate snippet IDs against base62 regex, not just length - #4: Add snippet count cap (100k) with automatic pruning of oldest 10% - #5: Check and log errors from LogCompile database writes - #6: Propagate HTTP request context to runCode for client disconnect cancellation - #7: Configure SQLite connection pool (MaxOpenConns=1) and verify with Ping - #8: Simplify CompileSuccess to ExitCode == 0, removing fragile string matching - #9: Check and log JSON encoding errors on all HTTP responses - #10: Add 5s timeout to Docker container cleanup and log failures Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
/api/runand/api/shareusinggolang.org/x/time/rate^[a-zA-Z0-9]{8}$regex instead of length-only checkLogCompileerrors now logged, SQLite pool configured withMaxOpenConns(1)and startupPing()r.Context()passed torunCodeso client disconnects cancel Docker executionCompileSuccesslogic, all JSON encode errors checked and loggedCloses #1, closes #2, closes #3, closes #4, closes #5, closes #6, closes #7, closes #8, closes #9, closes #10
Test plan
go build ./...andgo vet ./...pass cleanly/api/runLogCompileerrors appear in server logs when DB is unavailable🤖 Generated with Claude Code