Skip to content

Allow monomorphization for reducers and more - #5610

Merged
lisandroct merged 8 commits into
masterfrom
lisandro/allow-monomorphization-for-reducers-and-more
Sep 3, 2026
Merged

Allow monomorphization for reducers and more#5610
lisandroct merged 8 commits into
masterfrom
lisandro/allow-monomorphization-for-reducers-and-more

Conversation

@lisandroct

@lisandroct lisandroct commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

This PR updates the C# bindings so generated module exports can dispatch directly to statically-known generic reducer, procedure, HTTP handler, view, and anonymous-view entrypoints when building with Native AOT-LLVM.

The runtime now keeps generic static caches for generated dispatchers and exposes generic call paths that avoid relying only on indexed interface collections. The generated FFI forwarding methods switch on the host-provided function/view id and call the matching generic runtime entrypoint, while preserving the existing id-based fallback path.

The previous exported code always used non-generic runtime methods such as Module.__call_reducer__(id, ...), which then indexed into an IReducer list and invoked through the interface. That shape hides the concrete generated reducer/handler/view type from the AOT compiler at the call site.

The generated exports now switch on the function id in generated code and call generic runtime methods such as Module.__call_reducer__<SomeReducer>(...). Because the concrete generated type is present as a generic type argument, NativeAOT can compile a specialized instantiation for that reducer/handler/view. In practice, this gives the AOT compiler a monomorphic call path: it can see the exact dispatcher type, use the static generic cache for that type, and avoid part of the dynamic interface/list dispatch shape that was previously required.

All of this gives extra optimization opportunities in AOT output because the compiler no longer has to treat every reducer invocation as the same opaque interface call.

UPDATE AFTER REVIEW

The important change is that the generic type argument now exists at the actual dispatch site. For example, instead of exporting a method that calls a shared runtime method like:

Module.__call_reducer__(id, ...);

which then indexes into a runtime collection and invokes through IReducer, generated code now emits a switch that calls the concrete generated reducer path directly:

id switch
{
    0 => SomeReducer.Invoke(...),
    1 => OtherReducer.Invoke(...),
    ...
}

The same shape is used for procedures, HTTP handlers, views, and anonymous views. And now it was verified that NativeAOT can take advantage of this and the optimization is real. The previous version still routed through shared generic runtime helpers in a way that did not give NativeAOT a fully concrete call path at the final invocation point. Now the compiler has a monomorphic call path and can specialize the code for that exact generated type, avoid the indexed interface-dispatch shape, and inline through the generated static call path when profitable.

I also considered the extra complexity of keeping the old system around for .NET 8 JIT and decided to simplify the codebase and unify both paths. Now .NET 8 JIT also uses this new path. I benchmarked it against master and the performance is basically flat (if not marginally faster) so there was no reason to keep the old form.

API and ABI breaking changes

The change is internal to C# generated code and runtime dispatch behavior.

Rollback safety impact

n/a

Expected complexity level and risk

3

The main risk is that generated dispatch ids must stay aligned with registration order for reducers, procedures, HTTP handlers, named views, and anonymous views. The implementation preserves fallback id-based dispatch, but it touches the C# module FFI path used by NativeAOT/.NET 10 builds, so reviewers should pay close attention to ordering and parity across all generated dispatcher categories.

Testing

  • Ran tests and they're all passing
  • Ran targeted C# NativeAOT benchmark comparisons against master
  • Repeated benchmark runs to estimate noise/spread

Benchmark Results

All of the text below was AI generated summarizing the benchmark results

Benchmarks were run through the existing harness using C# stdb_module/csharp NativeAOT/.NET 10 module builds.

Each row below reports the median across three runs per branch. The range column is the min/max spread across those three runs, so it gives a rough estimate of run-to-run noise.

Benchmark master median, range PR median, range PR vs master
large args 64KiB 43.768 us, 8.1% 44.100 us, 2.5% +0.8%
print_bulk lines=1 7.155 us, 22.4% 6.902 us, 9.2% -3.5%
print_bulk lines=100 60.714 us, 7.1% 57.402 us, 5.1% -5.5%
print_bulk lines=1000 521.942 us, 8.3% 508.555 us, 4.6% -2.6%
circles load=10 33.612 ms, 2.3% 33.767 ms, 0.5% +0.5%
circles load=100 33.789 ms, 2.8% 33.733 ms, 2.7% -0.2%
ia_loop load=10 10.550 ms, 5.1% 10.529 ms, 1.3% -0.2%
ia_loop load=100 26.880 ms, 5.1% 26.903 ms, 3.8% +0.1%
filter string index 44.079 us, 3.5% 44.228 us, 1.9% +0.3%
filter u64 index 20.212 us, 3.0% 20.309 us, 2.7% +0.5%
insert u32/u64/str unique 266.848 us, 4.1% 265.643 us, 5.2% -0.5%
insert u32/u64/str btree 390.298 us, 0.6% 364.261 us, 4.4% -6.7%
iterate u32/u64/str 44.058 us, 1.5% 44.148 us, 3.3% +0.2%
insert u32/u64/u64 unique 167.317 us, 6.9% 180.238 us, 5.7% +7.7%
insert u32/u64/u64 btree 258.715 us, 7.1% 258.304 us, 6.8% -0.2%
iterate u32/u64/u64 14.932 us, 3.4% 14.979 us, 2.0% +0.3%

Overall, the PR appears to reduce spread in most of the reducer-heavy special benchmarks. The clearest improvements are:

  • print_bulk lines=100: about 5.5% faster
  • print_bulk lines=1000: about 2.6% faster
  • insert u32/u64/str btree: about 6.7% faster
  • print_bulk lines=1: about 3.5% faster, but master had very high spread on this benchmark

Most game, filter, and iterate workloads are effectively flat. These are dominated more by database/query work than by reducer dispatch overhead.

The main negative result in the three-run aggregate was insert u32/u64/u64 unique, which showed +7.7%. I investigated it separately with five focused runs of only that benchmark:

Set master PR Delta
focused median 164.408 us 168.442 us +2.5%
focused mean 166.759 us 168.588 us +1.1%
run spread 6.1% 1.5%

The focused rerun does not confirm a meaningful regression. The best estimate is roughly flat, possibly +1-2.5%, while master’s own focused run spread was about 6.1%.

UPDATED BENCHMARKS AFTER REVIEW

Benchmarks were rerun after the review changes using the existing harness.

The NativeAOT numbers below compare master against this PR with .NET 10 AOT builds. Each row reports the median across repeated runs. The range column is the min/max spread across those runs, so it is a rough noise estimate.

Benchmark master .NET 10 AOT median, range PR .NET 10 AOT median, range PR vs master
large args 64KiB 45.030 us, 3.0% 45.970 us, 4.0% +2.1%
print_bulk lines=1 7.740 us, 4.6% 7.743 us, 4.0% +0.0%
print_bulk lines=100 67.027 us, 4.0% 67.650 us, 2.8% +0.9%
print_bulk lines=1000 571.038 us, 2.5% 584.114 us, 3.3% +2.3%
circles load=10 35.353 ms, 1.9% 34.112 ms, 3.1% -3.5%
circles load=100 35.163 ms, 3.3% 33.919 ms, 3.1% -3.5%
ia_loop load=10 10.993 ms, 1.9% 10.660 ms, 3.3% -3.0%
ia_loop load=100 28.701 ms, 4.4% 27.503 ms, 2.9% -4.2%
filter string index 47.161 us, 3.0% 47.394 us, 1.2% +0.5%
filter u64 index 23.866 us, 2.5% 21.674 us, 2.5% -9.2%
insert u32/u64/str unique 281.629 us, 3.9% 263.539 us, 1.8% -6.4%
insert u32/u64/str btree 410.007 us, 5.0% 362.381 us, 2.0% -11.6%
iterate u32/u64/str 46.339 us, 3.6% 44.413 us, 1.7% -4.2%
insert u32/u64/u64 unique 185.467 us, 4.0% 166.006 us, 1.5% -10.5%
insert u32/u64/u64 btree 268.584 us, 4.6% 247.646 us, 0.8% -7.8%
iterate u32/u64/u64 16.668 us, 4.3% 15.355 us, 1.3% -7.9%

After the review changes, the NativeAOT result is materially better than the original benchmark set, which is what I was expecting originally. The small reducer-only print_bulk benchmarks are roughly flat to slightly slower, but the database-heavy workloads improve consistently. The clearest wins are:

  • insert u32/u64/str btree: about 11.6% faster
  • insert u32/u64/u64 unique: about 10.5% faster
  • filter u64 index: about 9.2% faster
  • iterate u32/u64/u64: about 7.9% faster
  • insert u32/u64/u64 btree: about 7.8% faster
  • insert u32/u64/str unique: about 6.4% faster

I also benchmarked .NET 8 non-AOT builds against master, since the reviewed implementation now uses the same generated direct-dispatch path for both AOT and non-AOT builds.

Benchmark master .NET 8 JIT median, range PR .NET 8 JIT median, range PR vs master
large args 64KiB 521.910 us, 0.3% 521.596 us, 0.4% -0.1%
print_bulk lines=1 18.917 us, 0.4% 19.384 us, 2.8% +2.5%
print_bulk lines=100 308.638 us, 0.4% 308.916 us, 0.4% +0.1%
print_bulk lines=1000 2.924 ms, 0.3% 2.930 ms, 0.9% +0.2%
circles load=10 794.400 ms, 1.2% 776.488 ms, 0.8% -2.3%
circles load=100 790.261 ms, 0.8% 776.466 ms, 0.2% -1.7%
ia_loop load=10 50.046 ms, 0.7% 49.618 ms, 0.5% -0.9%
ia_loop load=100 131.112 ms, 1.3% 130.555 ms, 0.3% -0.4%
filter string index 523.986 us, 1.7% 525.000 us, 0.7% +0.2%
filter u64 index 277.269 us, 0.9% 273.111 us, 0.8% -1.5%
insert u32/u64/str unique 1.400 ms, 2.0% 1.385 ms, 1.8% -1.1%
insert u32/u64/str btree 1.498 ms, 1.0% 1.502 ms, 3.3% +0.3%
iterate u32/u64/str 496.964 us, 1.2% 499.718 us, 1.7% +0.6%
insert u32/u64/u64 unique 915.037 us, 1.5% 911.017 us, 1.1% -0.4%
insert u32/u64/u64 btree 1.018 ms, 2.3% 998.853 us, 3.4% -1.8%
iterate u32/u64/u64 268.507 us, 2.3% 258.697 us, 0.8% -3.7%

The .NET 8 results are mostly flat, which is expected and I verified there's not a performance regression.

And kinda for fansies, this is the comparison between master on .NET 8 JIT and this PR on .NET 10 NativeAOT:

Benchmark master .NET 8 JIT PR .NET 10 AOT AOT vs JIT Speedup
large args 64KiB 521.910 us 45.970 us -91.2% 11.4x
print_bulk lines=1 18.917 us 7.743 us -59.1% 2.4x
print_bulk lines=100 308.638 us 67.650 us -78.1% 4.6x
print_bulk lines=1000 2.924 ms 584.114 us -80.0% 5.0x
circles load=10 794.400 ms 34.112 ms -95.7% 23.3x
circles load=100 790.261 ms 33.919 ms -95.7% 23.3x
ia_loop load=10 50.046 ms 10.660 ms -78.7% 4.7x
ia_loop load=100 131.112 ms 27.503 ms -79.0% 4.8x
filter string index 523.986 us 47.394 us -91.0% 11.1x
filter u64 index 277.269 us 21.674 us -92.2% 12.8x
insert u32/u64/str unique 1.400 ms 263.539 us -81.2% 5.3x
insert u32/u64/str btree 1.498 ms 362.381 us -75.8% 4.1x
iterate u32/u64/str 496.964 us 44.413 us -91.1% 11.2x
insert u32/u64/u64 unique 915.037 us 166.006 us -81.9% 5.5x
insert u32/u64/u64 btree 1.018 ms 247.646 us -75.7% 4.1x
iterate u32/u64/u64 268.507 us 15.355 us -94.3% 17.5x

@lisandroct
lisandroct marked this pull request as draft July 28, 2026 19:38
@lisandroct
lisandroct force-pushed the lisandro/allow-monomorphization-for-reducers-and-more branch from d6c0f77 to dc5c78d Compare August 13, 2026 15:05
@lisandroct
lisandroct marked this pull request as ready for review August 17, 2026 16:56
@lisandroct
lisandroct force-pushed the lisandro/allow-monomorphization-for-reducers-and-more branch 3 times, most recently from bfd0d87 to 908da41 Compare August 20, 2026 16:55
@JasonAtClockwork
JasonAtClockwork self-requested a review August 21, 2026 15:36

@JasonAtClockwork JasonAtClockwork left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine but it seems NativeAOT is not allowing this to be monomorphic. I used the benchmarks-cs project as a test case and built the .wasm then pulled out the text format version of the binary with wasm-tools (wasm-tools print tool).

Reviewing the code through that lens what I can see is NativeAOT seems to be building a wrapper around the generics and ending up doing the exact same thing in the end using a lookup -> resolve interface -> call indirect.

In func $StdbModule_ModuleRegistration____call_reducer__ we see the switch statement run through some br_table command that breaks out each type to the same call $SpacetimeDB_Runtime_SpacetimeDB_Internal_Module____call_reducer___0<System___Canon> and inside that func we have:
call $__GenericLookupFromDict_SpacetimeDB_Runtime_SpacetimeDB_Internal_Module____call_reducer___0<System___Canon>_GCStaticBase_SpacetimeDB_Runtime_SpacetimeDB_Internal_Module_ReducerCache_1<R_System___Canon>
...
call $RhpResolveInterfaceDispatch
...
call_indirect (type 8)

This basically mirrors how the master branch has it (at least the resolve then call_indirect).

@lisandroct
lisandroct force-pushed the lisandro/allow-monomorphization-for-reducers-and-more branch from 0ef0a62 to 2e78e4c Compare August 26, 2026 18:16
@lisandroct

lisandroct commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

I addressed the huge point that Jason brought up and now we're where I was expecting to be initially.

@JasonAtClockwork
JasonAtClockwork self-requested a review August 28, 2026 17:32

@JasonAtClockwork JasonAtClockwork left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a detailed review this is looking fantastic. I've seen the same rough increases in speed and the Wasm output looks to be doing the correct work. On top of that the increase in binary size is negligible at ~0.39% increase for sdk-test-cs which has over 100 reducers.

@lisandroct
lisandroct added this pull request to the merge queue Sep 3, 2026
Merged via the queue into master with commit 28071ac Sep 3, 2026
54 of 55 checks passed
jonahsnider Bot added a commit to jonahsnider/homebrew-tap that referenced this pull request Sep 5, 2026
Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Features

### C# NativeAOT monomorphized dispatch

Generated C# module exports now dispatch directly to statically-known
generic entrypoints for reducers, procedures, HTTP handlers, views, and
anonymous views when building with NativeAOT-LLVM. This eliminates
virtual dispatch overhead at the module boundary and improves NativeAOT
module performance.

([#5610](<clockworklabs/SpacetimeDB#5610>))

### MCP support on Maincloud

The SpacetimeDB MCP endpoint (`/v1/mcp`) is now available on Maincloud.
You can connect AI agents and MCP-compatible tools directly to your
Maincloud databases. This release also adds cluster-aware routing so
that MCP requests sent to any node are automatically proxied to the
leader replica, along with egress tracking for MCP tool calls.

([#5849](<clockworklabs/SpacetimeDB#5849>),
[#5793](<clockworklabs/SpacetimeDB#5793>))

## Bug Fixes

### TypeScript SDK: route mid-session websocket errors to onDisconnect

The TypeScript SDK's `ws.onerror` handler previously treated every
websocket error as a connection failure, even on established
connections. This fired `onConnectError` instead of `onDisconnect`,
silently disabled the outbound send path, and left the client in a
stalled state with no reconnect. Mid-session errors now close the socket
and fire `onDisconnect` with the error, allowing existing reconnect
handling to take over.

([#5707](<clockworklabs/SpacetimeDB#5707>))

### Fix C++ auto-increment macro symbol collisions

C++ auto-increment field macros previously used `__LINE__` to generate
symbols, causing collisions when two table definitions in separate files
had an auto-increment field on the same line number. Macros now use
table and field names to guarantee unique symbols.

([#5836](<clockworklabs/SpacetimeDB#5836>))

### Fix `spacetime dev` C# complaint on macOS

The `spacetime dev` command no longer incorrectly warns about C# on
macOS when C# is not in use.

([#5867](<clockworklabs/SpacetimeDB#5867>))

## What's Changed

- Allow monomorphization for C# NativeAOT reducers, procedures, HTTP
handlers, and views in
[#5610](<clockworklabs/SpacetimeDB#5610>)
- Add MCP request routing to leader replica in
[#5849](<clockworklabs/SpacetimeDB#5849>)
- Add egress tracking for MCP requests in
[#5793](<clockworklabs/SpacetimeDB#5793>)
- Route TypeScript SDK mid-session websocket errors to onDisconnect in
[#5707](<clockworklabs/SpacetimeDB#5707>)
- Fix C++ auto-increment macro symbol collisions in
[#5836](<clockworklabs/SpacetimeDB#5836>)
- Fix `spacetime dev` C# warning on macOS in
[#5867](<clockworklabs/SpacetimeDB#5867>)

**Full Changelog**:
[v2.9.0...v2.10.0](<https://github.com/clockworklabs/SpacetimeDB/compare/v2.9.0...release/candidate/v2.10.0>)</pre>
<p>View the full release notes at <a
href="https://github.com/clockworklabs/SpacetimeDB/releases/tag/v2.10.0">https://github.com/clockworklabs/SpacetimeDB/releases/tag/v2.10.0</a>.</p>
</details>
<hr>

---------

Co-authored-by: Anka <runner@sjc22-bm210-84d28139-e2f6-4b7c-92ee-6c21afdf23c2-32D5D422D197.local>
Co-authored-by: jonahsnider[bot] <287348350+jonahsnider[bot]@users.noreply.github.com>
pull Bot pushed a commit to Abaso007/SpacetimeDB that referenced this pull request Sep 9, 2026
)

## Summary
- Update automatic migration docs to reflect empty-table removal
behavior.
- Document accessor/source-name metadata changes and index accessor
rename limits.
- Add a public MCP reference covering `spacetime mcp`, host-wide vs
database-scoped tool shapes, permissions, and common errors.
- Align the TypeScript server skill and bundled plugin copy so scheduled
procedures point to `onSchedule`.
- Fix the TypeScript procedures reference so it no longer claims
`spacetimedb.procedure` takes a procedure name argument.
- Clarify scheduled interval timing and connection ID availability in
reducer context docs.

# API and ABI breaking changes

n/a

# Rollback safety impact

n/a

# Expected complexity level and risk

1 - docs-only audit updates.

## Audit notes
- Baseline: existing open `bot/docs-audit` PR clockworklabs#5723; merged current
`origin/master` into `bot/docs-audit` before today's audit pass.
- 2026-08-15 commit-impact pass checked new master commits `b1291ee11` /
clockworklabs#5751 (C# HTTP timeout clamp), `0948a1b3b` / clockworklabs#5752 (2.8.2 version bump),
and `524b4487d` / clockworklabs#5583 (LLM benchmark evals and server skill updates).
- Checked the changed server skill guidance from clockworklabs#5583 against public
docs for procedures, HTTP, scheduled procedures, views/query-builder
views, view primary keys, client visibility filters, schedule tables,
defaults, lifecycle connection IDs, and deterministic context guidance.
- Checked clockworklabs#5751 against public procedure HTTP docs; the 30-second
default and 180-second maximum timeout are already documented.
- 2026-08-16 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, SDK APIs, server module APIs, auth,
onboarding, deployment, MCP, scheduling, and cross-language examples.
- Source PR for the 2026-08-16 correction:
clockworklabs#5728 documented
TypeScript `onSchedule` registration for scheduled reducers/procedures;
the TypeScript server skill still had one stale scheduled-procedure
sentence and the plugin skill copy had not been synced.
- 2026-08-17 commit-impact pass found no new `origin/master` commits
after the 2026-08-16 audit baseline.
- 2026-08-17 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, SDK APIs, server module APIs, auth,
onboarding, deployment, MCP, scheduling, and cross-language examples.
- The 2026-08-17 correction is not from a new master PR; it aligns the
TypeScript procedures reference with current TypeScript module
examples/tests and the TypeScript server skill. Procedure names come
from exported values, not a name argument to `spacetimedb.procedure`.
- 2026-08-18 commit-impact pass checked new master commits `053742688` /
clockworklabs#5735 (scheduled functions reschedule from intended execution time and
skip missed interval ticks) and `e1da590b7` / clockworklabs#5732 (submodule function
call separators docs fix).
- Source PR for the 2026-08-18 scheduler correction:
clockworklabs#5735 changed interval
rescheduling semantics; schedule table docs now state that missed
interval ticks are skipped and future ticks stay anchored to intended
run times.
- 2026-08-18 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, SDK APIs, server module APIs, auth,
onboarding, deployment, scheduling, lifecycle contexts, and
cross-language consistency.
- The reducer context reference previously said lifecycle reducers may
lack `connectionId`; it now distinguishes `init`/scheduled/no-connection
calls from client-connected and client-disconnected reducers.
- Unrelated untracked local files were present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.

## Validation
- `pnpm --dir docs typecheck`
- `pnpm --dir docs build` (passed; emitted existing llms-txt warning for
`/docs/ask-ai/ask-ai` empty-content conversion)
- Previous validations on this PR: `pnpm build`, `node
codex-plugin/scripts/check-skills-sync.ts`, `git diff --check --
docs/docs/00200-core-concepts/00200-functions/00400-procedures.md`
- 2026-08-22 commit-impact pass checked new master commits `7c888afe8` /
clockworklabs#5576 (.NET 10 support and C# LLM benchmark cleanup), `6dee26c6e` /
clockworklabs#5764 (2.8.3 version bump), `8e410d284` / clockworklabs#5758 (unused dependency
cleanup), `8cb9d652d` / clockworklabs#5716 (standalone-supported smoketests in public
CI), `6bbe5f2eb` / clockworklabs#5774 (standalone module HTTP config), `e9f37a173` /
clockworklabs#5753 (public CI build-time reduction), and `fb7282411` / clockworklabs#5770 (absent
table pages in snapshots).
- Checked clockworklabs#5774 against public standalone configuration docs; the new
`[module-http]` setting is already documented on `master` and did not
need an audit-branch correction.
- 2026-08-22 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, TypeScript/C#/Rust/C++ server APIs,
client SDK APIs, auth/onboarding, deployment, procedures/HTTP, schedule
tables, views, table accessors, MCP, and cross-language naming
consistency.
- The 2026-08-22 correction is not from a new master PR; it aligns
TypeScript public docs examples with the TypeScript server skill and
tables reference: `schema({...})` keys become server `ctx.db` accessors
verbatim, so examples now use snake_case keys matching table names
instead of camelCase accessors.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-08-22 validation: `pnpm --dir docs typecheck`; `pnpm --dir docs
build` (passed; emitted existing Docusaurus/browserslist freshness
notices and existing llms-txt warning for `/docs/ask-ai/ask-ai`
empty-content conversion).

- 2026-08-24 commit-impact pass checked new master commit `310d2e660` /
clockworklabs#5517 (websocket liveness checks and idle timeout close behavior).
Standalone websocket configuration docs already describe
`ping-interval`, `idle-timeout`, `close-handshake-timeout`, and
`incoming-queue-length`; no new docs correction was needed.
- 2026-08-24 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, TypeScript/C#/Rust/C++ server APIs,
client SDK APIs, auth/onboarding, deployment, MCP, scheduling, views,
table accessors, websocket config, and cross-language naming
consistency. No additional high-confidence mismatch was found.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master`; no new docs edits were added in this run.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-08-24 validation: `pnpm --dir docs typecheck`; `pnpm --dir docs
build` (passed; emitted existing Docusaurus update/browserslist
freshness notices and existing llms-txt warning for
`/docs/ask-ai/ask-ai` empty-content conversion).


- 2026-08-25 commit-impact pass checked new master commits `1740adf6e` /
clockworklabs#5640 (log level audit), `cfa9636a6` / clockworklabs#5775 (MCP route egress
tracking), `ee0892a8d` / clockworklabs#5785 (commitlog rotation/compression
durability fix), `36ad4bafa` / clockworklabs#5571 (.NET version and host OS
handling), and `2432a84b6` / clockworklabs#5780 (remove Emscripten from linux
smoketests).
- Source PR for the 2026-08-25 correction:
clockworklabs#5571 changed NativeAOT
host/version support checks; the CLI reference and CLI help now say
NativeAOT is supported on Windows and on Linux with .NET 10, instead of
Windows only.
- 2026-08-25 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, C#/Rust/TypeScript/C++ server APIs,
client SDK APIs, auth/onboarding, deployment, MCP, scheduling, views,
table/index accessors, and cross-language consistency.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master` and adding the NativeAOT support wording correction.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-08-25 validation: `git diff --check`; `cargo test -p
spacetimedb-cli dotnet --lib`.

- 2026-08-26 commit-impact pass checked new master commits `c0c19366a` /
clockworklabs#5761 (TypeScript provider reconnect token retention), `dd804c939` /
clockworklabs#5738 (Unity static state reset for generic table handles), `74167cc4e`
/ clockworklabs#5765 (module host init failure metric cause label), `ea1f39f13` /
clockworklabs#5792 (Unity WebGL IEnumerator import), `dca219155` / clockworklabs#5817 (codegen git
hash build-script move), and `2f268a89f` / clockworklabs#5819 (docs logo update).
- Checked clockworklabs#5761 against TypeScript client/provider connection docs and
token persistence examples; provider reconnect behavior and lower-level
`DbConnection` responsibilities are already documented.
- Checked clockworklabs#5738/clockworklabs#5792 against Unity setup/client docs; the Unity
tutorial already notes SDK static state reset with Domain Reloading
disabled, and the WebGL IEnumerator fix is an internal import correction
with no public docs change needed.
- Checked clockworklabs#5765 against public docs/skills; no public metrics reference
documents `spacetime_module_host_init_failures_total`, so no docs
correction was needed.
- 2026-08-26 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, TypeScript/C#/Rust/C++ server APIs,
client SDK APIs, auth/onboarding, deployment, MCP, scheduling,
Unity/WebGL, table/index accessors, and cross-language consistency. No
additional high-confidence mismatch was found.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master`; no new docs edits were added in this run.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-08-26 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `pnpm --dir docs typecheck`;
`pnpm --dir docs build` (passed; emitted existing Docusaurus
update/browserslist freshness notices and existing llms-txt warning for
`/docs/ask-ai/ask-ai` empty-content conversion).


- 2026-08-27 commit-impact pass checked new master commits `79b79e94d` /
clockworklabs#5794 (C# connection cleanup/leak fixes), `0a1b68d78` / clockworklabs#5797 (CI
build/test-suite cleanup), `6c3572e25` / clockworklabs#5565 (C++ multi-column support
for 3+ column queries), `0bc1b0d73` / clockworklabs#5824 (unexpected module host exit
metric), and `c1118efbb` / clockworklabs#5809 (commitlog decode error offsets).
- Source PR for the 2026-08-27 correction:
clockworklabs#5565 added C++ compile
coverage for 3+ column multi-column index filters and trailing range
filters; the indexes docs now state the generalized prefix/range rule
and the C++ range helper include behavior.
- Checked clockworklabs#5794 against C# client/Unity docs and skills for connection
callbacks, `FrameTick`, token persistence, and disconnect behavior; no
public docs correction was needed beyond existing guidance.
- Checked clockworklabs#5824 against public docs/skills; no public metrics reference
documents the new unexpected module host exit metric, so no docs
correction was needed.
- 2026-08-27 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, TypeScript/C#/Rust/C++ server APIs,
client SDK APIs, auth/onboarding, deployment, MCP, scheduling,
Unity/Unreal ticking, table/index accessors, and cross-language
consistency.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master` and adding the C++ multi-column range query wording
correction.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-08-27 validation: `git diff --check`; `node
codex-plugin/scripts/check-skills-sync.ts`; `pnpm --dir docs typecheck`;
`pnpm --dir docs build` (passed; emitted existing Docusaurus
update/browserslist freshness notices and existing llms-txt warning for
`/docs/ask-ai/ask-ai` empty-content conversion).



- 2026-08-30 commit-impact pass checked current master commits
`9e0d92412` / clockworklabs#5815 (merge-queue workflow reuse), `436b3e57a` / clockworklabs#5825
(procedure metrics attribution), and `69cd1ca3b` / clockworklabs#5833 (2.9.0 version
bump).
- Checked clockworklabs#5825 against public procedure/docs skill coverage; the change
is internal metrics attribution and no public metrics reference
documents the affected procedure metric behavior, so no docs correction
was needed.
- Checked clockworklabs#5833 against public docs and skills for version-specific
installation snippets, TypeScript package metadata, C# package
references, and tutorial version claims; no high-confidence public docs
drift was found.
- 2026-08-30 skills/docs consistency pass compared `skills/*/SKILL.md`
against public docs for CLI flows, TypeScript/C#/Rust/C++ server APIs,
client SDK APIs, auth/onboarding, deployment, MCP, scheduling, views,
event tables, table/index accessors, procedure/HTTP APIs,
Unity/Godot/Unreal ticking, and cross-language naming consistency. No
additional high-confidence mismatch was found.
- Updated the existing open `bot/docs-audit` PR description only; no new
docs edits or commits were added in this run.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-08-30 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `git diff --check`; `pnpm
--dir docs typecheck`.



- 2026-09-01 commit-impact pass checked new master commits `ffc2e4820` /
clockworklabs#5768 (snapshot worker now publishes `Option<TxOffset>`) and `b0661c3cc`
/ clockworklabs#5850 (public release workflow rejects direct manual invocations).
- Checked clockworklabs#5768 against public docs and skills; the changed snapshot
worker watch API is internal engine plumbing and no public docs
correction was needed.
- Checked clockworklabs#5850 against public docs and skills; the direct public
release workflow guard is internal release automation behavior and no
public docs correction was needed.
- 2026-09-01 skills/docs consistency pass compared all 11
`skills/*/SKILL.md` files against public docs for CLI flows,
TypeScript/C#/Rust/C++ server APIs, client SDK APIs, Unity/Unreal
ticking, auth/onboarding, deployment, MCP, scheduling, procedures/HTTP,
views, indexes, and cross-language naming consistency. No additional
high-confidence mismatch was found.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master`; no new docs edits were added in this run.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-09-01 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `git diff --check`; `pnpm
--dir docs typecheck`.

- 2026-09-02 commit-impact pass checked new master commits `f49ceae3a` /
clockworklabs#5830 (commitlog fdatasync on segment open), `5f3e26bf2` / clockworklabs#5829
(commitlog write-failure regression test), `c97256c88` / clockworklabs#5857 (CI
ubuntu version pinning), `a272e1919` / clockworklabs#5852 (Unity WebGL build
coverage), `7c462bb47` / clockworklabs#5731 (rollback safety PR checks), `549489e97`
/ clockworklabs#5707 (TypeScript SDK routes established websocket errors to
`onDisconnect`), and `f08dc302a` / clockworklabs#5836 (C++ auto-increment macro
symbol collision fix).
- Checked clockworklabs#5707 against TypeScript client reference and troubleshooting
docs; `onDisconnect` already documents disconnects due to errors, and
troubleshooting already tells users to register
`onConnectError`/`onDisconnect` callbacks.
- Checked clockworklabs#5836 against C++ server skill/docs for auto-increment macros
and range-query include guidance; no public docs correction was needed.
- Checked clockworklabs#5852 against Unity client docs and skill guidance for
WebGL/ticking; the change adds CI coverage and no public docs correction
was needed.
- 2026-09-02 skills/docs consistency pass compared all 11
`skills/*/SKILL.md` files against public docs for CLI flows,
TypeScript/C#/Rust/C++ server APIs, client SDK APIs, Unity/Unreal
ticking, auth/onboarding, deployment, MCP, scheduling, procedures/HTTP,
views, indexes, and cross-language naming consistency. No additional
high-confidence mismatch was found.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master`; no new docs edits were added in this run.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-09-02 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `git diff --check`; `pnpm
--dir docs typecheck`; `pnpm --dir docs build` (passed; emitted existing
Docusaurus update/browserslist freshness notices and existing llms-txt
warning for `/docs/ask-ai/ask-ai` empty-content conversion).


- 2026-09-03 commit-impact pass checked new master commits `2fc8f8221` /
clockworklabs#5849 (RootRoutes for `/v1/mcp`) and `2fe329243` / clockworklabs#5861 (CI runner
label update).
- Source PR for the 2026-09-03 MCP endpoint correction:
clockworklabs#5849 added root-route
support for `/v1/mcp`; the public MCP reference now documents direct
HTTP MCP endpoints alongside `spacetime mcp`.
- Checked clockworklabs#5861 against public docs and skills; the CI runner label
change is internal workflow plumbing and no public docs correction was
needed.
- 2026-09-03 skills/docs consistency pass compared all 11
`skills/*/SKILL.md` files against public docs for CLI flows,
TypeScript/C#/Rust/C++ server APIs, client SDK APIs, Unity/Unreal
ticking, auth/onboarding, deployment, MCP, scheduling, procedures/HTTP,
views, indexes, and cross-language naming consistency.
- Also corrected the TypeScript lifecycle docs to guard nullable
`ctx.connectionId`, matching the TypeScript server skill and reducer
context reference.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master` and adding the MCP/lifecycle docs corrections.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-09-03 validation: `pnpm --dir docs build` (passed; emitted
existing Docusaurus update/browserslist freshness notices and existing
llms-txt warning for `/docs/ask-ai/ask-ai` empty-content conversion).


- 2026-09-04 commit-impact pass checked new master commits `28071acff` /
clockworklabs#5610 (C# generated direct dispatch for reducers, procedures, HTTP
handlers, views, and anonymous views), `53772f867` / clockworklabs#5866 (jsonwebtoken
11 upgrade and custom header-field regression coverage), `3663fa112` /
clockworklabs#5867 (`spacetime dev` no longer forwards C#-only .NET options to non-C#
templates), `0c0365406` / clockworklabs#5868 (2.10.0 version bump), and `baca5cdf7` /
clockworklabs#5848 (CI runner caching with sccache).
- Source PR for the 2026-09-04 C# snippet correction:
clockworklabs#5610 reinforced
generated C# module entrypoint dispatch through public static module
members; public docs now consistently show `public static partial class
Module` in C# module examples.
- Checked clockworklabs#5866 against public auth/key-architecture docs and skills;
the JWT library upgrade and custom header handling are implementation
hardening and no public docs correction was needed.
- Checked clockworklabs#5867 against CLI docs and the CLI skill; `spacetime
dev`/`init` .NET option wording already describes C# targeting without
telling non-C# users to pass C#-only options.
- Checked clockworklabs#5868 against install/package snippets and versioned
references; no high-confidence public docs drift was found beyond
current examples using wildcard or unpinned package versions where
appropriate.
- 2026-09-04 skills/docs consistency pass compared all 11
`skills/*/SKILL.md` files against public docs for CLI flows,
TypeScript/C#/Rust/C++ server APIs, client SDK APIs, Unity/Unreal
ticking, auth/onboarding, deployment, MCP, scheduling, procedures/HTTP,
views, indexes, and cross-language consistency.
- Also corrected access-permissions view wording so it no longer says
views can iterate full tables, and fixed a duplicate C# RLS filter
constant in the recursive-rules example.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master` and adding the C# module snippet/view-access
corrections.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-09-04 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `git diff --check`; `pnpm
--dir docs typecheck`; `pnpm --dir docs build` (passed; emitted existing
Docusaurus update/browserslist freshness notices and existing llms-txt
warning for `/docs/ask-ai/ask-ai` empty-content conversion).


- 2026-09-05 commit-impact pass checked new master commits `9cfb2b7e9` /
clockworklabs#5871 (npm release workflow uses GitHub-provided runner) and `3653d2ed4`
/ clockworklabs#5872 (`update-mirror-latest-version` release workflow uses
`ubuntu-latest`). Both are internal release automation changes and no
public docs correction was needed.
- 2026-09-05 skills/docs consistency pass compared all 11
`skills/*/SKILL.md` files against public docs for CLI flows,
TypeScript/C#/Rust/C++ server APIs, client SDK APIs, Unity/Unreal
ticking, auth/onboarding, deployment, MCP, scheduling, procedures/HTTP,
views, indexes, and cross-language consistency. No additional
high-confidence mismatch was found.
- Updated the existing open `bot/docs-audit` PR by merging current
`origin/master`; no new docs edits were added in this run.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-09-05 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `git diff --check`; `pnpm
--dir docs typecheck`.



- 2026-09-06 commit-impact pass found no new `origin/master` commits
after the 2026-09-05 audit baseline; `bot/docs-audit` was already up to
date with current `origin/master` after fetch.
- 2026-09-06 skills/docs consistency pass compared all 11
`skills/*/SKILL.md` files against public docs for CLI flows,
TypeScript/C#/Rust/C++ server APIs, client SDK APIs, Unity/Unreal
ticking, auth/onboarding, deployment, MCP, scheduling, lifecycle
contexts, procedures/HTTP, views, indexes, and cross-language
consistency.
- The 2026-09-06 correction is not from a new master PR; it aligns
lifecycle reducer examples with the nullable/optional connection ID API
shape used by the language SDKs and server skills.
- Updated the existing open `bot/docs-audit` PR with the lifecycle
connection ID example correction.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-09-06 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `git diff --check --
docs/docs/00200-core-concepts/00200-functions/00300-reducers/00500-lifecycle.md`;
`pnpm --dir docs typecheck`.


- 2026-09-08 commit-impact pass found no new `origin/master` commits
after the current `bot/docs-audit` branch's merged `origin/master`
baseline; `git log HEAD..origin/master` was empty after fetch and merge
preflight reported the branch already up to date.
- 2026-09-08 skills/docs consistency pass compared all 11
`skills/*/SKILL.md` files against public docs for CLI flows,
TypeScript/C#/Rust/C++ server APIs, client SDK APIs, Unity/Unreal
ticking, auth/onboarding, deployment, MCP, scheduling, lifecycle
contexts, procedures/HTTP, views, indexes, and cross-language
consistency.
- The 2026-09-08 correction is not from a new master PR; it aligns
current TypeScript docs snippets with the TypeScript server/client skill
casing guidance by using camelCase for TypeScript exports, schema
keys/accessors, reducer/procedure arguments, and row fields while
preserving explicit `name: 'snake_case'` canonical database names where
shown.
- Updated the existing open `bot/docs-audit` PR with the TypeScript
casing correction.
- Unrelated untracked local files remained present at repo root
(`.openclaw/`, `AGENTS.md`, `HEARTBEAT.md`, `IDENTITY.md`, `SOUL.md`,
`TOOLS.md`, `USER.md`) and were left untouched.
- 2026-09-08 validation: `node
codex-plugin/scripts/check-skills-sync.ts`; `git diff --check --
docs/docs`; TypeScript docs casing scanner for current TypeScript/TSX
docs blocks (only external OIDC field names remain snake_case); `pnpm
--dir docs typecheck`; `pnpm --dir docs build` (passed; emitted existing
Docusaurus update/Browserslist freshness notices and existing llms-txt
warning for `/docs/ask-ai/ask-ai` empty-content conversion).

---------

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
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.

2 participants