Repository navigation
refactor(ios): drive the native round through the shared round engine - #675
Conversation
RCTPushyOrchestrator's hand-written round (runConfiguredRound, the endpoint query loop, the two-budget download loop and the result mapping) is replaced by a loop over flowcore::StepRound that runs the commands it returns: the breadcrumb, the launch env, HTTP, the installed check, downloads and the commit. Platform-specific parts stay here: the tvOS purge-restore window, crash hold, the commit lock and its activation gate, unactivated-version bookkeeping for crash hold, and the HTTP client. Behaviour aligned with the engine (NATIVE_CHECKUPDATE_DESIGN §12.4): the request's whole-call bound is the engine's callTimeoutMs (15s, capped by the round deadline) instead of the idle timeout + 5s; a commit lost to a config change finishes as cancelled/config_changed; the host's post-wait check is HostCancellation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
RoundEngine 系列的第 3 步:让 iOS 接入 #673 合入的共享轮次引擎。Android 还要等 #669 合入,所以先做 iOS。
改了什么
RCTPushyOrchestrator.mm原先手写的几段轮次逻辑都删掉了,包括runConfiguredRound、runQueryRequest、performAttempts和PushyQueryRequestTimeout,以及结果映射。runOnce改为循环调用flowcore::StepRound,逐条执行引擎返回的命令。命令包括面包屑、collectEnv、http、checkInstalled、download、commit、finish。perform:负责环境和 HTTP,download:负责下载,commit:负责提交。PushyVerifyActivation摘要门flowcore::HostCancellation。行为对齐(NATIVE_CHECKUPDATE_DESIGN §12.4)
callTimeoutMs:15s,并按轮次预算钳制。以前是空闲超时再加 5s,可能比预算多等 5s。cancelled/config_changed。适配器通过比较配置代数判断是哪一种,以前一律报 reset。tests/round-engine-vectors.json锁定。验证
Example/e2etest的 Pods 头文件对RCTPushyOrchestrator.mm、RCTPushyInstaller.mm做-fsyntax-only(模拟器 SDK,C++20),通过。scripts/test-ios-purge-restore.sh12 项全部通过。restorePurgedLaunch和commitRoundWithGeneration的签名没有变。scripts/test-update-flow-core.sh通过。🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit