pingdotgg / pingdotgg/t3code

SQLite projector fails with `no such savepoint: effect_sql_1`

Open
#5,035 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Summary

T3 Code (Alpha) fails while starting a thread turn because the event projector cannot execute its SQLite statement.

Error

effect/sql/SqlError: Failed to execute statement
    at runProjectorForEvent (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/bin.mjs:24154:76)
    at runProjectorForEvent (definition) (Alpha)
    at orchestration.command.thread.turn.start (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/bin.mjs:21774:18) {
  [cause]: effect/sql/SqlError/UnknownError: Failed to execute statement
      at classifySqliteError (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/node_modules/effect/dist/unstable/sql/SqlError.js:446:10) {
    [cause]: Error: no such savepoint: effect_sql_1
  }
}

Expected behavior

Starting a thread turn should complete without a SQLite savepoint error.

Actual behavior

The turn fails before it can start, with SQLite reporting that savepoint effect_sql_1 does not exist.

Environment

  • T3 Code (Alpha)
  • macOS (application path: /Applications/T3 Code (Alpha).app)

I don’t yet have reliable reproduction steps beyond encountering the failure when a thread turn starts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the reported runProjectorForEvent entry point and the orchestration.command.thread.turn.start path in the stack trace, then locate their source files in the repository. Reproduce the thread-turn start failure and trace the SQLite savepoint lifecycle around the projector. Done means starting a thread turn completes without the effect_sql_1 savepoint error.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite, typescript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.