Skip to content

[AIT-1109] Translate LiveObjects path-based objects UTS test specs to swift#135

Open
maratal wants to merge 3 commits into
feature/path-based-liveobjectsfrom
feature/uts-path-based-unit-tests
Open

[AIT-1109] Translate LiveObjects path-based objects UTS test specs to swift#135
maratal wants to merge 3 commits into
feature/path-based-liveobjectsfrom
feature/uts-path-based-unit-tests

Conversation

@maratal

@maratal maratal commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

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).

maratal and others added 2 commits July 10, 2026 17:07
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>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 749c65f8-fb62-4a17-9832-c0310aa56c8c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/uts-path-based-unit-tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot temporarily deployed to staging/pull/135/AblyLiveObjects July 13, 2026 00:07 Inactive
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>

@sacOO7 sacOO7 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sacOO7

sacOO7 commented Jul 13, 2026

Copy link
Copy Markdown

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 uts-to-kotlin skill from https://github.com/ably/ably-java/tree/main/.claude/skills/uts-to-kotlin

@maratal

maratal commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

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.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants