-
Notifications
You must be signed in to change notification settings - Fork 680
Small docs improvement #4071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small docs improvement #4071
Conversation
- Update table_name() to convert lowercase singular names to appropriate case per language (C#: PascalCase, Rust: snake_case) - Update all spec.rs files to use table_name() instead of hardcoded names - Update Rust task prompts to use singular table names (users → user) - Update Rust golden answers to use singular table/struct names and accessor methods (ctx.db.users() → ctx.db.user()) This fixes the C# benchmark test failures caused by table name mismatches where the LLM generates "User" but tests query for "users".
- Add compute_processed_context_hash() for language-specific hash computation after tab filtering is applied - Update CI check to verify both rustdoc_json and docs modes for Rust - Fix hash-only mode to skip golden builds - Update benchmark analysis with latest results
The llm-benchmark-update workflow builds the tool from master to save benchmark results. The CI check must also use master's tool to compute hashes the same way, otherwise hash mismatches occur when the PR branch has different hash computation logic.
- Add detection for WASI SDK tar extraction failures (wasi-sdk + tar, MSB3073 with exit code 2) as transient errors that should be retried - Increase max retries from 2 to 3 for build commands - Add 1-3 seconds of jitter to retry delays to desynchronize parallel builds that fail simultaneously, reducing the chance of repeated collisions
…missions - Add pagination_next to React quickstart to fix "Next" button linking to itself - Fix Rust type table: Duration → TimeDuration to match example code - Fix TypeScript optional column indexing to use table-level syntax
Documents that module-level state does not persist across reducer calls and that all persistent state must be stored in tables.
Covers inline binary storage, external storage with references, and hybrid approaches for thumbnails. Includes practical examples for all three server languages.
Adds a practical Quick Start example showing how to: - Set up subscriptions - Use row callbacks (onInsert, onDelete, onUpdate) - Understand the subscription flow Examples provided for TypeScript, C#, and Rust clients.
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com> Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
b0732c8 to
721eae2
Compare
… non-persistent Explains the multiple reasons why relying on module-level state is undefined: fresh instances, module updates, concurrent execution, crash recovery, non-transactional updates, and replay safety.
- Change generate output path from ../client-unity/Assets/autogen to ../Assets/autogen - Fix Rust directory references from server-rust to spacetimedb to match what spacetime init creates
- Update inline storage recommendations to reflect ~100MB capability - Add pricing context ($1/GB) for choosing between inline and external storage - Fix Unity tutorial generate command path (../Assets/autogen not ../client-unity/Assets/autogen) - Fix Rust directory references from server-rust to spacetimedb
Strip volatile fields that change every run: - Timestamps (started_at, finished_at) - Local paths (work_dir_golden, work_dir_llm) - Temp database names (golden_db, llm_db) - Server port numbers from scorer notes Also clear llm_output for passing tests (keep for failures for debugging).
Add documentation for calling between reducers and procedures: - Add "Calling Reducers from Procedures" section showing how to invoke reducer functions within withTx blocks - Add "Scheduling Procedures" section explaining how reducers can schedule procedures via schedule tables - Add tip to schedule-tables.md clarifying procedure scheduling
- Wrap code snippets inside reducer functions - Fix TypeScript: ctx.timestamp.microseconds → ctx.timestamp.microsSinceUnixEpoch - Fix Rust: use std::time::Duration instead of spacetimedb::Duration All examples verified to compile in TypeScript, Rust, and C#.
Change UploadToS3 procedure to return string instead of Result<string, string> since sum types cannot be used as procedure return types for client code generation. Use exceptions for error handling instead of Result.Err.
Add missing C# tab showing how to generate pre-signed URLs for client-side uploads and confirm uploads via reducer.
Wrap C# code snippets in public static partial class Module to match the standard SpacetimeDB C# module pattern and ensure examples compile.
|
/update-llm-benchmark |
LLM Benchmark Results (ci-quickfix)
Compared against master branch baseline Generated at: 2026-01-22T23:45:28.101Z Failure Analysis (click to expand)Benchmark Failure AnalysisGenerated from: Summary
SpacetimeDB Benchmark Test Failures AnalysisThis document analyzes the SpacetimeDB benchmark test failures. Each failure is broken down into its components, specifying the discrepancies between the generated code and the expected golden examples. Specific, actionable recommendations for documentation adjustments are provided to avoid such issues in the future. Rust / rustdoc_json Failures1. General Errors with Code GenerationFailures Overview: The following tests failed due to various issues regarding table definitions, missing
|
|
/update-llm-benchmark |
LLM Benchmark Results (ci-quickfix)
Compared against master branch baseline Generated at: 2026-01-27T17:31:13.034Z Failure Analysis (click to expand)Benchmark Failure AnalysisGenerated from: Summary
Analysis of SpacetimeDB Benchmark Test FailuresRust /
|
…nto tyler/claude-docs-6
|
/update-llm-benchmark |
LLM Benchmark Results (ci-quickfix)
Compared against master branch baseline Generated at: 2026-01-27T20:01:19.767Z Failure Analysis (click to expand)Benchmark Failure AnalysisGenerated from: Summary
Analysis of SpacetimeDB Benchmark Test FailuresRust / rustdoc_json FailuresCompile/Publish Errors (2 Failures)Failure Group 1:
|
# Description of Changes
Two documentation improvements:
1. **Reducers documentation**: Clarified that using global/static
variables in reducers is **undefined behavior**, not just "values won't
persist". Added six specific reasons why this is undefined:
- Fresh execution environments
- Module updates
- Concurrent execution
- Crash recovery
- Non-transactional updates
- Replay safety
2. **Access permissions documentation**: Replaced the "Combining Both
Techniques" example that used indexes on Option fields (which
SpacetimeDB doesn't support) with a working example that filters by a
required `department` field instead.
# API and ABI breaking changes
None. Documentation only.
# Expected complexity level and risk
1 - Documentation changes only.
# Testing
- [ ] Verify the reducers warning is clear and accurate
- [ ] Verify the access permissions example compiles and makes sense
---------
Signed-off-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Description of Changes
Two documentation improvements:
Reducers documentation: Clarified that using global/static variables in reducers is undefined behavior, not just "values won't persist". Added six specific reasons why this is undefined:
Access permissions documentation: Replaced the "Combining Both Techniques" example that used indexes on Option fields (which SpacetimeDB doesn't support) with a working example that filters by a required
departmentfield instead.API and ABI breaking changes
None. Documentation only.
Expected complexity level and risk
1 - Documentation changes only.
Testing