# #75 / #76 / #66 の隔離再現 macOS 27、Xcode 27、arm64、Swift 6、採用依存を使ったRelease build-for-testingを前提とする。合成メディアのみを使い、利用者のライブラリは入力しない。計測中に他のbuild/testを同時実行しない。 ```bash export SMP_REPO=/path/to/simple-media-player export SMP_WORK=/private/tmp/smp-repro export SMP_DERIVED_DATA="$SMP_REPO/.build/Issue75DerivedData" export SMP_MEDIA="$SMP_WORK/media" export SMP_PCM_CACHE="$SMP_WORK/pcm-cache" export LLVM_PROFILE_FILE="$SMP_WORK/probe-%p.profraw" mkdir -p "$SMP_WORK" cp -R /path/to/repro/. "$SMP_WORK/" cd "$SMP_REPO" xcodebuild build-for-testing -scheme SimpleMediaPlayer -destination 'platform=macOS' -configuration Release -derivedDataPath "$SMP_DERIVED_DATA" -clonedSourcePackagesDirPath "$SMP_REPO/.build/SourcePackages" -skipPackagePluginValidation -parallel-testing-enabled NO CODE_SIGNING_ALLOWED=NO ENABLE_TESTABILITY=YES > "$SMP_WORK/release-build.log" 2>&1 bash "$SMP_WORK/make-media.sh" "$SMP_MEDIA" python3 "$SMP_WORK/build-converter.py" "$SMP_WORK/converter" "$SMP_MEDIA/source.wav" "$SMP_MEDIA/track.ape" "$SMP_WORK/converter" "$SMP_MEDIA/source.wav" "$SMP_MEDIA/track.mpc" python3 "$SMP_WORK/build-service-probe.py" before python3 "$SMP_WORK/build-service-probe.py" after "$SMP_WORK/service-probe-before" "$SMP_WORK/cold-before.json" "$SMP_WORK/service-probe-after" "$SMP_WORK/cold-after.json" "$SMP_WORK/service-probe-after" "$SMP_WORK/tail-after.json" tail ``` beforeは既定で88f559cのAudioEngineServiceだけを取得し、afterは作業ツリーを使う。別revisionは `SMP_BEFORE_REVISION` で指定する。計測sourceのmark/mixer tapと互換PCMcache保存先だけを差し替える。converterは採用SFBAudioEngineのAPE書込みcallbackにNULL checkを加えた隔離objectをlinkする。SourcePackages内の採用依存は変更しない。ffmpegのpink/brown noise生成はseed未固定で、波形そのものを旧資材と一致させる用途には使えない。 #76はWAV adapter版と実再生統合版を用意する。完了前の `task.value` awaitは解析utilityのpriorityを昇格させるので、Controller.statusをsleepで観測する。 ```bash bash "$SMP_WORK/build-music.sh" "$SMP_WORK/music-probe" "$SMP_MEDIA/source.wav" "$SMP_WORK/music-default.json" env LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 "$SMP_WORK/music-probe" "$SMP_MEDIA/source.wav" "$SMP_WORK/music-strict.json" env LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 "$SMP_WORK/music-probe" "$SMP_MEDIA/source.wav" "$SMP_WORK/music-strict-control.json" control xcrun xctrace record --template 'Swift Concurrency' --instrument 'Time Profiler' --time-limit 35s --output "$SMP_WORK/music-strict.trace" --env LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 --target-stdout "$SMP_WORK/music-strict-trace.log" --no-prompt --launch -- "$SMP_WORK/music-probe" "$SMP_MEDIA/source.wav" "$SMP_WORK/music-strict-trace.json" xcrun xctrace export --input "$SMP_WORK/music-strict.trace" --xpath '/trace-toc/run[@number="1"]/data/table[@schema="SwiftTaskStateTable"]' > "$SMP_WORK/music-strict-tasks.xml" xcrun xctrace export --input "$SMP_WORK/music-strict.trace" --xpath '/trace-toc/run[@number="1"]/data/table[@schema="time-profile"]' > "$SMP_WORK/music-strict-profile.xml" python3 "$SMP_WORK/analyze-trace.py" tasks "$SMP_WORK/music-strict-tasks.xml" python3 "$SMP_WORK/analyze-trace.py" profile "$SMP_WORK/music-strict-profile.xml" ``` 同じswiftc flagsは本体のMainActor既定/Approachable Concurrencyに合わせている。WAV adapterは既読込可能な音声の解析だけを対象とし、decode/normalize負荷は統合版で補う。解析cacheはnil。結果ready・pace/tempo件数も記録し、解析skipと区別する。トレース下のtimingは非トレースの中央値と混ぜない。 #66は専用process名とsuiteを一致させる。起動時にBundle識別子nil・process名・標準defaultsの専用domainを照合する。defaultDirectoryだけを隔離cacheへ差し替え、実際のentryURL自動移行を通す。標準アプリdomainへはseedしない。 ```bash python3 "$SMP_WORK/build-legacy.py" ``` 旧sourceは6889bd1から取得する。256/256一致、再計測0、旧key削除、gainファイル256件をassertし、専用domainを削除する。実利用者データや実機での聴き比べはこの再現に含まれない。 実再生統合版(正規化ON、cold WV、前曲再生1.5秒後にController解析と次曲load/playを同時開始): ```bash export SMP_INTEGRATED_GAINS="$SMP_WORK/integrated-gains" python3 "$SMP_WORK/build-integrated.py" integrated env LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 "$SMP_WORK/service-probe-integrated" "$SMP_WORK/integrated-strict.json" env LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 "$SMP_WORK/service-probe-integrated" "$SMP_WORK/integrated-control.json" control ``` 不採用のexecutor preference候補も比較できる。現行Controllerのanalyze呼び出し全体だけをtemporary sourceで囲む。永続sourceやユーザー設定は変更しない。候補が既に製品へ入っているrevisionではassertで停止する。 ```bash python3 "$SMP_WORK/build-integrated-preferred.py" preferred env LIBDISPATCH_COOPERATIVE_POOL_STRICT=1 "$SMP_WORK/service-probe-preferred" "$SMP_WORK/preferred-strict.json" ``` 実コンパイルsourceのsnapshotと来歴は `source-snapshots/` と `source-provenance.md` に保存している。`SHA256SUMS` は再現資材と証跡のハッシュ一覧である。