Merge branch 'master' into opt/win-ssache
Project CI / Backend tests (pull_request) Successful in 6m4s
Project CI / Native shell tests (pull_request) Successful in 5m46s
Project CI / Frontend tests (pull_request) Successful in 3m13s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m9s
Project CI / Repository checks (pull_request) Successful in 2m28s
Project CI / AI game creator shell Rust tests (pull_request) Successful in 13m24s

This commit is contained in:
2026-09-14 16:30:03 +08:00
+106 -125
View File
@@ -136,12 +136,11 @@ function runsNativeShellGateGroup(group) {
return requestedNativeShellGroups.includes(group);
}
function runNativeShellGate(group, label, gate) {
function runNativeShellGate(group, gate) {
if (!runsNativeShellGateGroup(group)) {
return;
}
console.log(`[check:native-shells] ${label}`);
gate();
}
@@ -227,11 +226,14 @@ function assertRootNativeShellCheckScripts() {
}
}
runNativeShellGate(
'contract',
'root-native-shell-check-scripts',
assertRootNativeShellCheckScripts,
);
// 每个门禁在自己的执行体里打印 `[check:native-shells] <label>`:这些 label 是字面量,
// 壳侧的 check-config(如 apps/desktop-shell/scripts/check-config.mjs 对
// desktop-release-binary-artifact 的校验)会按字面量断言它们仍然存在,因此不要把
// label 抽成变量或挪进公共打印函数。
runNativeShellGate('contract', () => {
console.log('[check:native-shells] root-native-shell-check-scripts');
assertRootNativeShellCheckScripts();
});
function assertNativeShellDependencyVersionGuardrails() {
for (const snippet of [
"const rootPackageLockPath = new URL('../../../package-lock.json', import.meta.url)",
@@ -279,11 +281,12 @@ function assertNativeShellDependencyVersionGuardrails() {
}
}
runNativeShellGate(
'contract',
'native-shell-dependency-version-guardrails',
assertNativeShellDependencyVersionGuardrails,
);
runNativeShellGate('contract', () => {
console.log(
'[check:native-shells] native-shell-dependency-version-guardrails',
);
assertNativeShellDependencyVersionGuardrails();
});
const h5HostBridgeCallChainWrapperFiles = [
'src/hooks/useHostNavigationCanGoBack.ts',
'src/components/platform-entry/platformProfileHostClipboard.ts',
@@ -5162,140 +5165,118 @@ for (const step of steps) {
}
}
runNativeShellGate(
'release',
'desktop-release-binary-artifact',
assertDesktopReleaseBinaryArtifact,
);
runNativeShellGate('release', () => {
console.log('[check:native-shells] desktop-release-binary-artifact');
assertDesktopReleaseBinaryArtifact();
});
runNativeShellGate(
'contract',
'host-bridge-layer-layout',
assertHostBridgeLayerLayout,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] host-bridge-layer-layout');
assertHostBridgeLayerLayout();
});
runNativeShellGate(
'contract',
'native-shell-capability-plan',
assertNativeShellCapabilityPlan,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] native-shell-capability-plan');
assertNativeShellCapabilityPlan();
});
runNativeShellGate(
'contract',
'external-url-protocol-parity',
assertExternalUrlProtocolParity,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] external-url-protocol-parity');
assertExternalUrlProtocolParity();
});
runNativeShellGate(
'contract',
'wechat-mini-program-route-parity',
assertWechatMiniProgramRouteParity,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] wechat-mini-program-route-parity');
assertWechatMiniProgramRouteParity();
});
runNativeShellGate(
'contract',
'wechat-mini-program-capability-flows',
assertWechatMiniProgramCapabilityFlows,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] wechat-mini-program-capability-flows');
assertWechatMiniProgramCapabilityFlows();
});
runNativeShellGate(
'contract',
'expo-mobile-capability-flows',
assertExpoMobileCapabilityFlows,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] expo-mobile-capability-flows');
assertExpoMobileCapabilityFlows();
});
runNativeShellGate(
'contract',
'tauri-desktop-capability-flows',
assertTauriDesktopCapabilityFlows,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] tauri-desktop-capability-flows');
assertTauriDesktopCapabilityFlows();
});
runNativeShellGate(
'contract',
'h5-native-app-route-flows',
assertH5NativeAppRouteFlows,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] h5-native-app-route-flows');
assertH5NativeAppRouteFlows();
});
runNativeShellGate(
'contract',
'wechat-payment-result-boundaries',
assertWechatPaymentResultBoundaries,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] wechat-payment-result-boundaries');
assertWechatPaymentResultBoundaries();
});
runNativeShellGate(
'contract',
'wechat-auth-failure-boundaries',
assertWechatAuthFailureBoundaries,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] wechat-auth-failure-boundaries');
assertWechatAuthFailureBoundaries();
});
runNativeShellGate(
'contract',
'wechat-web-view-page-event-boundaries',
assertWechatWebViewPageEventBoundaries,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] wechat-web-view-page-event-boundaries');
assertWechatWebViewPageEventBoundaries();
});
runNativeShellGate(
'contract',
'wechat-share-grid-failure-boundaries',
assertWechatShareGridFailureBoundaries,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] wechat-share-grid-failure-boundaries');
assertWechatShareGridFailureBoundaries();
});
runNativeShellGate(
'contract',
'desktop-navigation-event-boundaries',
assertDesktopNavigationEventBoundaries,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] desktop-navigation-event-boundaries');
assertDesktopNavigationEventBoundaries();
});
runNativeShellGate(
'contract',
'h5-host-bridge-event-subscription-gates',
assertH5HostBridgeEventSubscriptionGates,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] h5-host-bridge-event-subscription-gates');
assertH5HostBridgeEventSubscriptionGates();
});
runNativeShellGate(
'contract',
'h5-host-bridge-payload-boundaries',
assertH5HostBridgePayloadBoundaries,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] h5-host-bridge-payload-boundaries');
assertH5HostBridgePayloadBoundaries();
});
runNativeShellGate(
'contract',
'h5-native-app-transport-timeout-boundaries',
assertH5NativeAppTransportTimeoutBoundaries,
);
runNativeShellGate('contract', () => {
console.log(
'[check:native-shells] h5-native-app-transport-timeout-boundaries',
);
assertH5NativeAppTransportTimeoutBoundaries();
});
runNativeShellGate(
'contract',
'h5-native-app-message-source-boundaries',
assertH5NativeAppMessageSourceBoundaries,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] h5-native-app-message-source-boundaries');
assertH5NativeAppMessageSourceBoundaries();
});
runNativeShellGate(
'contract',
'h5-native-app-transport-facade-boundary',
assertH5NativeAppTransportFacadeBoundary,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] h5-native-app-transport-facade-boundary');
assertH5NativeAppTransportFacadeBoundary();
});
runNativeShellGate(
'contract',
'generated-native-shell-artifact-boundary',
() => {
assertNoTrackedGeneratedNativeShellArtifacts();
assertGeneratedNativeShellArtifactsAreIgnored();
},
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] generated-native-shell-artifact-boundary');
assertNoTrackedGeneratedNativeShellArtifacts();
assertGeneratedNativeShellArtifactsAreIgnored();
});
runNativeShellGate(
'contract',
'ai-game-creator-shell-user-dev-boundary',
assertAiGameCreatorShellUserDevBoundary,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] ai-game-creator-shell-user-dev-boundary');
assertAiGameCreatorShellUserDevBoundary();
});
runNativeShellGate(
'contract',
'production-shell-dev-scaffold-scan',
assertNoProductionShellDevScaffoldTerms,
);
runNativeShellGate('contract', () => {
console.log('[check:native-shells] production-shell-dev-scaffold-scan');
assertNoProductionShellDevScaffoldTerms();
});
console.log(
`[check:native-shells] groups=${requestedNativeShellGroups.join(',')}`,