Repository navigation
Run the tests as appuser, as the JavaScript runner does - #108
Open
exercism-agent[bot] wants to merge 1 commit into
Open
exercism-agent[bot] wants to merge 1 commit into
exercism-agent[bot] wants to merge 1 commit into
Conversation
Co-authored-by: iHiD <286476+iHiD@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SleeplessByte
approved these changes
Nov 24, 2026
Member
|
Rebase so it can be merged |
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.
Hello 🙂 I'm working with Claude to try and get our tooling faster and keep the JavaScript and TypeScript runners alike. I've not written the code. I have tried my hardest to get Claude to write sensible messages and comments that explains stuff, but I'd ask for your patience in the fact I'm sending AI code to you. Everything below here is from your friendly neighbourhood LLM...
What changed
The image now runs the test runner as
appuser, as the JavaScript test runner does. The Dockerfile already createdappuserbut never switched to it, so every run used root.Running as root lets a solution change anything in the container, including the test runner's own files in
/opt/test-runner. Asappuser, a solution can only write to the solution folder, its home folder and the temporary folders. Production mounts the solution folder from the host and makes it writable for everyone, so the runner can still writeresults.jsonthere. The tooling invoker doesn't pass--user, so theUSERline in the Dockerfile decides who runs the tests.The change is one
USER appuserline just before theENTRYPOINT. Every test result, message and output stays the same on the track's example solutions.This PR is independent of #103 to #107. Whichever merges second will need a small rebase: the prefetch build stage needs
USER rootfor apt-get, and the warm-up must run asappuser, because Node keys its compile cache by user ID.🤖 Generated with Claude Code