Recommended actions
- [Eval problem | High] Capture the full publish/compile stderr in scorer output — Every
publish_error shown ends after the line Saving config to /tmp/stdb-llm-cli-..., so the actual TypeScript or bundler diagnostic is lost. The scorer should include the complete stderr, or at least the tail containing the tsc/bundler error, in the recorded error. Evidence: t_070, t_069, t_071, t_021, t_012, t_017, t_023, t_062, t_061, t_063, t_065, t_002, t_039, t_038.
- [API/ergonomics problem | Medium] Remove the need for
(): any on the scheduled thunk — Every golden scheduled table writes scheduled: (): any => reducer. Every generated version writes scheduled: () => reducer and fails to publish. This points to a circular type-inference problem between the table and the reducer that takes table.rowType. The table() typing should break the cycle so that the natural form compiles. If that is not feasible, the compiler error should point clearly at the required annotation. Evidence: t_002, t_017, t_038, t_039, t_069, t_071.
Failure patterns
Scheduled table thunk without (): any annotation (6 tasks)
- Classification: API/ergonomics problem
- Confidence: Medium
- What the model wrote:
scheduled: () => tick,
...
export const tick = spacetimedb.reducer({ arg: tick_timer.rowType }, ...)
Some tasks also had secondary deviations:
ScheduleAt.interval(new TimeDuration(50_000n)) (t_002)
ScheduleAt.time(new Timestamp(...)) (t_038, t_069, t_071)
- an extra
{ name: ... } reducer options object (t_069)
- What was expected:
scheduled: (): any => tick,
...
scheduledAt: ScheduleAt.interval(50_000n),
scheduledAt: ScheduleAt.time(ctx.timestamp.microsSinceUnixEpoch + 1_000n),
- What the error says:
publish_error: spacetime publish (typescript) failed (exit=2). The diagnostic itself is truncated.
- Why this happened: The table definition references the reducer, and the reducer's parameter type references
table.rowType. Without an explicit return annotation, TypeScript reports a circular implicit-any error. The golden answers work around this in every case, which indicates the API's natural form does not compile. The model's habit of wrapping values in TimeDuration/Timestamp may add further type errors. Because stderr is truncated, the exact error cannot be confirmed.
- Suggested action: Change the
scheduled option typing so an unannotated arrow function compiles. Alternatively, emit a targeted diagnostic.
- Suggested area: TypeScript server SDK
table() options typing
- Affected tasks: t_002, t_017, t_038, t_039, t_069, t_071
Invented reducer/view options objects and query APIs (4 tasks)
- Classification: Model limitation
- Confidence: Medium
- What the model wrote:
- Reducer options objects, for example
spacetimedb.reducer({ name: 'emptyReducerNoArgs' }, () => {}), and spacetimedb.reducer({ name: 'seed' }, (ctx) => ...)
- t_062:
t.query(member.rowType) with ctx.from.member.leftSemijoin(...)
- t_063:
.filter({ gte: new Timestamp(200n), lte: new Timestamp(400n) })
- What was expected:
- Reducers without an options object, for example
spacetimedb.reducer({}, ctx => {})
- t_062:
t.array(member.rowType) with ctx.from.eligibility.rightSemijoin(ctx.from.member, ...)
- t_063:
filter(new Range({ tag: 'included', value: ... }, { tag: 'included', value: ... }))
- What the error says: t_000 failed with
schema_parity: reducers differ - expected ["empty_reducer_no_args()..., which shows that the explicit camelCase names overrode the expected snake_case reducer names. The other three tasks failed with publish_error ... exit=2.
- Why this happened: With no documentation, the model guessed API shapes: name-option overloads, an object-style range filter, and
t.query. These guesses do not match the SDK.
- Suggested action: None
- Suggested area: None
- Affected tasks: t_000, t_062, t_063, t_069 (secondary issue)
Wrong index/table definition keys (2 tasks)
- Classification: Model limitation
- Confidence: Medium
- What the model wrote:
- t_021:
indexes: [{ name: 'byUserDay', algorithm: 'btree', columns: [...] }]
- t_012:
result: table({ public: true }, {...}), an inline table with no name
- What was expected:
- t_021:
indexes: [{ accessor: 'byUserDay', ... }]
- t_012:
table({ name: 'result', public: true }, ...)
- What the error says:
publish_error with exit=2 for t_021 and exit=1 for t_012. Both are truncated.
- Why this happened: The model used guessed configuration keys:
name instead of accessor for the index, and an omitted table name.
- Suggested action: None
- Suggested area: None
- Affected tasks: t_021, t_012
Nullable values passed where undefined/non-null is required (2 tasks)
- Classification: Model limitation
- Confidence: Low
- What the model wrote:
- t_023:
return ctx.db.profile.identity.find(ctx.sender);
- t_070:
if (ctx.connectionId === undefined) return; ... connectionId: ctx.connectionId
- What was expected:
- t_023:
return ctx.db.profile.identity.find(ctx.sender) ?? undefined;
- t_070:
if (!ctx.connectionId) throw new Error(...)
- What the error says:
publish_error ... exit=2, truncated.
- Why this happened: The golden answers suggest that these values can be
null. An === undefined guard leaves null in the type, and t.option expects undefined. The model did not account for the null case.
- Suggested action: None
- Suggested area: None
- Affected tasks: t_023, t_070
Undiagnosable due to truncated output (2 tasks)
- Classification: No action
- Confidence: Low
- What the model wrote:
- t_061:
const OrderLineDetail = t.object('OrderLineDetail', {...}) used as a view row type
- t_065: hand-written
interface MaterializedDb { ... } passed in place of the inferred context type
- What was expected:
- t_061:
t.row('ThreeTableJoinRow', {...})
- t_065:
type Ctx = ReducerCtx<InferSchema<typeof spacetimedb>>;
- What the error says:
publish_error with exit=1 for t_061 and exit=2 for t_065. The generated code and stderr are both truncated.
- Why this happened: The root cause cannot be determined from the supplied evidence. Possible causes are
t.object versus t.row for t_061 and the hand-rolled database typing for t_065. The truncated stderr is covered by the Eval problem recommendation above.
- Suggested action: None
- Suggested area: None
- Affected tasks: t_061, t_065
The remaining 16 failures were not supplied and are not analyzed.