fix(ci): avoid app-host rsync metadata failures

TE
3d ago
+39-13

Summary

App-host framework staging can fail on reused macOS runners when rsync tries to restore source mtimes with utimensat, and enumeration can leave an app-host child without the receipt identity cleanup requires.

This change makes framework staging metadata-neutral with rsync --no-times across the app-host paths and forwards the isolated app-host receipt identity through enumeration's Xcode invocation.

Changelog

Fixed app-host CI staging and cleanup on reused macOS runners.

Validation

  • python3 tests/test_ci_console_session_env_forwarding.py
  • python3 tests/test_ci_app_host_home_isolation.py
  • bash tests/test_ci_app_host_xcodebuild_retry.sh
  • python3 tests/test_ci_change_areas.py -k macos_compile_admission_precedes_expensive_shards
  • Bash syntax checks and git diff --check

The source runner investigation found no root-owned files, immutable flags, or ACLs in the failed isolation/package paths. The failure was in mtime preservation plus missing enumeration receipt identity.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes app-host CI staging and cleanup failures on reused macOS runners.

  • Adds --no-times to all app-host rsync calls so mtime restoration no longer fails with EPERM on framework files left by a previous runner account.
  • Forwards the isolated app-host receipt identity through Xcode's TEST_RUNNER_ environment during enumeration so cleanup can prove ownership of an orphaned app-host child.

[!NOTE]
Low Risk
CI-only staging and test-enumeration env forwarding; no production app or auth paths.

Overview
App-host CI now stages CmuxAgentJournal package frameworks with rsync --no-times everywhere those copies are made (workflows, restore-app-host-test-product.sh, run-app-host-xcodebuild.sh). That skips mtime restoration via utimensat, which was raising EPERM on reused macOS runners when framework files were readable but owned by another account.

When CMUX_CI_APP_HOST_ISOLATION_REQUIRED=1, enumerate-app-host-tests.sh injects the same isolated app-host receipt and home identity through TEST_RUNNER_* env vars before xcodebuild -enumerate-tests, so post-run cleanup can attribute stray app-host children the same way as full test batches.

Workflow contract tests were updated to expect the new rsync flags.

Reviewed by Cursor Bugbot for commit 6390049d01ef1fb541724124c63733cb402250aa. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the consistency of macOS app packaging by preventing copied frameworks from retaining source timestamps.
    • Improved app-host test setup in isolated CI environments, helping test enumeration run with the required environment settings.