Team/greyapple - #40
Open
christiano-developer wants to merge 27 commits into
Open
Conversation
…ences for Stage 2
…oad-adaptive resource limits
…dening, and structured JSON logs
…ration, features, and setup guides
Owner
Evaluation SummaryTeam: pr40-greyapple · Rank: 4 / 45 · Weighted score: 73.7 / 100
Checks:
Thanks for participating! Scores reflect evaluation against the spec. Reply here if you have questions. |
Register three new runtimes via the plug-and-play YAML registry: - php: interpreted, /usr/bin/php - lisp: SBCL, bounded with --dynamic-space-size to fit nsjail rlimit_as - kotlin: kotlinc build + java run; JVM -XX flags bound the virtual reservation, and the thin jar (no -include-runtime) sidesteps nsjail's 1 MB RLIMIT_FSIZE by loading the host kotlin-stdlib on the classpath Install sbcl and the Kotlin compiler in the runtime image, and add matching payloads + the mixed rotation to the load tester. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Record the prompts, sandbox issues faced (SBCL ENOMEM, Kotlin JVM virtual reservation, Kotlin fat-jar RLIMIT_FSIZE), and their config-only solutions, plus the 10-language load-test results. Co-Authored-By: Claude Opus 4.8 <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.
goboxd
Team Members
HTTP Framework Choice
We chose the Go standard library's
net/httpframework (specifically using the improved routing capabilities ofServeMuxfrom Go 1.22) because it delivers raw, zero-dependency HTTP performance with minimal memory overhead.How to Run Locally
The project is configured to run fully isolated inside Docker. Spin up the Go daemon container by running
make run, which automatically builds and exposes the HTTP service on port8080. Run unit tests withmake test, integration/sandbox tests withmake integration, code quality checks withmake lint, and performance runs withmake load(refer to the projectMakefilefor target commands).System Architecture & Route Lifecycles
goboxd consists of three primary HTTP routes configured via a centralized configuration registry, validator layer, and concurrency pool scheduler:
graph TD Client[HTTP Client] --> Mux[net/http ServeMux] Mux -->|POST /run| RunH[RunHandler] Mux -->|GET /readyz| ReadyH[ReadyHandler] Mux -->|GET /info| InfoH[InfoHandler] RunH --> Val[validate package] RunH --> Reg[languages Registry] RunH --> Pool[worker.ConcurrencyPool] RunH --> Exec[executor package] Exec --> Sand[sandbox package] Sand --> NsJail[nsjail Binary] ReadyH --> Reg ReadyH --> ExecLook[exec.LookPath Check] InfoH --> Reg InfoH --> ReadyH InfoH --> Pool InfoH --> Stats[atomic Request Counter]Route Lifecycles
/tmpworkspace, and executes/evaluates compilation and execution runs inside isolatednsjailcontainers sequentially.nsjailbinary is present and executing dynamic smoke check command overrides (e.g., runtime--versionprobes) to verify toolchain responsiveness.Concurrency & Scheduling Architecture Highlights
goboxd uses a custom-built concurrency engine to manage heavy execution workloads under extreme spikes without crashing the host.
1. Shortest Job First (SJF) Min-Heap with Starvation Aging
To avoid head-of-line blocking from slow compiles/runs, pending requests are scheduled via a Min-Heap Priority Queue ordered by estimated execution cost:
To prevent heavy requests from starving indefinitely, we implement starvation prevention by dynamically subtracting an aging factor from the item's priority score:
The scheduler always pops the item with the lowest Priority Score first, ensuring all jobs modify priority and execute over time.
2. Load-Adaptive Resource Clamping
To survive massive traffic spikes, the server monitors incoming request rates over a sliding 10-second window. Once request rate
R > 5 req/sec, the validator dynamically clamps the upper limits allowed for request overrides:Clamped adjustments are returned to the client in a
warningsfield.3. Dynamic
Retry-AfterEstimationWhen concurrency reaches capacity (8 workers active + 500 queued), the server rejects new requests with a
503 Service Unavailable. Instead of a static guess, we estimate the queue clearing duration based on the moving average execution time (T_avg) of the last 100 successful runs, returning it in the HTTP headers:Security Fixes (7/7 Closed)
We resolved all seven security vulnerabilities with the following host and sandboxing boundaries:
/,\) or dot prefixes (.,..).osfilesystem APIs (os.MkdirTemp,os.RemoveAll,os.WriteFile) instead of string-formatted shell commands.cappedWriterto truncate process streams at 64 KiB with a clear marker, preventing host OOM.Languages Supported
All 7 in-scope languages are dynamically registered via YAML (Python 3, C, C++, Java, Bash, JavaScript, and Verilog) with support for customizable health probes.
Concurrency Benchmarks
Detailed latency percentiles and performance graphs under load are available in the [Concurrency Benchmarks Documentation](https://github.com/christiano-developer/goboxd/blob/team/greyapple/docs/benchmarks.md).