#13335

test(ci): darwin-only regressions outside the Apple artifact lane never run in CI

OpenN0zoM1z0opened 3d ago

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)

  • grep for skipIf(process.platform !== "darwin") / runIf(process.platform === "darwin") finds 73 test files under src/ and tests/. 47 of them do not appear in any .github/workflows/*.yml.
  • The only hosted macOS jobs are apple-artifacts in ci.yml, which runs a fixed npm run test:focused -- list, and the darwin rows of the native package baseline, which run package verification rather than the test suite. real-hopper.yml runs only verify:hopper.
  • At least these 16 files gate their top-level describe, so no case runs anywhere in CI:
  • tests/acceptance/applications/appBundleEncodingCli.test.ts
  • tests/acceptance/applications/nativePlistBinaryScalars.test.ts
  • tests/acceptance/applications/nativePlistNesting.test.ts
  • tests/boundary/cli/artifactArmSlicesCli.test.ts
  • tests/boundary/cli/nativeDispatchInputBudget.test.ts
  • tests/boundary/cli/nativeDispatchRecordBudget.test.ts
  • tests/boundary/cli/nativeMachoDylibIdentityCli.test.ts
  • tests/boundary/cli/nativeMachoEchoedPathCli.test.ts
  • tests/boundary/cli/nativeMachoEvidenceDeliveryCli.test.ts
  • tests/boundary/cli/nativeMachoLinkerOptionsCli.test.ts
  • tests/boundary/cli/nativeMachoMissingUuidCli.test.ts
  • tests/boundary/cli/nativeMachoObjectSegmentCli.test.ts
  • tests/boundary/cli/nativeSignatureCallerSelection.test.ts
  • tests/boundary/cli/rawDiskImageCli.test.ts
  • tests/boundary/mcp/artifactArmSlicesMcp.test.ts
  • tests/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 the apple-artifacts list, it ran on macos-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 as src/application/Doctor.test.ts may intentionally keep its darwin cases manual.

I did not run the 47 files on macOS, so whether any currently fail is unknown.

Activity

1
JohnnyWilson163d ago

I'd like to take the guard half of this, without deciding the lane question.

  • Reverse check in ciChangeScope.test.ts: every darwin-only test file is named by a macOS-hosted job or listed in a new MANUAL_DARWIN_TESTS in scripts/ci/scopes.mjs with a reason. Listed files must still be darwin-only and not already on macOS.
  • Seed the list with today's unrun files marked "lane decision pending", so no macOS minutes are added and you can move files onto apple-artifacts later.

Two counting notes: reading onDarwin-style aliases and || process.arch gates finds 3 more darwin-only files. Two files counted as covered are named only by windows-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.