#13335
test(ci): darwin-only regressions outside the Apple artifact lane never run in CI
Summary
Test files that skip off macOS run in CI only when the apple-artifacts job names them. On main c1943f196, 47 of the 73 test files with a process.platform darwin gate are named by no workflow, so their darwin cases never run in CI.
Observed (main c1943f196)
grepforskipIf(process.platform !== "darwin")/runIf(process.platform === "darwin")finds 73 test files undersrc/andtests/. 47 of them do not appear in any.github/workflows/*.yml.- The only hosted macOS jobs are
apple-artifactsinci.yml, which runs a fixednpm run test:focused --list, and the darwin rows of the native package baseline, which run package verification rather than the test suite.real-hopper.ymlruns onlyverify:hopper. - At least these 16 files gate their top-level
describe, so no case runs anywhere in CI: tests/acceptance/applications/appBundleEncodingCli.test.tstests/acceptance/applications/nativePlistBinaryScalars.test.tstests/acceptance/applications/nativePlistNesting.test.tstests/boundary/cli/artifactArmSlicesCli.test.tstests/boundary/cli/nativeDispatchInputBudget.test.tstests/boundary/cli/nativeDispatchRecordBudget.test.tstests/boundary/cli/nativeMachoDylibIdentityCli.test.tstests/boundary/cli/nativeMachoEchoedPathCli.test.tstests/boundary/cli/nativeMachoEvidenceDeliveryCli.test.tstests/boundary/cli/nativeMachoLinkerOptionsCli.test.tstests/boundary/cli/nativeMachoMissingUuidCli.test.tstests/boundary/cli/nativeMachoObjectSegmentCli.test.tstests/boundary/cli/nativeSignatureCallerSelection.test.tstests/boundary/cli/rawDiskImageCli.test.tstests/boundary/mcp/artifactArmSlicesMcp.test.tstests/boundary/mcp/nativeDispatchBoundTarget.test.ts- Concrete case: #12744 added
tests/boundary/cli/nativeBundleExecutableProvenanceCliMcp.test.ts(darwin-only). Its CI was green while the file had never run. After it was added to theapple-artifactslist, it ran onmacos-15(38 instead of 37 files).
Source-derived reasoning
tests/boundary/filesystem/ciChangeScope.test.ts ("owns every explicit native-host test path with the lane that runs it") checks one direction only: every test the apple-artifacts step names must be owned by CI_LANES.apple. Nothing requires a darwin-gated test to be named by a macOS job, so a new darwin-only regression passes CI while never running.
Proposed check (not implemented)
- Add the reverse guard: every test file with a darwin gate is either named by a macOS job or listed in an explicit exemption list, with the reason it is manual-only.
- Decide which of the 47 belong in
apple-artifacts. Adding all of them costs macOS minutes, which is the trade-off for maintainers. A partly gated file such assrc/application/Doctor.test.tsmay intentionally keep its darwin cases manual.
I did not run the 47 files on macOS, so whether any currently fail is unknown.
I'd like to take the guard half of this, without deciding the lane question.
ciChangeScope.test.ts: every darwin-only test file is named by a macOS-hosted job or listed in a newMANUAL_DARWIN_TESTSinscripts/ci/scopes.mjswith a reason. Listed files must still be darwin-only and not already on macOS.apple-artifactslater.Two counting notes: reading
onDarwin-style aliases and|| process.archgates finds 3 more darwin-only files. Two files counted as covered are named only bywindows-curated, where their darwin cases skip too. On current main that's 49 unrun files.I'll open a PR in the next day or two unless you'd rather handle it.