Repository navigation
test(android): replay the round engine vectors through the sync adapter - #680
Conversation
SyncCoordinator.runOnce now drives the engine through a RoundHost (the engine step, the clock, the kv store and the IO its commands ask for); DeviceRound is the device's. SyncRoundReplayTest plays each trace of round-engine-vectors.json as a scripted engine, fakes the IO from the trace's next event and checks every event the adapter answers with, the arguments each command ran with, the start facts, the crash-hold flag and the finish's result mapping. 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
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
SyncCoordinator.runOncedrives the shared round engine through aRoundHost(engine step, monotonic clock, kv store, the IO the engine's commands ask for).DeviceRoundis the device implementation (JNIFlowBridge.stepRound,UpdateContext, OkHttp) — behaviour unchanged.SyncRoundReplayTest(same idea as Harmony'sharmonySyncRound.test.ts): each trace incpp/update_flow_core/tests/round-engine-vectors.jsonplays the engine; IO outcomes come from the trace's next event. It checks every event the adapter answers with (type/text/installed/ok/code/timedOut/reason/error/now), the arguments each command ran with (http url/body/timeouts, download strategy/url/hash/originHash/deadline, commit generation/hash/hashInfo/activate/cache), the start facts (config, generations, deadline), the sticky crash-hold flag, cancellation of a timed-out attempt, the finish →BundlePreparationResultmapping andunactivatedHash, and that the breadcrumb never survives.now). Skipped: the tvOS-onlyforceActivate/activatedtrace, the code-less download failure (Android always reports a code), and the protocol-error traces.resetinstead ofconfig_changedon a lost commit fails the config-change trace.Test plan
./gradlew :react-native-update:testReleaseUnitTestvia Example/e2etest (JVM unit tests are not run by CI): 79 tests, 0 failuresDeviceRound)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit