[AIT-1109] Translate LiveObjects path-based objects UTS test specs to swift#135
[AIT-1109] Translate LiveObjects path-based objects UTS test specs to swift#135maratal wants to merge 3 commits into
objects UTS test specs to swift#135Conversation
Translate the path-based (public) LiveObjects Universal Test Suite unit specs (ably/specification#473, at commit 0a531c7) into Swift, in a new `UTS` test target. The path-based public API is currently an unimplemented skeleton (every method traps via `notImplemented()`), so these tests are expected to fail at runtime; the goal here is a faithful translation that compiles and that will go green as the API is implemented. Test files (Tests/UTS/Tests/Path-Based): - ValueTypesTests — RTLCV/RTLMV (create factories + evaluation via set()) - PathObjectTests — RTPO1–14 (navigation, value, instance, entries, compactJson) - PathObjectMutationsTests — RTPO15–18, RTPO3c2 (set/remove/increment/decrement) - PathObjectSubscribeTests — RTPO19, RTO24, RTO25 (subscriptions, depth filtering, dispatch) - InstanceTests — RTINS1–16 (identity-bound references) - LiveObjectSubscribeTests — RTLO4b, RTINS16 (Instance#subscribe delivery, tombstone deregistration) - RealtimeObjectTests — RTO2, RTO10, RTO15–26 (sync events, publishAndApply, GC, preconditions) Also includes public ObjectMessage conversion (Tests/UTS/Tests/Internal): - PublicObjectMessageTests — PAOM3, PAOOP3 (constructing the user-facing ObjectMessage / ObjectOperation from their internal counterparts). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The `UTS` target's tests translate the LiveObjects Universal Test Suite against an as-yet-unimplemented (skeleton) public API, so many trap via `notImplemented()` at runtime. A trap is a `fatalError`, which aborts the whole `swift test` process — taking unrelated passing tests down with it — so the run fails regardless of the SDK's own tests. Skip the UTS target here (it's still compiled by the preceding `swift build`); it'll be run once the API it targets is implemented. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
I would like to know the sources/prompts we used for translation.
Also, don't we have a uts-to-swift skill for translating UTS spec to given test file?
if we want to run UTS translation again in the future, we will need dedicated skill for the same as the UTS test spec keeps changing.
You can refer to |
Sure, I'll update cocoa skill for liveobjects UTS (I've forgot about it tbh, it was generated from the first attemt and I proceeded to internal tests that are less obvious). |
Translate the path-based (public) LiveObjects Universal Test Suite unit specs
(ably/specification#473, at commit 0a531c7) into Swift, in a new
UTStesttarget. The path-based public API is currently an unimplemented skeleton (every
method traps via
notImplemented()), so these tests are expected to fail atruntime; the goal here is a faithful translation that compiles and that will go
green as the API is implemented.
Test files (Tests/UTS/Tests/Path-Based):
Also includes public ObjectMessage conversion (Tests/UTS/Tests/Internal):
ObjectMessage / ObjectOperation from their internal counterparts).