-
Notifications
You must be signed in to change notification settings - Fork 680
Upgrade version to 1.12.0 #4084
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
Conversation
ca0bf7c to
1c263a6
Compare
…tool' into jdetter/upgrade-version-upgrade-tool
1c263a6 to
c80e554
Compare
c80e554 to
04a8429
Compare
|
/update-llm-benchmark |
LLM Benchmark Results (ci-quickfix)
Compared against master branch baseline Generated at: 2026-01-25T02:39:25.598Z Failure Analysis (click to expand)Benchmark Failure AnalysisGenerated from: Summary
SpacetimeDB Benchmark Test Failure AnalysisSummary of AnalysisThis document organizes the test failures by language (Rust, C#, etc.) and provides detailed analysis of common issues. Each failure will include comparisons between the LLM-generated and expected code, identify the root causes, and recommend actionable changes to the documentation. Rust / rustdoc_json Failures (8 total)Common Issues
1. Compile/Publish Errorsa. t_002_scheduled_tableLLM Output: use spacetimedb::{table, reducer, ReducerContext, Table, ScheduleAt};
#[table(name = tick_timer, schedule(reducer = tick, column = scheduled_at))]
pub struct TickTimer {
#[primary_key]
#[auto_inc]
scheduled_id: u64,
scheduled_at: ScheduleAt,
}
#[reducer(init)]
pub fn init(ctx: &ReducerContext) {
if ctx.db.tick_timer().count() == 0 {
ctx.db.tick_timer().insert(TickTimer {
scheduled_id: 0,
scheduled_at: ScheduleAt::RepeatMicros(50_000),
});
}
}Expected (golden): use spacetimedb::{reducer, table, ReducerContext, ScheduleAt, Table};
use std::time::Duration;
#[table(name = tick_timer, scheduled(tick))]
pub struct TickTimer {
#[primary_key]
#[auto_inc]
pub scheduled_id: u64,
pub scheduled_at: ScheduleAt,
}
#[reducer(init)]
pub fn init(ctx: &ReducerContext) -> Result<(), String> {
ctx.db.tick_timer().insert(TickTimer {
scheduled_id: 0,
scheduled_at: ScheduleAt::Interval(Duration::from_millis(50).into()),
});
Ok(())
}Error: Difference:
Root Cause: Recommendation: b. t_017_scheduled_columnsSimilar to t_002_scheduled_table.
2. Other Failuresa. t_012_spacetime_product_typeLLM Output: use spacetimedb::{table, reducer, ReducerContext, Table, SpacetimeType};
#[derive(SpacetimeType)]
struct Score {
left: i32,
right: i32,
}
#[table(name = result)]
struct ResultRow {
#[primary_key]
id: i32,
value: Score,
}
#[reducer]
fn set_score(ctx: &ReducerContext, id: i32, left: i32, right: i32) {
ctx.db.result().insert(ResultRow {
id,
value: Score { left, right },
});
}Expected (golden): use spacetimedb::{reducer, table, ReducerContext, SpacetimeType, Table};
#[derive(SpacetimeType, Clone, Debug)]
pub struct Score {
pub left: i32,
pub right: i32,
}
#[table(name = result)]
pub struct ResultRow {
#[primary_key]
pub id: i32,
pub value: Score,
}
#[reducer]
pub fn set_score(ctx: &ReducerContext, id: i32, left: i32, right: i32) {
ctx.db.result().insert(ResultRow { id, value: Score { left, right } });
}Error: Difference:
Root Cause: Recommendation: Additional Failures
Rust / docs Failures (22 total)The issues observed in the Rust documentation failures mirror the previous section, particularly around building, struct declarations, and public visibility. Example: t_000_empty_reducersThe LLM-generated code lacks return types on various reducers, while the golden example properly uses Actionable Insight: Clearly document the importance of declaring function return types on reducers. C# / docs Failures (5 total)Common Issues:
Example: t_013_spacetime_sum_typeLLM Output: using SpacetimeDB;
using SpacetimeDB.Types;
public static partial class Module
{
[SpacetimeDB.Type]
public partial struct Circle { public int Radius; }
[SpacetimeDB.Table(Name = "Result", Public = true)]
public partial struct Result
{
[SpacetimeDB.PrimaryKey] public int Id;
public Shape Value;
}
}Expected (golden): using SpacetimeDB;
public static partial class Module
{
[Type] public partial struct Circle { public int Radius; }
[Table(Name = "Result")]
public partial struct Result
{
[PrimaryKey] public int Id;
public Shape Value;
}
}Error: Difference: Incorrectly specified Root Cause: Lack of explicit examples and standards regarding visibility and attribute application in the documentation. Recommendation: Incorporate detailed examples that differentiate between public and default access levels, especially in C# attributes. ConclusionThe analysis reveals consistent issues to be addressed across various tests. The primary points of failure involve:
|
ab2fd8f to
a023c85
Compare
# Description of Changes <!-- Please describe your change, mention any related tickets, and so on here. --> This fixes 2 issues with the upgrade version tool: 1. The typescript bindings need to be updated otherwise the typescript test in CI will fail 2. The snapshots need to be updated When the version upgrade tool check in CI runs, snapshot changes are accepted automatically via the `--accept-snapshots` cli argument. When you are running this tool locally without `--accept-snapshots` you will be asked to manually review the snapshot changes before doing a final test to make sure the snapshots are correct. # API and ABI breaking changes <!-- If this is an API or ABI breaking change, please apply the corresponding GitHub label. --> None # Expected complexity level and risk 1 - this just updates the version upgrade tool <!-- How complicated do you think these changes are? Grade on a scale from 1 to 5, where 1 is a trivial change, and 5 is a deep-reaching and complex change. This complexity rating applies not only to the complexity apparent in the diff, but also to its interactions with existing and future code. If you answered more than a 2, explain what is complex about the PR, and what other components it interacts with in potentially concerning ways. --> # Testing <!-- Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected! --> - [x] Version bump 1.12.0 worked: #4084 - [x] CI passes --------- Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com> Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
|
Merge after #4121 |
|
/update-llm-benchmark |
LLM Benchmark Results (ci-quickfix)
Compared against master branch baseline Generated at: 2026-01-27T05:19:18.787Z Failure Analysis (click to expand)Benchmark Failure AnalysisGenerated from: Summary
Analysis of SpacetimeDB Benchmark FailuresRust / rustdoc_json FailuresCompile/Publish Errors (2 failures)t_002_scheduled_tableGenerated Code: use spacetimedb::{table, reducer, ReducerContext, Table, UniqueColumn, ScheduleAt};
#[table(name = tick_timer, schedule(reducer = tick, column = scheduled_at))]
pub struct TickTimer {
#[primary_key]
#[auto_inc]
scheduled_id: u64,
scheduled_at: ScheduleAt,
}
#[reducer(init)]
pub fn init(ctx: &ReducerContext) {
let tbl = ctx.db.tick_timer();
let mut keep_id: Option<u64> = None;
for row in tbl.iter() {
if keep_id.is_none() {
let mut r = row;
r.scheduled_at = ScheduleAt::IntervalMicros(50_000);
let updated = tbl.scheduled_id().update(r);
keep_id = Some(updated.scheduled_id);
} else {
tbl.scheduled_id().delete(&row.scheduled_id);
}
}
if keep_id.is_none() {
let _ = tbl.insert(TickTimer {
scheduled_id: 0,
scheduled_at: ScheduleAt::IntervalMicros(50_000),
});
}
}
#[reducer]
pub fn tick(_ctx: &ReducerContext) {}Expected (Golden Code): use spacetimedb::{reducer, table, ReducerContext, ScheduleAt, Table};
use std::time::Duration;
#[table(name = tick_timer, scheduled(tick))]
pub struct TickTimer {
#[primary_key]
#[auto_inc]
scheduled_id: u64,
scheduled_at: ScheduleAt,
}
#[reducer]
pub fn tick(_ctx: &ReducerContext, _row: TickTimer) -> Result<(), String> {
Ok(())
}
#[reducer(init)]
pub fn init(ctx: &ReducerContext) -> Result<(), String> {
ctx.db.tick_timer().insert(TickTimer {
scheduled_id: 0,
scheduled_at: ScheduleAt::Interval(Duration::from_millis(50).into()),
});
Ok(())
}Error: Differences:
Root Cause: Misunderstanding of how to set up scheduling and return types for reducer functions in Rust. Recommendation: Update the documentation to clarify:
t_017_scheduled_columnsGenerated Code: use spacetimedb::{table, reducer, ReducerContext, Table, ScheduleAt};
#[table(name = tick_timer, schedule(reducer = tick, column = scheduled_at))]
pub struct TickTimer {
#[primary_key]
#[auto_inc]
scheduled_id: u64,
scheduled_at: ScheduleAt,
}
#[reducer(init)]
pub fn init(ctx: &ReducerContext) {
if ctx.db.tick_timer().count() == 0 {
ctx.db
.tick_timer()
.insert(TickTimer {
scheduled_id: 0,
scheduled_at: ScheduleAt::repeat_micros(50_000),
});
}
}
#[reducer]
pub fn tick(_ctx: &ReducerContext, _row: TickTimer) {}Expected (Golden Code): use spacetimedb::{reducer, table, ReducerContext, ScheduleAt, Table};
use std::time::Duration;
#[table(name = tick_timer, scheduled(tick))]
pub struct TickTimer {
#[primary_key]
#[auto_inc]
pub scheduled_id: u64,
pub scheduled_at: ScheduleAt,
}
#[reducer]
pub fn tick(_ctx: &ReducerContext, _schedule: TickTimer) {}
#[reducer(init)]
pub fn init(ctx: &ReducerContext) {
let every_50ms: ScheduleAt = Duration::from_millis(50).into();
ctx.db.tick_timer().insert(TickTimer {
scheduled_id: 0,
scheduled_at: every_50ms,
});
}Error: Differences:
Root Cause: Similar to the first failure, a misunderstanding of the correct APIs for table scheduling and the desired syntax. Recommendation: Amend documentation or the code generation model to ensure the correct formatting and usage patterns are demonstrated, especially around scheduling and types. Other Failures (5 failures)t_013_spacetime_sum_type (2/3 tests passed)Generated Code: use spacetimedb::{ReducerContext, Table, SpacetimeType};
#[derive(SpacetimeType)]
pub struct Rect {
pub width: i32,
pub height: i32,
}
#[derive(SpacetimeType)]
pub enum Shape {
Circle(i32),
Rectangle(Rect),
}
#[spacetimedb::table(name = result)]
pub struct ResultRow {
#[primary_key]
pub id: i32,
pub value: Shape,
}
#[spacetimedb::reducer]
pub fn set_circle(ctx: &ReducerContext, id: i32, radius: i32) {
ctx.db.result().insert(ResultRow {
id,
value: Shape::Circle(radius),
});
}Expected (Golden Code): use spacetimedb::{reducer, table, ReducerContext, SpacetimeType, Table};
#[derive(SpacetimeType, Clone, Debug)]
pub struct Rect {
pub width: i32,
pub height: i32,
}
#[derive(SpacetimeType, Clone, Debug)]
pub enum Shape {
Circle(i32),
Rectangle(Rect),
}
#[table(name = result)]
pub struct ResultRow {
#[primary_key]
pub id: i32,
pub value: Shape,
}
#[reducer]
pub fn set_circle(ctx: &ReducerContext, id: i32, radius: i32) {
ctx.db.result().insert(ResultRow { id, value: Shape::Circle(radius) });
}Error: Differences:
Root Cause: The omission of Recommendation: Include compliance with trait derivations in the documentation and examples to reflect necessary traits for database interaction. t_015_product_type_columns (2/3 tests passed)Generated Code: use spacetimedb::{table, reducer, ReducerContext, Table, SpacetimeType};
#[derive(SpacetimeType)]
pub struct Address {
street: String,
zip: i32,
}
#[derive(SpacetimeType)]
pub struct Position {
x: i32,
y: i32,
}
#[table(name = profile)]
pub struct Profile {
#[primary_key]
id: i32,
home: Address,
work: Address,
pos: Position,
}
#[reducer]
pub fn seed(ctx: &ReducerContext) {
ctx.db.profile().insert(Profile {
id: 1,
home: Address { street: "1 Main".to_string(), zip: 11111 },
work: Address { street: "2 Broad".to_string(), zip: 22222 },
pos: Position { x: 7, y: 9 },
});
}Expected (Golden Code): use spacetimedb::{reducer, table, ReducerContext, SpacetimeType, Table};
#[derive(SpacetimeType, Clone, Debug)]
pub struct Address {
pub street: String,
pub zip: i32,
}
#[derive(SpacetimeType, Clone, Debug)]
pub struct Position {
pub x: i32,
pub y: i32,
}
#[table(name = profile)]
pub struct Profile {
#[primary_key]
pub id: i32,
pub home: Address,
pub work: Address,
pub pos: Position,
}
#[reducer]
pub fn seed(ctx: &ReducerContext) {
ctx.db.profile().insert(Profile {
id: 1,
home: Address { street: "1 Main".into(), zip: 11111 },
work: Address { street: "2 Broad".into(), zip: 22222 },
pos: Position { x: 7, y: 9 },
});
}Error: Differences:
Root Cause: The LLM lacks clarity in visibility context leading to struct field inaccessibility. Recommendation: Update documentation examples to emphasize the importance of Recommendation SummaryThe fundamental issues in the test failures stem from:
Enhancing the clarity, correctness, and completeness of documentation is essential. Specific examples that match the expected outputs must illustrate successful patterns for users. This would significantly lower the occurrence of erroneous submissions, leading to successful builds and test runs. |
|
/update-llm-benchmark |
LLM Benchmark Results (ci-quickfix)
Compared against master branch baseline Generated at: 2026-01-27T06:59:15.063Z Failure Analysis (click to expand)Benchmark Failure AnalysisGenerated from: Summary
Analysis of SpacetimeDB Benchmark Test FailuresRust / rustdoc_json FailuresCompile/Publish Errorst_002_scheduled_table
t_017_scheduled_columns
Other Failurest_001_basic_tables
t_012_spacetime_product_type (similar to t_013 and t_014)
C# / docs FailuresOther Failurest_014_elementary_columns
This analysis highlights several key areas in the documentation that need improvement, especially regarding visibility modifiers, function returns, and proper formatting to assist users in avoiding common pitfalls during coding. |
# Description of Changes <!-- Please describe your change, mention any related tickets, and so on here. --> This fixes 2 issues with the upgrade version tool: 1. The typescript bindings need to be updated otherwise the typescript test in CI will fail 2. The snapshots need to be updated When the version upgrade tool check in CI runs, snapshot changes are accepted automatically via the `--accept-snapshots` cli argument. When you are running this tool locally without `--accept-snapshots` you will be asked to manually review the snapshot changes before doing a final test to make sure the snapshots are correct. # API and ABI breaking changes <!-- If this is an API or ABI breaking change, please apply the corresponding GitHub label. --> None # Expected complexity level and risk 1 - this just updates the version upgrade tool <!-- How complicated do you think these changes are? Grade on a scale from 1 to 5, where 1 is a trivial change, and 5 is a deep-reaching and complex change. This complexity rating applies not only to the complexity apparent in the diff, but also to its interactions with existing and future code. If you answered more than a 2, explain what is complex about the PR, and what other components it interacts with in potentially concerning ways. --> # Testing <!-- Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected! --> - [x] Version bump 1.12.0 worked: #4084 - [x] CI passes --------- Signed-off-by: John Detter <4099508+jdetter@users.noreply.github.com> Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
|
/update-llm-benchmarks |
LLM Benchmark Results (ci-quickfix)
Compared against master branch baseline Generated at: 2026-01-27T16:47:52.904Z Failure Analysis (click to expand)Benchmark Failure AnalysisGenerated from: Summary
Analysis of SpacetimeDB Benchmark FailuresRust / rustdoc_json Failures (9 total)Compile/Publish Errorst_002_scheduled_table & t_017_scheduled_columns
t_019_many_to_many
Other Failurest_003_struct_in_table
t_013_spacetime_sum_type
Summary Recommendations
By addressing the above gaps in the documentation, future errors can be mitigated, making it easier for developers to utilize SpacetimeDB effectively. |
Description of Changes
Version upgrade to
v1.12.0.API and ABI breaking changes
None
Expected complexity level and risk
1 - this is just a version upgrade
Testing
The testsuite failures are fixed by #4120