clockworklabs / clockworklabs/SpacetimeDB
`ModuleHost::call_identity_connected`: when no `client_connected` reducer exists, broadcast the TX that inserts into `client_connected`.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
Per discussion in #2983 . In ModuleHost::call_identity_connected, in the path where no client_connected reducer exists, we create a transaction which inserts into st_client (and as of the linked PR, also st_connection_credentials and commit it, but never broadcast that commit to subscribers. (Broadcasting is handled by the call reducer machinery in the other branch.) This is technically a bug, as clients which subscribe to system tables will observe inconsistent results. It's low-prio because our client SDKs cannot subscribe to system tables anyways (no bindings), and we don't document the system table interface publicly.
Alternatively, we could decide that the relevant system tables (st_client and st_connection_credentials) should be public. In that case, we should make them not ever subscribe-able, add a (smoke?) test that attempting to subscribe to them via the CLI or a raw websocket as non-owner fails, and then add a comment to this branch in call_identity_connected that we are not broadcasting on purpose.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ModuleHost::call_identity_connected and read discussion #2983, focusing on the branch without a client_connected reducer and its transaction for st_client and st_connection_credentials. Decide whether that commit should be broadcast or those system tables should reject subscriptions; completion requires consistent subscriber behavior, with the proposed CLI or raw-websocket smoke test if the latter policy is chosen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100