Skip to content

TypeScript: watcher is live when watch() returns - #1555

Merged
thekevinbot merged 3 commits into
mainfrom
bot/1554-ts-watch-gap-1102
Nov 2, 2026
Merged

thekevinbot merged 3 commits into
mainfrom
bot/1554-ts-watch-gap-1102

Conversation

@thekevinbot

Copy link
Copy Markdown
Collaborator

Fixes #1554

TypeScript twin of #1552 / #1553. watch() is an async generator, so the native watcher started only on the stream's first next(); a write made between watch() returning and that first next() produced no event and never reached the index.

Red commit first: tests/integration/binding/watch-live-on-return.test.ts.

E2E Verification

  • Ran e2e suites locally for every affected SDK
  • Python SDK e2e: N/A
  • TypeScript SDK e2e: pending
  • Rust core e2e (if applicable): N/A
  • packages/python/e2e-attestations/<branch>.json receipt written if packages/python changed (just e2e-attest-python)
  • packages/ts/e2e-attestations/<branch>.json receipt written if packages/ts changed (just e2e-attest-ts)
  • Command(s) run: pending
  • Result summary: pending

Changelog / Migrations

  • Changelog fragment added under <root>/<pkg>/changelog.d/ for each changed package (or: skip-changelog trailer on a commit with reason)
  • Migration fragment with the same slug added under <root>/<pkg>/migrations.d/ for each changed package (every subsection but Summary _None._ when nothing breaks)

The native startWatcher is now synchronous so watch() can hand back a live stream. When watch() runs before the initial scan finishes, the watcher starts before ready resolves.
@thekevinbot
thekevinbot merged commit ff32a3a into main Nov 2, 2026
58 checks passed
@thekevinbot
thekevinbot deleted the bot/1554-ts-watch-gap-1102 branch November 2, 2026 22:26
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.

TypeScript: writes made right after watch() are lost

1 participant