clockworklabs / clockworklabs/SpacetimeDB

Detect or support table handles from a duplicate spacetimedb SDK copy in schema()

Open
#5,746 0 comments 0 reactions 1 assignee View on GitHub

@aasoni is already working on this.

Since Aug 14, 2026.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

Full report with minimal repro: #5740

Short version: a TS library that depends on spacetimedb and exports table() handles produces a silently corrupted schema when a consumer (with its own SDK copy, e.g. via link:/file: or any unhoisted duplicate) passes those handles into schema(). Publish succeeds with wrong row types, then reducers fatal at runtime.

Requested outcome, either is acceptable:

  1. Make foreign-copy handles work (structural interning), or
  2. Fail loudly at module load with a clear TypeError.

This currently forces the dependency-injection pattern in spacetime-retry-ts and @spacetimedb/cron (spacetimeCron({ table, t, ScheduleAt }), see clockworklabs/SpacetimeDBComponents#3); fixing it in the "make it work" direction lets those libraries drop injection.

cc @cloutiertyler

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.