Skip to content

# macOS scenario prep reliability + VS Code spdlog compatibility#79

Merged
jewilder merged 1 commit into
microsoft:mainfrom
philnach:macos-fixes-20260522
May 23, 2026
Merged

# macOS scenario prep reliability + VS Code spdlog compatibility#79
jewilder merged 1 commit into
microsoft:mainfrom
philnach:macos-fixes-20260522

Conversation

@philnach
Copy link
Copy Markdown
Member

Summary

This PR fixes a set of reliability issues in macOS developer scenarios that caused intermittent prep failures and environment drift, and hardens the VS Code prep flow for Darwin 25+ toolchains.

Primary outcomes:

  • Eliminates intermittent mac_foundrylocal setup timeout behavior.
  • Makes mac_vscode prep resilient across package-layout drift and repeated runs.
  • Improves diagnostics for mac_net_aspire prep failures.
  • Aligns mac_opencv_build with OpenCV 4.10-compatible FFmpeg major versioning.
  • Adds safer resource-copy behavior for scripts that may execute from target resource folders.

Problem

We observed several macOS issues during repeated lab runs:

  • mac_foundrylocal: setup could complete but RPC timed out due to inherited stdio from background service launch.
  • mac_vscode: @vscode/spdlog build failed on Darwin 25+ (consteval/fmt compatibility path), with patch flow brittle to minor file/layout drift.
  • mac_net_aspire: prep failure (ConfigurationSchema regeneration) was not actionable because build output was not captured.
  • mac_opencv_build: OpenCV 4.10 build failures in FFmpeg integration path due to API mismatch with newer Homebrew FFmpeg.
  • Resource copy blocks in mac scripts could fail or behave incorrectly when source == destination (script launched from resource folder).

What changed

mac_foundrylocal

  • Updated service startup in mac_foundrylocal_setup.sh to fully detach process stdio from the invoking shell/RPC context.
  • Goal: avoid setup completion followed by host-side timeout waiting on inherited file handles.

mac_vscode

  • Reworked prep flow in mac_vscode_prep.sh:
    • npm install --ignore-scripts first.
    • Check if core.h is already in compatible state (FMT_CONSTEVAL constexpr) and skip patching when already compatible.
    • Apply checked-in patch artifact when needed: spdlog_fmt_darwin25.patch.
    • Add tolerant verified fallback edit when patch hunks do not apply cleanly due to minor context drift.
    • Rebuild @vscode/spdlog, then run final npm install.
  • Added patch artifact file:
    • scenarios/macos/mac_vscode/mac_vscode_resources/spdlog_fmt_darwin25.patch
  • Added resource-copy guard to avoid self-copy failure when running from target resource dir.

mac_net_aspire

  • Updated mac_net_aspire_prep.sh to capture full build output to dedicated log and include failure context in prep log.
  • Goal: failures are immediately diagnosable instead of generic "regeneration failed".

mac_opencv_build

  • Updated prep to install/use FFmpeg 6 pathing for OpenCV 4.10 compatibility and log the resolved FFmpeg/libavcodec version.
  • Goal: avoid FFmpeg API mismatch errors in build path while keeping scenario intent stable.

mac_pytorch_inf

  • Added source==destination resource-copy guard in mac_pytorch_inf_prep.sh.
  • Goal: avoid self-copy issues when prep executes from resource folder.

Prep version bumps

Prep versions were incremented for updated scenarios so DUTs re-run prep and pick up script changes.

Files changed

  • scenarios/macos/mac_foundrylocal/mac_foundrylocal_resources/mac_foundrylocal_setup.sh
  • scenarios/macos/mac_net_aspire/mac_net_aspire.py
  • scenarios/macos/mac_net_aspire/mac_net_aspire_resources/mac_net_aspire_prep.sh
  • scenarios/macos/mac_opencv_build/mac_opencv_build.py
  • scenarios/macos/mac_opencv_build/mac_opencv_build_resources/mac_opencv_build_prep.sh
  • scenarios/macos/mac_pytorch_inf/mac_pytorch_inf.py
  • scenarios/macos/mac_pytorch_inf/mac_pytorch_inf_resources/mac_pytorch_inf_prep.sh
  • scenarios/macos/mac_vscode/mac_vscode.py
  • scenarios/macos/mac_vscode/mac_vscode_resources/mac_vscode_prep.sh
  • scenarios/macos/mac_vscode/mac_vscode_resources/spdlog_fmt_darwin25.patch

Validation

  • Targeted macOS scenario verification was run on lab hardware.
  • Per run verification, all targeted scenarios now pass after these fixes.

@jewilder jewilder merged commit 3d4c0bb into microsoft:main May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants