Runner: start examples with requested user and group IDs#926
Closed
brandonpayton wants to merge 2 commits into
Closed
Runner: start examples with requested user and group IDs#926brandonpayton wants to merge 2 commits into
brandonpayton wants to merge 2 commits into
Conversation
Member
Author
|
Closing this focused source PR because its requested initial credential behavior is now carried by #934 at exact green head |
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.
What this does
#907 already landed the current PHP/runtime stack, including the mmap and munmap work that overlapped the old composite #769 branch. It did not connect the example runner to the initial credential support that already exists in the Node and browser hosts.
This PR keeps that one remaining piece.
run-example.tsnow readsKERNEL_UIDandKERNEL_GID, validates them as decimal guest IDs, and passes them to the normal host spawn path. A small guest probe checks the real and effective user and group IDs reported by the kernel.The host protocol uses
4294967295as “leave this credential unchanged,” so the runner rejects that value instead of silently starting the guest as root.4294967294remains a valid ID.Source: extracted from #769 commit
6d16dd548fe802eb5befce9895a188bdb0b9a8f7onto currentmain.What was deliberately removed
ABI and package impact
There is no ABI change. The existing host/kernel credential API and ABI 39 stay unchanged, and
scripts/check-abi-version.shreports the snapshot and generated bindings are current.There is no package-artifact change and no package revision bump. The added Wasm file is a test fixture built locally from source; it is not committed or published as a package output.
Validation
Passed through
scripts/dev-shell.shon implementation head7189b84985a837783c02e837b15b8c9f4ef9017c:bash build.shgit diff --checkThe first Linux CI Vitest run exposed that the new regression inherited the checkout's host ownership and group modes. The guest only needs to inspect its credentials, so the final test starts it in world-traversable
/tmpand reports child stderr on failure. The focused credential regression passed 9/9 throughscripts/dev-shell.shon final head471dc2335abe77c2c696f7bfc1d0cce529710ad7; the full CI rerun is in progress.Not run locally on the final test-only head: the full Vitest matrix, browser Playwright or manual browser checks, libc/POSIX/Sortix conformance, package builds, or performance benchmarks. This is Node-only example-runner wiring over an existing cross-host spawn contract; it does not change kernel or browser behavior. No performance claim is made.