refactor(platform): give the host platform one owner and ratchet ambient process.platform reads (#10911)

* refactor(platform): give the host platform one owner and ratchet ambient process.platform reads

* refactor(process): pass the host platform to process sampling instead of reading it ambiently

#10755 added two process.platform reads (ps selection in process sampling and the
desktop build doctor's ps fact) after the host-platform ratchet was measured.
The desktop fact already receives the host platform from doctor; process sampling
now receives it from the capture harness, removing all five ambient reads there.
This commit is contained in:
morluto authored and GitHub committed 2026-11-15 17:42:23 +08:00
1 parent c36649a674
commit 2caedcfb57
11 files changed
+217 -16

No files matched your search

+3 -2
View File
@@ -14,6 +14,7 @@ import { AnalysisProviderRegistry } from "../application/binary/AnalysisProvider
import { composeBinarySession } from "../application/binary/BinarySessionComposition.js";
import { LazyAnalysisProvider } from "../application/binary/LazyAnalysisProvider.js";
import { ManagedStaticProvider } from "../dotnet/ManagedStaticProvider.js";
import { HOST_PLATFORM } from "../platform/HostPlatform.js";
import {
BUNDLE_ARTIFACT_RESOURCE_OPERATIONS,
BUNDLE_NATIVE_RESOURCE_OPERATIONS,
@@ -69,7 +70,7 @@ const composeDeepBinarySession = (
});
const auxiliaryDeclarations = auxiliaryAnalysisProviderDeclarations(
environment,
process.platform,
HOST_PLATFORM.platform,
settings,
);
const nativeInspectionAvailable =
@@ -88,7 +89,7 @@ const composeDeepBinarySession = (
auxiliaryDeclarations.map(
(declaration) => new LazyAnalysisProvider(declaration),
),
createBundleResourceFactory(environment, process.platform, settings),
createBundleResourceFactory(environment, HOST_PLATFORM.platform, settings),
);
};