clockworklabs / clockworklabs/SpacetimeDB
Detect or support table handles from a duplicate spacetimedb SDK copy in schema()
@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:
- Make foreign-copy handles work (structural interning), or
- 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
- 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.
Assessment
This issue has not been assessed yet.