Repository navigation
test: correct the REST deviation records - #725
Conversation
A triage of the REST entries in deviations.md found several that do not hold against features.md or the code. TP3a/d/g are not an SDK gap: RealtimeChannel._on_message fills the presence fields through Message.update_inner_message_fields, and the derived helper now does the same, so the three tests pass ungated. RSA16c's expiry renewal and RSA16d's switch to basic auth are spec errors (RSA4b1, and RSA10a/e/f), so they are marked @spec_error. The batch envelope entry now names batch_publish.md as the spec at fault, since RSC22b returns an array of BatchResults. RSA4 and RSA12a move to the adapted rows they belong in, labels and statuses are corrected, new spec faults are recorded as not yet filed, duplicate rows are removed, and the header counts are re-measured. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (14)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe pull request updates coroutine detection and connection-attempt cleanup. It adjusts related tests, revises UTS deviation records, updates warning calls, and advances pinned GitHub Actions revisions. ChangesSDK behavior and test maintenance
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Other Merge Risk: ⚪ Minimal · up to This change updates async compatibility handling, cleans up connection attempts when a transport is disposed, and refreshes test records and CI action versions. No actionable merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 15.91% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 44 functions across 10 files. (6 skipped: 6 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. A rabbit checks the callback’s tune, Comment |
When the transition or suspend timer ends a connection attempt, the
transport it was opening is disposed, but connect_base() is left
awaiting a future that only that transport's 'connected' or 'failed'
events settle. Neither fires once the transport is disposed, nor when
the attempt failed with an error ws_connect does not catch, so each such
attempt leaves a pending task for the garbage collector to destroy
("Task was destroyed but it is pending!"). An attempt abandoned while
still authenticating resumes when auth answers, and connects from
DISCONNECTED.
disconnect_transport() cancels the in-flight attempt alongside disposing
its transport, as close_impl() and on_closed() already do.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Logger.warn emits a DeprecationWarning. Replace the two remaining calls in the realtime channel and connection manager, and enable ruff's G010 rule so new ones are caught by lint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The encoder tests patched Http.post with a bare AsyncMock, whose default return value is itself an AsyncMock. publish_messages calls the synchronous Response.to_native() on that value, which produced a coroutine that was never awaited and emitted a RuntimeWarning for each of the 11 tests. The patched post resolves to an empty 201 Response, so the response parsing in publish_messages runs as it does against a real server. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ng tests test_fail_on_disconnected_when_queue_messages_false and test_queue_on_disconnected_when_queue_messages_true forced DISCONNECTED while the transport was still connected. The immediate reconnect replaced the transport without closing it, so its websocket tasks were still pending when the test's event loop closed, and garbage collection later surfaced them as PytestUnraisableExceptionWarning in whichever test was running. Dispose the transport first, as the other simulated-disconnect tests do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
checkout, setup-python, cache, upload-artifact and download-artifact were pinned to majors that target Node 20, which GitHub warns about and forces onto Node 24. Pin the latest majors, which run on Node 24 natively. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Python 3.14 deprecates asyncio.iscoroutinefunction, and the event emitter, Timer and is_callable_or_coroutine called it on every listener registration. is_coroutine_function keeps its semantics on every supported Python, including callables carrying asyncio's _is_coroutine marker (AsyncMock from the mock package, asgiref-marked callables), which inspect.iscoroutinefunction alone rejects. The fake clock awaits whatever its callback returns. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pytest-asyncio 0.23 calls asyncio.iscoroutinefunction and the event loop policy functions, producing ~710k warnings per 3.14 job. The releases that avoid them need Python 3.9 and pytest 8.2, so filter those three messages from the pytest_asyncio module only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Clear the warnings the check workflow prints
A triage of the REST entries in
test/uts/deviations.mdfound several that are wrong: an SDK gap that isn't one, spec errors filed as deviations, a spec fault blamed on the wrong spec, adapted tests listed as failing, wrong labels, and statuses that don't hold up againstfeatures.md. This corrects them and re-measures the counts in the header.Test changes
Tests change only where their classification changes.
RealtimeChannel._on_messagecallsMessage.update_inner_message_fieldsbefore decoding. The derived helper skipped that step. It now makes the same call, and TP3g compares against adatetime, astest_tp3_presence_from_jsonalready does. All three pass.@deviationto@spec_error.authorize()to switch a client back to basic auth, which RSA10a/RSA10e/RSA10f rule out. ably-js rejects the setup with 40102.deviations.mdcorrectionsbatchPublishreturn "an array ofBatchResults". ably-js's sandbox tests and the sandbox's ownGET /presence?channels=response both use the envelope, so the fault isbatch_publish.md's flat results, notbatch_presence.md. This was never filed upstream.httpRequestTimeoutrow is TO3l4, not TO3l1 (disconnectedRetryTimeout).@catch_allwould not close it.validate_message_sizeis not a TM6 calculation.authorizationheader sends two auth headers.urljoinresolves dot-segments in device ids.quote_plusreaches presence, annotations, serials and realtime history too.%3A.test_ti_errorinfo_from_jsonadaptation is now recorded.client_id.md: RSA15a timing, and the RSA12a/b labels.token_request_params.md: RSA5c/RSA6c labels.request.md: RSC19b "may vary".fallback.md: REC1b1/c1 40000.batch_publish.md: RSC22_Error1/2.features.md: HP8 prose vs IDL.test_to3_client_options_custom_hostsadaptation.fallbackHostsUseDefault's REC2b test, and its removal in 2.0.Counts
Measured by collecting the suite and mapping each item to its
# UTS:id. Against unchangedmain, this reproduces the existing header exactly.helpers/cases: 130, not 122.Not in this PR
Testing
uv run --frozen --extra crypto --extra dev pytest test/uts -q: 1134 passed, 230 skipped.RUN_DEVIATIONS=1 uv run --frozen --extra crypto --extra dev pytest test/uts -q: 215 failed, 1134 passed, 15 skipped. Every gated case fails when enabled.uv run ruff check: clean.🤖 Generated with Claude Code
Summary by CodeRabbit