feat: validate ios RN particle metal path
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
tei
2026-09-18 22:21:00 +09:00
parent bdd7f40f90
commit d8bb9f547b
21 changed files with 553 additions and 25 deletions

View File

@@ -32,3 +32,9 @@
## 下一步
STEP-082 已关闭。远端发布仍未执行,manifest 的 artifact URL 保持 `LOCAL_BUILD`;后续发布必须另行上传并以发布后的 URL/校验结果更新 release 元数据。STEP-083 不因本记录自动开始。
## STEP-083 post-close correction(2026-09-18)
本段追加纠正,不改写上方当时的历史记录。后续真实 RN device 验证确认,上方使用裸 `bazel build //platform/ios:MapLibre.dynamic` 取得的默认 OpenGL artifact(`24639200` bytes,SHA-256=`64faa174c5c0dc0a2da3e289f0beaf2dedf7298665e3345f39836729b668e239`,source commit `136ed726…`)只有色场、没有 Particle render,故作废且不再作为 iOS Particle 发行基线。
iOS Particle 发行固定改用 `bazel build --//:renderer=metal //platform/ios:MapLibre.dynamic`。Metal XCFramework 为 `24943196` bytes,SHA-256=`ae88975fc20f4d9961b95079638d0e9c0d8e61d4394d5c0a8ffcc48d173a827f`,source commit=`bdd7f40f9029031816c9bf4db6e1cd6c7c69b7bd`。其 device binary 含 `MLNMapView`、Metal/`MTLDevice`/`ParticleGPU` 标记且无 OpenGL marker;Pleiades iPad mini 5 RN Test Host signed Release 安装后,用户已确认粒子恢复。artifact 仍为本地构建,URL 保持 `LOCAL_BUILD`。

View File

@@ -0,0 +1,40 @@
# STEP-083 iOS RN 统一 FieldRuntime / TurboModule / Fabric 与 XCFramework 消费 v1
状态:`IMPLEMENTED / IOS_CORE_PATH_PASS / WAITING_FINAL_CONTROL_REGRESSION`
## 基线与范围
- branch:`particle/main`;开始 HEAD:`bdd7f40f9029031816c9bf4db6e1cd6c7c69b7bd`。
- STEP-082 public facade 与 `//platform/ios:MapLibre.dynamic` Bazel build 已由 RDC 真实验证 PASS。
- 本批次仅增加 RN package iOS bridge/pod/codegen/autolinking、Test Host iOS identity 和记录;没有修改 Android、Shared Core、QBIN contract、renderer、NavSea 或 frozen TS public API。
## 已实现
- `WeatherRuntimeBridge` 是 RN 0.85.2 codegen TurboModule:`NativeWeatherRuntimeBridgeSpecJSI`、Promise `resolve/reject` ABI 及 package `ios.modulesProvider` 均使用当前本地 RN 0.85.2 source 的真实 pattern。
- 每个 Map command 先校验正整数 `reactTag`,再通过 RN 注入的当前 Fabric/UIManager `viewRegistry_DEPRECATED` 进入 UI block,重新确认 `MLRNMapViewComponentView` → `contentView` → `MLRNMapView` → public `MLNMapView`。不缓存 tag、map、Core pointer 或建立第二 registry。
- V3、V4、runtime state、weather/particle visibility、timeline、binding 与所有视觉命令均映射到现有 public `MLNParticleFieldRuntime`。V3 `clearWindFields` 的 Android 语义本身等价 `clearFields`。
- V3/QBIN file ingress 均只接收 absolute path 或 `file://`,要求 readable regular file、1..64 MiB,并比较读前后 length;metadata、contract、UTF-8 identifier、safe integer 与 inactive `(0,0)` selector 同 Android guard。
- pod 只 dependency `MapLibreReactNative 11.3.6`,不声明 MapLibre pod/framework/SPM product。MLRN 11.3.6 的真实 `$MLRN_SPM_SPEC` 将唯一 `MapLibre` product 注入 Pods 和 app target。
## RDC 实际 iOS 验证(2026-09-18)
- RDC 已实际执行 npm dependency install(`npm ci`)、typecheck、RN codegen、Expo prebuild、Pod integration、device arm64 build、signed Release build 与安装。MapLibre.framework 签名成功。
- Test Host 消费的是 single MapLibre SPM product;未发现第二份 MapLibre binary。新 XCFramework 必须以 Metal 命令 `bazel build --//:renderer=metal //platform/ios:MapLibre.dynamic` 生成。默认裸 Bazel 命令的 OpenGL artifact 只有色场、无粒子,已由 STEP-082 post-close correction 作废。
- Pleiades iPad mini 5 上 signed Release 安装运行。一次 V4 Wind load 实际观察到 `clearAllEncodedFields` → color binding → particle binding → T0 `ACCEPTED_INSERTED` → T1 `ACCEPTED_INSERTED` → midpoint seek;用户确认粒子恢复。
## 尚未逐按钮回归
- PLAY/PAUSE、clear selected、clear all、detach/re-attach 尚未逐按钮实测;不得将本 Step 标为完成,也不得把单次 V4 load 扩写为完整控制面验收。
## 已执行检查
- `ruby -c packages/maplibre-particle-rn/MapLibreParticleRN.podspec`:成功。
- `npm ci`、typecheck、RN codegen、Expo prebuild、Pod integration、device arm64 build、signed Release build/installation:均由 RDC 实际执行;Release 日志为 `BUILD SUCCEEDED`。
- `npm pack --dry-run --json --cache /private/tmp/step083-npm-cache`:成功,tgz 清单包含 podspec、`ios/WeatherRuntimeBridge.h/.mm`、既有 Android 与 `src`。
- package `codegenConfig.ios.modulesProvider.WeatherRuntimeBridge` 静态检查和 Native Spec 34 个方法与 ObjC++ 34 个实现逐项计数完成。
## RDC 下一步
1. 用同一个 `App.tsx` 逐按钮完成 PLAY/PAUSE、clear selected/all、detach/re-attach;同时复核 style-not-ready smoke。
2. 继续维持 MLRN/App/Particle 的 single `MapLibre` product,禁止为 Particle pod 引入独立 framework。
3. 所有后续 iOS Particle artifact 一律以 Metal Bazel 命令构建,并在发布前复核 hash、renderer markers 与远端回读(若有发布授权)。

View File

@@ -0,0 +1,24 @@
# STEP-082 iOS Native FieldRuntime Facade 与 XCFramework 发行基线 Codex 完成报告 v3
## 执行结论
`IMPLEMENTED / IOS_CORE_PATH_PASS / WAITING_FINAL_CONTROL_REGRESSION`。
本报告是 STEP-083 发现 renderer 选择错误后的 post-close correction;保留 v1/v2 的历史证据,但旧默认 OpenGL XCFramework 不再具有 iOS Particle 发行资格。
## Renderer 纠正与发行 artifact
- 不带 renderer flag 的 `bazel build //platform/ios:MapLibre.dynamic` 默认选择 OpenGL。旧 zip:`24639200` bytes,SHA-256=`64faa174c5c0dc0a2da3e289f0beaf2dedf7298665e3345f39836729b668e239`,source commit=`136ed726cf749c24b3673c046581a38ef48be390`。它在 RN Test Host 中可显示色场但无粒子,因此作废,不能发布为 Particle iOS baseline。
- 固定发行命令:`bazel build --//:renderer=metal //platform/ios:MapLibre.dynamic`。
- 新 Metal zip:`MapLibre.dynamic.xcframework.zip`,`24943196` bytes,SHA-256=`ae88975fc20f4d9961b95079638d0e9c0d8e61d4394d5c0a8ffcc48d173a827f`,source commit=`bdd7f40f9029031816c9bf4db6e1cd6c7c69b7bd`。
- device binary 审计含 `MLNMapView`、Metal/`MTLDevice`/`ParticleGPU`,无 OpenGL marker。release manifest 保持 `VALIDATED`、URL=`LOCAL_BUILD`;未伪造远端发布。
## 真实消费证据与边界
Pleiades iPad mini 5 上,RN Test Host 的 single-MapLibre SPM signed Release 已构建、MapLibre.framework 已签名并安装。一次 V4 Wind load 实际执行 `clearAllEncodedFields`、color/particle binding、T0/T1 `ACCEPTED_INSERTED` 和 midpoint seek,用户确认“粒子恢复了”。
本次未逐按钮完成 PLAY/PAUSE、clear selected/all、detach/re-attach 控制回归;这部分保留给 STEP-083 final control regression,不能据此扩展为完整交互验收。
## 范围与 Git
新 Metal binary 的可追溯 source commit 是已提交 facade baseline `bdd7f40f9029031816c9bf4db6e1cd6c7c69b7bd`;RN/Test Host 的未提交文件不影响该 MapLibre binary 内容。本报告不提交、不 push,且未修改 Android、Shared Core、renderer 算法或 `NativeWeatherRuntimeBridge.ts`。

View File

@@ -0,0 +1,47 @@
# STEP-083 iOS RN 统一 FieldRuntime / TurboModule / Fabric 与 XCFramework 消费 Codex 完成报告 v1
## 1. 执行结论
`IMPLEMENTED / WAITING_IOS_VALIDATION`。未提交、未 push,最终环境验收交给 RDC。
## 2. 调查结论
- MLRN `11.3.6`:Fabric class 是 `MLRNMapViewComponentView`;它在 `prepareView` 设 `contentView = [[MLRNMapView alloc] ...]`;`MLRNMapView : MLNMapView`。
- MLRN 当前 module 的真实 lookup 是注入 `viewRegistry_DEPRECATED` 的 `addUIBlock`,在 block 内按 tag 查 component,再验证 component/content classes。bridge 同样使用该当前 RN UIManager registry;没有复制它或保留 view pointer。
- RN `0.85.2` generated ObjC++ spec 的 module pattern 为 protocol + `getTurboModule:` 返回 `std::make_shared<...SpecJSI>(params)`,Promise selector 使用 `resolve:(RCTPromiseResolveBlock) reject:(RCTPromiseRejectBlock)`;`codegenConfig.ios.modulesProvider` 生成 provider registration。
- MLRN podspec 的 `$MLRN_SPM_SPEC` 确实存在,默认 product 为 `MapLibre`;post-install 将其加入 MLRN pod target 与 user target。
## 3. Public API parity matrix
| Spec methods | iOS public seam | status |
| --- | --- | --- |
| attach, detach, getState | `MLNMapView` category + runtime snapshot | implemented |
| clearWindFields, clearFields, submitWindField, submitField | V3 runtime facade | implemented |
| submitEncodedField, encoded binding/time/playback/clear (8) | V4 runtime facade | implemented |
| value source, advection, enabled/visibility, FPS/time/playback/speed (9) | V3 control facade | implemented |
| color stops, particle/trail color, count, line width, length, opacities, fade (8) | visual facade | implemented |
The 34 `NativeWeatherRuntimeBridge.ts` methods are present as 34 ObjC++ selectors. No TS public type, union, method name, argument ordering, result string, or Android implementation changed; only the Android-specific missing-module text became platform-neutral.
## 4. Package and binary identity
- Added `ios/WeatherRuntimeBridge.h/.mm`, `MapLibreParticleRN.podspec`, iOS autolinking and codegen provider configuration; npm files include all of them.
- The Particle pod depends only on `MapLibreReactNative` `11.3.6`; it has no MapLibre dependency, vendored framework, or SPM reference. Thus it cannot introduce a second MapLibre product.
- The Test Host gained only an iOS bundle identifier. Its `App.tsx` retains one shared JS path and no `Platform.OS` branch.
## 5. Checks actually run
- Podspec Ruby syntax: PASS.
- package dry-run tarball, with temporary cache: PASS; includes iOS native files, podspec, Android, and src.
- codegen provider configuration static assertion: PASS.
- Spec/implementation method-count parity: 34/34 PASS.
- `git diff --check`: PASS.
- `npm ci --offline --ignore-scripts`: BLOCKED by absent locally cached `update-browserslist-db-1.3.2.tgz`; no network was used. Therefore TypeScript/codegen/Xcode/Pod/Test Host runtime have not run.
## 6. Required RDC validation
The STEP-082 XCFramework artifact is a local zip and its manifest URL is `LOCAL_BUILD`; it is not yet an MLRN-consumable Swift Package distribution. Configure a real custom `$MLRN_SPM_SPEC` coordinate first, then run codegen/typecheck/Pods/Xcode and Test Host smoke. Check a single MapLibre product/class set and the V4 lifecycle sequence before closing STEP-083.
## 7. Working tree protection
The user dirty entries `docs/doxygen/doxygen-awesome-css`, `platform/ios/app/MBXAppDelegate.m`, and `platform/windows/vendor/vcpkg`, plus the two pre-existing STEP-082 task files, were not touched. No Git commit or push was performed.

View File

@@ -0,0 +1,37 @@
# STEP-083 iOS RN 统一 FieldRuntime TurboModule Fabric 与 XCFramework 消费 Codex 完成报告 v2
## 执行结论
`IMPLEMENTED / IOS_CORE_PATH_PASS / WAITING_FINAL_CONTROL_REGRESSION`。
未提交、未 push。本报告只记录 RDC 已发生的 iOS consumer 验证和 Metal artifact 纠正;它不把未逐按钮测试的控制面写成完成。
## Git 基线与范围
- branch:`particle/main`;MapLibre Metal binary source commit:`bdd7f40f9029031816c9bf4db6e1cd6c7c69b7bd`。
- RN/Test Host 未提交文件不影响该已提交 MapLibre binary 内容。
- 未修改 `NativeWeatherRuntimeBridge.ts`、Android、Shared Core 或 renderer 算法。
- 用户既有 dirty `docs/doxygen/doxygen-awesome-css`、`platform/ios/app/MBXAppDelegate.m`、`platform/windows/vendor/vcpkg` 与三份未跟踪 `docs/40_任务` 任务书均不纳入本次修改或提交范围。
## Renderer 与 artifact
旧 `bazel build //platform/ios:MapLibre.dynamic` 默认使用 OpenGL。其 artifact 在 RN Test Host 中呈现色场而无粒子,不能用于 Particle iOS 发行。
固定命令为:
```sh
bazel build --//:renderer=metal //platform/ios:MapLibre.dynamic
```
新 Metal `MapLibre.dynamic.xcframework.zip`:`24943196` bytes,SHA-256=`ae88975fc20f4d9961b95079638d0e9c0d8e61d4394d5c0a8ffcc48d173a827f`。device binary 含 `MLNMapView`、Metal/`MTLDevice`/`ParticleGPU`,无 OpenGL marker。manifest 为 `VALIDATED`,URL 仍为 `LOCAL_BUILD`,未声明远端发布。
## RDC 已发生验证
- npm dependency install(`npm ci`)、typecheck、RN codegen、Expo prebuild 和 Pod integration 均已实际执行。
- device arm64 build 与 signed Release 均出现 `BUILD SUCCEEDED`;MapLibre.framework 签名成功,Pleiades iPad mini 5 安装运行。
- MLRN、App 与 Particle pod 共享 single MapLibre SPM product,没有第二份 MapLibre binary。
- 一次 V4 Wind load 实际完成 `clearAllEncodedFields`、color binding、particle binding、T0 `ACCEPTED_INSERTED`、T1 `ACCEPTED_INSERTED` 和 midpoint seek;用户确认“粒子恢复了”。
## 未完成的 final control regression
PLAY/PAUSE、clear selected、clear all、detach/re-attach 尚未逐按钮实测。它们是本 Step 的剩余验收项;在完成前不得将状态改写为 `CLOSED` 或 `PASS`。