Skip to content

feat(conversation): hard-cut text2sql v2 workflow spine and RAG runtime gates#23

Merged
LienJack merged 32 commits into
devfrom
codex/refactor-text2sql-workflow-spine
Apr 28, 2026
Merged

feat(conversation): hard-cut text2sql v2 workflow spine and RAG runtime gates#23
LienJack merged 32 commits into
devfrom
codex/refactor-text2sql-workflow-spine

Conversation

@LienJack
Copy link
Copy Markdown
Owner

Summary

  • hard-cut the conversation flow onto the Text2SQL v2 workflow spine and LangGraph runtime, including new stage contracts, artifact references, delivery mapping, and evaluation gates
  • add RAG task configuration, provider health probing, retrieval and rerank routing, and the Prisma-backed task config model needed for runtime selection
  • update the settings experience, shared API contracts, smoke coverage, and graphify artifacts so the new RAG configuration and runtime intelligence paths are visible end to end

Testing

  • Not run in this session

LienJack added 30 commits April 26, 2026 01:13
- Added `AGENT_RAG_RETRIEVAL_ENABLED` to the environment configuration, allowing for toggling of RAG retrieval functionality.
- Updated `AppConfigService` to include a method for retrieving the new RAG retrieval setting.
- Enhanced `RetrieveKnowledgeNode` to respect the RAG retrieval configuration, providing a fallback mechanism when retrieval is disabled.
- Removed unused `GraphService` and related components to streamline the codebase and improve maintainability.
- Updated the `generatedAt` timestamps in gate summary JSON files for relationship platform, semantic spine, and modeling parity shadows to reflect the latest generation time.
- Changed `strictMode` from `true` to `false` in the modeling parity shadow gate summary to allow for more flexible processing.
- Enhanced the semantic plan service to handle degraded contexts without grounding evidence, ensuring the SQL path is maintained in such scenarios.
- Introduced a tolerance for gate comparison in the text2sql evaluation service to prevent false negatives due to rounding errors.
- Added new endpoints for managing RAG task configurations, including listing, upserting, and health checking.
- Implemented a new `RagTaskConfig` model and service to handle RAG task settings.
- Enhanced the `SettingsService` to integrate RAG task configuration management.
- Updated the `EmbeddingRouterService` and related components to utilize RAG task configurations for embedding runtime resolution.
- Introduced coverage gap handling in the semantic plan service to improve error reporting and decision-making in SQL generation.
- Introduced new evaluation gates for Text2SQL v2, including strict modes for evaluation and focused coverage.
- Updated CI references in documentation to reflect new gate commands and their expected outputs.
- Enhanced the text2sql evaluation service to include detailed traceability metrics, ensuring comprehensive coverage reporting.
- Added new traceability fields in evaluation cases to track fixture families, behavior tests, and flow nodes.
- Improved error handling in SQL generation to account for metadata and general queries, preventing unnecessary SQL execution.
- Updated test fixtures to include traceability information for better integration testing.
- Introduced a new method `runOperationalFailure` in `FormatAnswerNode` to handle operational failures with user guidance.
- Updated `RetrieveKnowledgeNode` to support datasource and allowed tables in its input, improving context handling.
- Enhanced `SqlGenerationService` to utilize semantic shortcuts for generating SQL queries, improving efficiency and error recovery.
- Implemented checks in `SqlReadonlyTool` to prevent introspection of schema system tables, ensuring security compliance.
- Added new tests for RAG provider model previews and SQL generation shortcuts, ensuring robust functionality and error handling.
Introduce trace.v2 runtimePlan, artifactRefs, and Smart Defaults evidence across the shared contract, LangGraph runtime, delivery projection, and stream state summaries.
Extend focused and eval gates so runtime intelligence requires producer-backed artifact refs, stream lifecycle coverage, Smart Defaults evidence, and no-legacy owner scans.
Define additive plan ledger obligations, generation claims, validation fulfillment, and delivery summary fields so the v2 trace can carry SQL intent contracts without changing runtime plan semantics.
Build semantic plan obligations, block failed hard blockers before SQL generation, record fulfillment claims on generated SQL, and validate SQL against the ledger before execution or correction.
Add ledger fixture families, rollout metrics, and unit coverage for obligation creation, generation claims, validation fulfillment, correction grounding, and safe delivery surfaces.
@LienJack LienJack merged commit 2c1dd43 into dev Apr 28, 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