Skip to content

feat(text2sql): add stream runtime and semantic readiness#25

Merged
LienJack merged 8 commits into
mainfrom
codex/feat-chat-conversational-redesign
Jun 1, 2026
Merged

feat(text2sql): add stream runtime and semantic readiness#25
LienJack merged 8 commits into
mainfrom
codex/feat-chat-conversational-redesign

Conversation

@LienJack
Copy link
Copy Markdown
Owner

@LienJack LienJack commented Jun 1, 2026

Summary

This PR brings the broader Text2SQL feature branch together for main: chat streaming now has a shared protocol toolkit, frontend cancellation is wired through the backend runtime path, semantic asset readiness becomes part of the Text2SQL/RAG flow, and SQLite validation has stronger dry-run diagnostics. It also refreshes the project README as the primary English entry point with Chinese and Japanese translations plus functional screenshots.

These ship together because the stream protocol, runtime evidence, semantic context, validation behavior, and README now describe the same end-to-end Text2SQL delivery surface.

flowchart TB
  UI["Frontend chat workbench"] --> Protocol["chat-stream-protocol package"]
  Protocol --> API["NestJS chat stream API"]
  API --> Runtime["Text2SQL v2 LangGraph runtime"]
  Runtime --> Knowledge["Knowledge-owned RAG and semantic assets"]
  Runtime --> Validation["SQL validation and dry-run execution"]
  Runtime --> Delivery["Delivery contract and evidence"]
  Delivery --> UI
Loading

What Changed

Area Result
Chat streaming Adds a shared @text2sql/chat-stream-protocol package for SSE framing, parsing, terminal guards, and UI projection helpers.
Cancellation Propagates AbortSignal from frontend stop generation through backend workflow, LangGraph, SQL generation, and LLM provider paths.
Semantic readiness Adds manifest-first semantic asset preparation, reindex readiness, retrieval payload contracts, and RAG audit/quality coverage under the knowledge domain.
Validation Improves SQLite dry-run validation and Text2SQL v2 validation diagnostics with new unit/integration coverage.
Delivery evidence Extends delivery mapping, stream event projection, and focused eval gates so v2 artifacts and semantic context stay traceable.
Frontend chat Refines assistant composer, thinking panel, message rendering, result tabs, API client behavior, and related test coverage.
Documentation Rewrites README.md in English, adds README.zh-CN.md and README.ja.md, and includes feature screenshots for modeling, datasource onboarding, ChatBI, SQL evidence, and chart output.
Graph metadata Refreshes graphify output and trims report whitespace so branch diff checks pass.

Screenshots

Text2SQL platform overview

Verification

  • git diff --check origin/main..HEAD

Compound Engineering
Codex

…dling

- Introduced a new SQLite dry-run method in the SqliteQueryService to validate SQL queries against the SQLite database.
- Updated the SqlValidationService to incorporate datasource ID and type in the dry-run validation process.
- Enhanced error handling for missing columns during SQLite dry-runs, returning specific DomainError codes.
- Added new utility methods for summarizing tool payloads and normalizing SQLite errors.
- Improved the Text2SqlStreamEventMapper to include detailed summaries in tool call events.
- Expanded test coverage for SQL validation and error scenarios.
Add semantic asset preparation/readiness services and thread the new
readiness evidence through retrieval, delivery contracts, health output,
and Text2SQL v2 coverage gates. This also expands replay, indexing, and
quality tests so the new semantic asset flow is exercised end to end.
Introduce a shared chat stream protocol package for SSE framing, parsing, terminal detection, and UI projection helpers. Adopt it across backend writers, frontend readers, smoke checks, and stream contract tests so protocol behavior has one owner.

Also harden stream recovery for invalid JSON transport failures and preserve simple count shortcuts when broad schema evidence includes amount-like columns.
Propagate stream abort signals from the frontend stop action through the
chat workflow, LangGraph runtime, SQL generation, and LLM gateway so user
cancellation stops provider work instead of only closing the browser reader.

Also add stop-generation UI, USER_CANCELLED visibility semantics, updated
protocol docs, and refreshed graphify artifacts.
@LienJack LienJack merged commit 801c06a into main Jun 1, 2026
2 of 3 checks passed
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.

1 participant