Skip to content

Add UTS tests for LiveObjects path-based API#2219

Open
paddybyers wants to merge 4 commits into
mainfrom
uts-liveobjects
Open

Add UTS tests for LiveObjects path-based API#2219
paddybyers wants to merge 4 commits into
mainfrom
uts-liveobjects

Conversation

@paddybyers

Copy link
Copy Markdown
Member

Summary

  • Translates portable UTS test specs from specification/uts/objects/ into 290 working ably-js TypeScript tests
  • Covers PathObject, Instance, batch operations, LiveCounter/LiveMap CRDT internals, ObjectsPool sync state machine, RealtimeObject lifecycle, value types, and subscriptions
  • 19 test files: 14 unit (270 tests), 4 integration (15 tests), 1 proxy fault injection (5 tests)
  • 1 test pending (LiveMap#clear() not yet implemented in ably-js)

Test plan

  • All 290 tests pass locally: npx mocha --no-config --require tsx/cjs 'test/uts/objects/**/*.test.ts' --timeout 60000
  • CI passes

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 15d255ea-37cc-4542-a493-a58131d2b9f1

📥 Commits

Reviewing files that changed from the base of the PR and between 503a39d and 4d0fa70.

📒 Files selected for processing (23)
  • test/uts/deviations.md
  • test/uts/mock_websocket.ts
  • test/uts/objects/helpers/standard_test_pool.ts
  • test/uts/objects/integration/objects_gc.test.ts
  • test/uts/objects/integration/objects_lifecycle.test.ts
  • test/uts/objects/integration/objects_sync.test.ts
  • test/uts/objects/integration/proxy/objects_faults.test.ts
  • test/uts/objects/unit/instance.test.ts
  • test/uts/objects/unit/live_counter.test.ts
  • test/uts/objects/unit/live_counter_api.test.ts
  • test/uts/objects/unit/live_map.test.ts
  • test/uts/objects/unit/live_map_api.test.ts
  • test/uts/objects/unit/live_object_subscribe.test.ts
  • test/uts/objects/unit/object_id.test.ts
  • test/uts/objects/unit/objects_pool.test.ts
  • test/uts/objects/unit/parent_references.test.ts
  • test/uts/objects/unit/path_object.test.ts
  • test/uts/objects/unit/path_object_mutations.test.ts
  • test/uts/objects/unit/path_object_subscribe.test.ts
  • test/uts/objects/unit/public_object_message.test.ts
  • test/uts/objects/unit/realtime_object.test.ts
  • test/uts/objects/unit/value_types.test.ts
  • test/uts/realtime/integration/helpers/proxy.ts
👮 Files not reviewed due to content moderation or server errors (23)
  • test/uts/objects/unit/live_map.test.ts
  • test/uts/objects/integration/objects_lifecycle.test.ts
  • test/uts/objects/unit/object_id.test.ts
  • test/uts/objects/unit/value_types.test.ts
  • test/uts/objects/unit/parent_references.test.ts
  • test/uts/realtime/integration/helpers/proxy.ts
  • test/uts/objects/unit/objects_pool.test.ts
  • test/uts/objects/unit/live_counter.test.ts
  • test/uts/objects/helpers/standard_test_pool.ts
  • test/uts/objects/unit/live_object_subscribe.test.ts
  • test/uts/objects/unit/public_object_message.test.ts
  • test/uts/objects/integration/objects_sync.test.ts
  • test/uts/objects/unit/path_object_mutations.test.ts
  • test/uts/objects/unit/path_object.test.ts
  • test/uts/objects/unit/live_map_api.test.ts
  • test/uts/objects/integration/objects_gc.test.ts
  • test/uts/objects/unit/live_counter_api.test.ts
  • test/uts/objects/unit/path_object_subscribe.test.ts
  • test/uts/objects/unit/realtime_object.test.ts
  • test/uts/objects/unit/instance.test.ts
  • test/uts/objects/integration/proxy/objects_faults.test.ts
  • test/uts/mock_websocket.ts
  • test/uts/deviations.md

Warning

Walkthrough skipped

File diffs could not be summarized.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch uts-liveobjects

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/2219/features May 13, 2026 12:48 Inactive
@paddybyers paddybyers requested a review from ttypic May 13, 2026 13:48
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/features May 14, 2026 07:18 Inactive
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/features May 29, 2026 12:10 Inactive
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/features June 6, 2026 11:16 Inactive
@ttypic ttypic force-pushed the uts-liveobjects branch from 400c6a4 to dfcacca Compare June 30, 2026 17:31
@ttypic ttypic changed the base branch from uts-integration-proxy to main June 30, 2026 17:32
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/features July 2, 2026 10:29 Inactive
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/bundle-report July 2, 2026 10:29 Inactive
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/typedoc July 2, 2026 10:29 Inactive
@ttypic ttypic force-pushed the uts-liveobjects branch from 6d756dd to 91ebdf1 Compare July 2, 2026 10:41
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/features July 2, 2026 10:41 Inactive
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/bundle-report July 2, 2026 10:42 Inactive
@github-actions github-actions Bot temporarily deployed to staging/pull/2219/typedoc July 2, 2026 10:42 Inactive
paddybyers and others added 4 commits July 2, 2026 11:57
Translate portable UTS test specs from specification/uts/objects/ into
working ably-js TypeScript tests covering PathObject, Instance, batch
operations, LiveCounter/LiveMap CRDT internals, ObjectsPool sync state
machine, RealtimeObject lifecycle, value types, and subscriptions.

19 test files: 14 unit (270 tests), 4 integration (15 tests),
1 proxy fault injection (5 tests). 1 test pending (LiveMap#clear()
not yet implemented).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove client-side port allocation (TOCTOU race) and let the proxy
auto-assign free ports via OS. Read the assigned port from the session
creation response. Update binary to v0.2.0 with new asset naming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds parentReferences, PublicAPI::ObjectMessage, RTO24/25/26 tests;
updates objectMessage/subscription assertions; removes batch API tests.
308 passing, 4 pending deviations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The webpack build type-checks the whole tsconfig program (which
includes test/**/*), so type errors in the UTS LiveObjects tests
failed `npm run build` and therefore `npm ci`.

 - Add siteCode and objectsGCGracePeriod to the mock CONNECTED
   message's connectionDetails defaults, so tests can set these
   real protocol fields without widening a mismatched type.
 - Pass the LiveObjects plugin module namespace to `plugins`
   instead of the LiveObjects const export, matching the internal
   ModularPlugins type (typeof import('plugins/liveobjects')) and
   the existing JS tests. Runtime behaviour is unchanged.
@ttypic ttypic force-pushed the uts-liveobjects branch from 91ebdf1 to 4d0fa70 Compare July 2, 2026 10:57
@ttypic ttypic marked this pull request as ready for review July 2, 2026 10:57

@ttypic ttypic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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