Skip to content

Make cargo ci regen exhaustive across all committed codegen#4300

Open
cloutiertyler wants to merge 34 commits intomasterfrom
tyler/cargo-ci-regen-exhaustive
Open

Make cargo ci regen exhaustive across all committed codegen#4300
cloutiertyler wants to merge 34 commits intomasterfrom
tyler/cargo-ci-regen-exhaustive

Conversation

@cloutiertyler
Copy link
Contributor

Summary

  • Restructures cargo ci regen into 5 logical categories covering all committed codegen in the repo:
    1. SDK test bindings — Rust (5 pairs), C# regression tests (3 pairs), Unreal (2 pairs)
    2. Demo project bindings — Blackholio Unity C# + Unreal C++
    3. Starter template bindings — C#, Rust, TS (auto-discovered via pnpm), deno-ts, Unreal QuickstartChat
    4. SDK internal codegen — TS client-api, C# ClientApi, TS test-app, TS test-react-router-app
    5. Moduledef type bindings — C#, TS, C++, Unreal SDK
  • Adds generate scripts to 5 TS templates that were missing them (browser-ts, bun-ts, nodejs-ts, tanstack-ts, keynote-2)
  • Adds 5 missing templates to pnpm-workspace.yaml (bun-ts, nodejs-ts, nextjs-ts, remix-ts, keynote-2)
  • Adds autogen coverage check (--check mode) that scans the repo for autogen markers and errors if any directory isn't in the REGEN_DIRS allowlist
  • Adds template generate script check that catches templates with committed bindings but no generate script
  • Adds version-only change revert so running cargo ci regen doesn't produce noisy diffs when the only change is the commit hash in codegen version comments
  • Adds Windows global.json symlink fix that temporarily patches broken symlinks (from core.symlinks=false) during regen and restores them after
  • Also regenerates stale codegen (C++ moduledef, C# procedure-client, C# ClientApi, TS test-react-router-app, chat templates)

Test plan

  • cargo build --manifest-path tools/ci/Cargo.toml compiles
  • cargo ci regen runs to completion and generates all bindings
  • cargo ci regen --check passes on a clean state (no stale bindings)
  • Version-only changes are correctly reverted (no commit-hash-only diffs)
  • Autogen coverage check catches any uncovered directories
  • Template generate coverage check catches missing generate scripts

cloutiertyler and others added 28 commits February 13, 2026 13:35
…ings-macro, and codegen

- Add `event` attribute to #[table] macro for declaring event tables
- Add CanBeLookupTable trait (non-event tables implement it)
- Generate CanBeLookupTable impls in Rust codegen
- Update physical plan and query-builder for event table support
- Update module-test with example event table
- Update codegen snapshots
- Add EventTable trait for transient event table rows (no client cache persistence)
- Add from_event_inserts() and into_event_diff() for event table update handling
- Parse EventTable rows from v2 TableUpdateRows
- Exclude event tables from automatic subscription plans (get_all)
- Reject v1 client subscriptions to event tables with upgrade message
- Prevent event tables from being used as join lookup tables
- Export EventTable in SDK public API
- Add sdk-test-event-table module with event table and reducers
- Add event-table-client test binary with generated bindings
- Register event-table-client and sdk-test-event-table in workspace
- Update test configuration
- Add event-tables-status.md tracking implementation progress
- Add 1.0 to 2.0 migration guide
The MyEvent table and emit_event reducer belong in sdk-test-event-table,
not in module-test which must stay in sync with C# and TypeScript modules.
- Rust codegen: branch on is_event to emit EventTable trait, skip delete/update callbacks
- TS module bindings: add event option to table(), pass isEvent through schema
- TS codegen: emit event: true for event tables
- TS client SDK: event tables fire on_insert but skip cache storage
- C# SDK: IsEventTable flag, parse EventTableRows, skip cache/indices, fire OnInsert only
- C# codegen: pass isEventTable: true in constructor for event tables
- Datastore: 5 new tests for constraints/indexes/auto_inc on event tables
- Docs: update event-tables-status.md with completed items
Event tables only expose onInsert/removeOnInsert at the type level,
matching the Rust SDK's EventTable trait. Split ClientTableMethods into
ClientTableInsertMethods and ClientTableDeleteMethods, and use an
IsEventTable conditional type in ClientTableCore to exclude delete and
update methods for event tables.
…s in C# SDK

Event tables only expose OnInsert at the type level, matching Rust's
EventTable trait and the TypeScript conditional types. RemoteEventTableHandle
inherits from RemoteTableHandle and uses private new to shadow the
OnDelete, OnBeforeDelete, and OnUpdate events. Codegen generates event
table classes inheriting from RemoteEventTableHandle instead.
At some point, a rebase on this branch appears to have accidentally overwritten
the Rust codegen changes in #4257 .
This commit fixes that, to integrate the event tables codegen changes
with the prior WS V2 codegen changes.

I've also taken the minor liberty of re-ordering the emitted top-level forms
in a table definition file, in order to allow merging the definitions of
`register_table` and `parse_table_update`,
which this branch previously had duplicated into the `if` and `else` cases
of the conditional on whether the table was an event table or not.
Plus I added a few comments.
…eforeDelete/OnUpdate from RemoteEventTableHandle
The server was always sending event table rows as PersistentTable inserts,
causing clients to store them in the cache. Fix the server to send the
EventTable variant, fix Rust codegen to use into_event_diff() (bypassing
the cache), revert C# Table.cs tolerance checks that are no longer needed,
and fix event table test race conditions where tests passed without actually
running assertions.
The V9→V10 change in extract_schema marks lifecycle reducers as private,
so they are no longer included in public codegen output. This removes
stale on_connect/on_disconnect reducer files from the chat template and
updates smoketest expected namespace counts from 7 to 5.
Regenerate stale Rust SDK test bindings (CanBeLookupTable impls,
blank line formatting, player_location_table in view-client) to
fix the Test Suite CI check-diff failure.

Add `cargo ci regen` subcommand that regenerates all codegen outputs
checked by CI in one step: Rust SDK test bindings, Blackholio C#,
C# moduledef, C# quickstart/regression tests, TypeScript template
bindings, and TS/C++ moduledef bindings.
Add a `consume_entity_event` event table to the Blackholio server
module. When an entity is consumed, insert an event before destroying
it so the Unity client can play a shrink-toward-consumer animation
instead of immediately destroying the GameObject.

Client-side changes:
- Register ConsumeEntityEvent.OnInsert handler
- Track pending animations with HashSet to coordinate with Entity.OnDelete
- Clean up old TODO comments in EntityController
Run `cargo ci regen --check` to regenerate all bindings and then
verify nothing changed via tools/check-diff.sh. Fails with a clear
error message if any bindings are stale.
Regenerated bindings for C++ moduledef, C# procedure-client,
C# ClientApi, TS test-react-router-app, chat templates (C#, Rust, deno-ts).
Lifecycle reducers (ClientConnected/ClientDisconnected) removed from
chat templates as they are no longer generated.
@cloutiertyler cloutiertyler force-pushed the tyler/cargo-ci-regen-exhaustive branch from f844795 to 87a0d5d Compare February 15, 2026 19:50
- Restructure regen into 5 categories: SDK test, demo, template, SDK internal, moduledef
- Add Unreal codegen support (SDK tests, Blackholio, QuickstartChat, SDK moduledef)
- Add deno-ts, Rust chat-console-rs, TS test-react-router-app template regen
- Add C# ClientApi and TS client-api SDK internal regen
- Add autogen coverage check to catch uncovered committed codegen
- Add template generate script coverage check
- Skip .templates dir in global.json symlink scanning (build artifact)
- Fix Windows path normalization in global.json symlink restore
- Add prettier retry for Windows file locking issues
- Switch Blackholio server-rust to local path dependency for event table support
- Add `generate` scripts to TS templates: browser-ts, bun-ts, nodejs-ts, tanstack-ts, keynote-2
- Add missing template entries to pnpm-workspace.yaml
@cloutiertyler cloutiertyler force-pushed the tyler/cargo-ci-regen-exhaustive branch from 87a0d5d to 426fa4d Compare February 15, 2026 20:43
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.

3 participants