fix(release): keep offline pack outputs owned by the runner - #58
Merged
Conversation
48 tasks
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.
The protected preview workflow packs inside
sudo unshare --net, leaving root-owned output that the runner cannot extend withpylon-preview-channel-v1.json. Both packs in run 34612399794 failed with EACCES before signing or publication.Restore the invoking sudo UID/GID before the release entrypoint writes its receipt or starts build subprocesses. Validate both IDs, clear supplementary groups, drop group/user identity permanently, and verify the real/effective IDs. Ordinary non-sudo invocations retain their identity. Network isolation, artifact recipe, and immutable policy-2 workflow bytes remain unchanged.
Validation: 14 focused release tests, required checks and normal commit hook pass. An actual Linux sudo/env/unshare/npm probe reproduces the root-owned EACCES and passes after the fix, proving inherited isolated network namespace, runner identity in child processes, and inability to regain root. The complete repository on Node22.23.2/npm11.10.1 then passes offline pack → artifact verification → preview preparation → preview verification, with all output parents and six subjects owned by the runner. Scoped architecture review passed and is bound to the exact committed file hashes. CI 34614674247 passed on head
836e352141d2bf89e3b6f68c7cfc49e7e1b18b9b: both Ubuntu 24.04 and macOS 15 passed 203 core tests, 28 stress tests, all 3,034 captured-process crash cuts and the actual 16 MiB maximum. Downloaded artifacts independently confirm tree8cb004d49b24f7f9a8891d8d734e750c596edc63, Node 22.23.2, every ordered crash trace/hash and zero failures, cancellations, skips or todo tests in those publication suites. Artifact reproducibility and both installed smoke gates also passed. Local pack proof remains unsigned; protected publication is a separate next step.Follow-up to #56 for managed publication tracked in pylon-code/pylon#114. No release credentials, approval gates, signing code, or workflow-policy digests change.
Implemented with GPT-6 using Codex in Pylon.