Skip to content

perf(module): stop retaining transient notification rows - #710

Merged
Mathih13 merged 2 commits into
mainfrom
perf/native-notifications
Oct 16, 2026
Merged

Mathih13 merged 2 commits into
mainfrom
perf/native-notifications

Conversation

@Mathih13

@Mathih13 Mathih13 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Combat, spell, Speech and emote notifications stay in ordinary tables until event GC deletes them. Dense activity adds retained rows, SDK cache copies and delete updates for messages that clients need once.

Write these five notification types to additive native *_event_live tables. Keep the legacy table schemas and their GC path. Update Relays and durable tests to observe inserts. Group notifications and retained System Messages keep their existing delivery rules.

Part 1 of 6. Base: main. Merged in stack order. Next: #711.

Verification

Notification assertions now wait for a marker on the same subscription stream before checking absence or exact counts.

Two independent adversarial review rounds are complete. No actionable finding remains. The reviewed stack passed offline binding generation, formatting, workspace Clippy with all targets and features, and the Gateway unit and integration test targets. The Gateway binary passed 2,148 tests. Local builds used one job; no local SpacetimeDB instance or load test ran.

All nine checks passed at 2c9e5e07: Module durable tests and Gateway bindings, Runtime Scripts, Rust.

Comment review passed for the final changed source, tests, scripts and configuration. Retained protocol and ordering contracts match the code.

Verification limits

A real build-5875 client and capacity measurements were not run. The inherited SDK ordering gap for multiple notifications within one transaction remains; cross-transaction checks do not prove that order. No capacity gain is claimed.

Risk

The Module and Gateway must change together. Stop the Gateway, publish the matching Module to every configured Shard, then start the Gateway. Old Gateways subscribe to the old table names. Native events have no replay after Transport Loss; event inserts still enter the commit log. See docs/danger-zones.md for the upgrade sequence.

Models: GPT-6 Astra and GPT-6.1 Sol. Harness: Codex in T3 Code.

@Mathih13
Mathih13 merged commit 9fed541 into main Oct 16, 2026
9 checks passed
@Mathih13

Copy link
Copy Markdown
Contributor Author

Merged after adversarial review and repairs. Added subscription markers so notification absence and exact-count assertions wait for committed updates to reach the recorder.

All nine checks passed at 2c9e5e07: Module durable tests and Gateway bindings, Runtime Scripts, Rust.

Comment review passed. No real-client or capacity measurement is claimed.

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.

1 participant