Skip to content

fix(client): address close() review follow-ups#1075

Merged
userFRM merged 3 commits into
mainfrom
fix/close-copilot-followups
Jul 2, 2026
Merged

fix(client): address close() review follow-ups#1075
userFRM merged 3 commits into
mainfrom
fix/close-copilot-followups

Conversation

@userFRM

@userFRM userFRM commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Follow-up to #1074, addressing the Copilot review on that PR.

  • subscription_info now rejects on a closed client (raising the same "client is closed" error every other surface enforces) instead of returning stale "Unknown" tiers that hid the closed state.
  • The TypeScript close() docstring is corrected: close() joins the streaming dispatcher (so it can block briefly while an in-flight callback finishes) but does not run the awaitDrain ring barrier — that is the async-disposer path.
  • Typo fix (survivng -> surviving).

Compiles clean for both bindings; fmt clean.

claude added 2 commits July 2, 2026 15:41
- subscription_info now rejects on a closed client (raising the same 'client is
  closed' error every other surface enforces) instead of returning stale
  'Unknown' tiers, which hid the closed state.
- Correct the TypeScript close() docstring: close() joins the dispatcher (so it
  can block briefly on an in-flight callback) but does not run the awaitDrain
  ring barrier — that is the async-disposer path.
- Fix a typo (survivng -> surviving).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…efresh the stale rc.5 version guard)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Follow-up to #1074 that aligns post-close() behavior and documentation across the TypeScript and Python bindings, and fixes a small typo in Rust docs.

Changes:

  • Update TypeScript close() documentation to accurately describe synchronous dispatcher join vs. the async-disposer awaitDrain barrier.
  • Make Python subscription_info reject on a closed client (consistent with other surfaces) instead of returning "Unknown" tiers.
  • Bump the TypeScript native binding version guard to 13.0.0-rc.13 and fix a documentation typo (“survivng” → “surviving”).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
thetadatadx-ts/src/lib.rs Corrects close() docs to reflect actual streaming teardown semantics (stopStreaming() join vs awaitDrain).
thetadatadx-ts/index.js Updates the native binding version mismatch guard from 13.0.0-rc.5 to 13.0.0-rc.13.
thetadatadx-ts/index.d.ts Keeps the generated TypeScript typings/docs consistent with the updated close() semantics.
thetadatadx-py/src/streaming_session.rs Changes subscription_info to raise on closed client (via client_arc()?) and return PyResult.
thetadatadx-py/src/lib.rs Fixes a spelling typo in Rust doc comments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread thetadatadx-ts/index.js
Comment on lines 78 to 82
const binding = require('thetadatadx-android-arm64')
const bindingPackageVersion = require('thetadatadx-android-arm64/package.json').version
if (bindingPackageVersion !== '13.0.0-rc.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
throw new Error(`Native binding package version mismatch, expected 13.0.0-rc.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
if (bindingPackageVersion !== '13.0.0-rc.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
throw new Error(`Native binding package version mismatch, expected 13.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
}
The regenerated index.js enforces native binding 13.0.0-rc.13, but the
lockfile still resolved thetadatadx-darwin-arm64, thetadatadx-linux-x64-gnu,
and thetadatadx-win32-x64-msvc at 13.0.0-rc.5. An npm ci honoring the
lockfile would install the older native and either trip the enforced
version check or run an unexpected native. Align the three resolved
entries to rc.13 with their published integrity.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 6 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • thetadatadx-ts/package-lock.json: Generated file

@userFRM userFRM merged commit 54a3cd1 into main Jul 2, 2026
53 checks passed
@userFRM userFRM deleted the fix/close-copilot-followups branch July 2, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants