Skip to content

fix: persist rerun SQL results across conversation reloads - #416

Open
lindixu6-hash wants to merge 1 commit into
RamiAwar:mainfrom
lindixu6-hash:fix/issue-263-upstream
Open

fix: persist rerun SQL results across conversation reloads#416
lindixu6-hash wants to merge 1 commit into
RamiAwar:mainfrom
lindixu6-hash:fix/issue-263-upstream

Conversation

@lindixu6-hash

Copy link
Copy Markdown

Problem

Issue #263 reproduces a persistence mismatch:

  1. edit an SQL string
  2. press Run
  3. save the SQL
  4. leave and reopen the conversation

The rerun result only replaced React state. The backend returned an ephemeral SQL_QUERY_RUN_RESULT and never updated the stored linked result, so reopening loaded the old rows.

Fix

  • make the state-changing run-sql route POST
  • update the existing linked run result, or create it for historical data that has none
  • return the persisted result identity and timestamp to the frontend
  • replace local state with the complete persisted result
  • preserve the existing Secure Data marker
  • reject a linked SQL result from another conversation

Verification

  • focused persistence and API contract tests: 6 passed
  • full non-expensive backend suite: 31 passed / 6 existing explicit skips
  • database reload regression: writes old rows, updates, expires ORM state, reloads the same result ID, and observes new rows
  • changed-file Black and frontend ESLint: pass
  • backend compileall: pass
  • frontend TypeScript + Vite production build: pass
  • remote fork Backend/Frontend CI: https://github.com/lindixu6-hash/dataline/actions/runs/32064489534

No OpenAI calls, production credentials, hosted services, user data, deployment, or release workflows are used.

Closes #263.

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.

SQL Run results don't get updated when saving an edited sql string result

1 participant