test: run the last manual macOS Seatbelt spot-checks in CI - #16
Merged
Conversation
…ript "Real hardware" stopped being a meaningful distinction when the macos-runtime job started running this script on macos-latest: the runner is real macOS with real sandbox-exec and mount_nfs. The two remaining manual items were automation debt, not hardware requirements. Two new legs in macos-nfs-git-validation.sh: a session homed and based under directories with spaces and a double quote in their names must mount and run (every parameterized Seatbelt path exercised; a regression back to profile string interpolation fails), and vfs run must exit 127 for a missing command and 126 for a present but non-executable one, matching the Linux run path and the reserved-exit-status contract. The manual macOS list in TESTING.md and the AGENTS.md gotcha shrink to the one honest gap: shell suites other than the remote pair have no macOS runtime coverage until made platform-aware the same way. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
…mands The new CI exit-parity leg caught a real contract violation on its first run: vfs run of a missing command exited 71 on macOS. The sandbox wrapper always spawns because /usr/bin/sandbox-exec is a pinned system binary, so spawn_error_exit_code never fired; sandbox-exec itself failed to exec the target and reported EX_OSERR, which passed through as the session's exit status. Linux never had the problem because it execs the target directly and maps the io error. The darwin run path now resolves the target the way sandbox-exec's execvp will — bare names search PATH (read through the config edge), slashed paths resolve against the child's working directory, an empty PATH entry means the working directory — and exits with the reserved status before mounting a child: 127 not found, 126 present but not executable. Both the owner and joiner paths preflight; the owner unmounts before exiting so no stale mount is left behind. Unit tests cover the resolution table; the validation script leg asserts the end-to-end statuses in CI. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
The macos-latest clippy wall denies redundant_static_lifetimes, and the darwin module only compiles there. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.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.
The macos-runtime job already runs
macos-nfs-git-validation.shon macos-latest, which is real macOS with real Seatbelt andmount_nfs— so the two spot-checks docs/TESTING.md still assigned to "real hardware" were automation debt. This PR makes them script legs:home with "quote"and based underbase with "quote" dir, so every(param "NAME")/-D NAME=valuepath on the sandbox-exec command line carries spaces and a double quote. Mount + write + read-back must succeed.vfs run /nonexistent…must exit 127 and a present-but-non-executable file must exit 126, per the reserved startup exit-status contract.Docs shrink accordingly: the only remaining macOS gap is that shell suites beyond the remote pair aren't platform-aware yet, and TESTING.md now says exactly that instead of pointing at a laptop.
Validation:
bash -nclean; on Linux the script still self-skips with exit 77. The macOS legs are what this PR's macos-runtime job run is for.