Categories
Implementation Specs (157)
- specs/AnomalyDetection/TASK1.1.md
- specs/AnomalyDetection/TASK1.2.md
- specs/AnomalyDetection/TASK1.3.md
- specs/AnomalyDetection/TASK1.4.md
- specs/AnomalyDetection/TASK2.1.md
- specs/AnomalyDetection/TASK2.2.md
- specs/AnomalyDetection/TASK3.1.md
- specs/AnomalyDetection/TASK3.2.md
- specs/AnomalyDetection/TASK3.3.md
- specs/AnomalyDetection/TASK4.1.md
- specs/AnomalyDetection/TASK4.2.md
- specs/AnomalyDetection/TASK4.3.md
- specs/AnomalyDetection/TASK4.4.md
- specs/AnomalyDetection/TASK5.1.md
- specs/AnomalyDetection/TASK5.2.md
- specs/AnomalyDetection/TASK5.3.md
- specs/AnomalyDetection/TASK6.1.md
- specs/AnomalyDetection/TASK6.2.md
- specs/AnomalyDetection/TASK6.3.md
- specs/AnomalyDetection/TASKS.md
- specs/ApiServicePostgresTestStability/TASK.md
- specs/BackendDatabaseConsolidation/TASK.md
- specs/BackendDatabaseConsolidation/TASK1.1.md
- specs/BackendDatabaseConsolidation/TASK1.2.md
- specs/BackendDatabaseConsolidation/TASK1.3.md
- specs/BackendDatabaseConsolidation/TASK2.1.md
- specs/BackendDatabaseConsolidation/TASK2.2.md
- specs/BackendDatabaseConsolidation/TASK2.3.md
- specs/BackendDatabaseConsolidation/TASK3.1.md
- specs/BackendDatabaseConsolidation/TASK3.2.md
- specs/BackendDatabaseConsolidation/TASK4.1.md
- specs/BackendDatabaseConsolidation/TASK4.2.md
- specs/BackendDatabaseConsolidation/TASK4.3.md
- specs/BackendDatabaseConsolidation/TASK5.1.md
- specs/BackendDatabaseConsolidation/TASK5.2.md
- specs/BrinkLaborGetShiftsStaging/TASK.md
- specs/BrinkPosOrdersFirstEtlJob/TASK.md
- specs/BrinkPosOrdersFirstEtlJob/TASK0.md
- specs/BrinkPosOrdersFirstEtlJob/TASK1.md
- specs/BrinkPosOrdersFirstEtlJob/TASK2.1.md
- specs/BrinkPosOrdersFirstEtlJob/TASK2.2.md
- specs/BrinkPosOrdersFirstEtlJob/TASK2.3.md
- specs/BrinkPosOrdersFirstEtlJob/TASK2.4.md
- specs/BrinkPosOrdersFirstEtlJob/TASK2.md
- specs/BrinkPosOrdersFirstEtlJob/TASK3.1.md
- specs/BrinkPosOrdersFirstEtlJob/TASK3.2.md
- specs/BrinkPosOrdersFirstEtlJob/TASK3.3.md
- specs/BrinkPosOrdersFirstEtlJob/TASK3.4.md
- specs/BrinkPosOrdersFirstEtlJob/TASK3.md
- specs/BrinkPosOrdersFirstEtlJob/TASK4.1.md
- specs/BrinkPosOrdersFirstEtlJob/TASK4.2.md
- specs/BrinkPosOrdersFirstEtlJob/TASK4.3.md
- specs/BrinkPosOrdersFirstEtlJob/TASK4.4.md
- specs/BrinkPosOrdersFirstEtlJob/TASK4.md
- specs/BrinkPosOrdersFirstEtlJob/TASK5.1.md
- specs/BrinkPosOrdersFirstEtlJob/TASK5.2.md
- specs/BrinkPosOrdersFirstEtlJob/TASK5.3.md
- specs/BrinkPosOrdersFirstEtlJob/TASK5.4.md
- specs/BrinkPosOrdersFirstEtlJob/TASK5.md
- specs/BrinkPosOrdersFirstEtlJob/TASK6.1.md
- specs/BrinkPosOrdersFirstEtlJob/TASK6.2.md
- specs/BrinkPosOrdersFirstEtlJob/TASK6.3.md
- specs/BrinkPosOrdersFirstEtlJob/TASK6.4.md
- specs/BrinkPosOrdersFirstEtlJob/TASK6.md
- specs/BrinkPosOrdersFirstEtlJob/TASK7.md
- specs/BrinkPosOrdersFirstEtlJob/TASK8.md
- specs/BrinkPosOrdersFirstEtlJob/TASK9.md
- specs/BrinkSettings2ToStaging/TASK.MD
- specs/CuratedToS3Stage/TASK.md
- specs/CuratedToS3Stage/TASK0.md
- specs/CuratedToS3Stage/TASK1.md
- specs/CuratedToS3Stage/TASK2.md
- specs/CuratedToS3Stage/TASK3.md
- specs/CuratedToS3Stage/TASK4.md
- specs/CustomerCredentialCustomHeaders/TASK.md
- specs/CustomerCredentialCustomHeaders/TASK1.1.md
- specs/CustomerCredentialCustomHeaders/TASK1.2.md
- specs/CustomerCredentialCustomHeaders/TASK2.1.md
- specs/CustomerCredentialCustomHeaders/TASK2.2.md
- specs/CustomerCredentialCustomHeaders/TASK3.1.md
- specs/CustomerCredentialTriggeredProvisioning/TASK.md
- specs/CustomerCredentialTriggeredProvisioning/TASK1.1.md
- specs/CustomerCredentialTriggeredProvisioning/TASK1.2.md
- specs/CustomerCredentialTriggeredProvisioning/TASK2.1.md
- specs/CustomerCredentialTriggeredProvisioning/TASK2.2.md
- specs/CustomerCredentialTriggeredProvisioning/TASK3.1.md
- specs/CustomerCredentialTriggeredProvisioning/TASK3.2.md
- specs/CustomerCredentialTriggeredProvisioning/TASK4.1.md
- specs/EtlSourceAdapterFramework/TASK.md
- specs/EtlSourceAdapterFramework/TASK0.md
- specs/EtlSourceAdapterFramework/TASK1.md
- specs/EtlSourceAdapterFramework/TASK2.md
- specs/EtlSourceAdapterFramework/TASK3.md
- specs/EtlSourceAdapterFramework/TASK4.md
- specs/EtlSourceAdapterFramework/TASK5.md
- specs/EtlSourceAdapterFramework/TASK6.md
- specs/KdsCdcDebeziumIntegration/TASK.md
- specs/KdsCdcDebeziumIntegration/TASK1.md
- specs/KdsCdcDebeziumIntegration/TASK2.md
- specs/KdsCdcDebeziumIntegration/TASK3.md
- specs/KdsCdcDebeziumIntegration/TASK4.md
- specs/KdsCdcDebeziumIntegration/TASK5.md
- specs/KdsCdcDurableRelationRouting/TASK.md
- specs/KdsCdcDurableRelationRouting/TASK1.md
- specs/KdsCdcDurableRelationRouting/TASK2.md
- specs/KdsCdcDurableRelationRouting/TASK3.md
- specs/KdsCdcDurableRelationRouting/TASK4.md
- specs/KdsCdcDurableRelationRouting/TASK5.md
- specs/KdsCdcIngestion/TASK.md
- specs/KdsCdcIngestion/TASK1.md
- specs/KdsCdcIngestion/TASK2.md
- specs/KdsCdcIngestion/TASK3.md
- specs/KdsCdcIngestion/TASK4.md
- specs/KdsCdcIngestion/TASK5.md
- specs/KdsCdcIngestion/TASK6.md
- specs/KdsCdcIngestion/TASK7.md
- specs/KdsCdcIngestion/TASK8.md
- specs/KdsCdcIngestion/TASK9.md
- specs/KdsCdcReplayExecution/TASK.md
- specs/KdsCdcReplayExecution/TASK1.md
- specs/KdsCdcReplayExecution/TASK2.md
- specs/KdsCdcReplayExecution/TASK3.md
- specs/KdsCdcReplayExecution/TASK4.md
- specs/KdsMonitorServingContractMigration/TASK.md
- specs/KdsMonitorServingContractMigration/TASK1.1.md
- specs/KdsMonitorServingContractMigration/TASK1.2.md
- specs/KdsMonitorServingContractMigration/TASK2.1.md
- specs/KdsMonitorServingContractMigration/TASK2.2.md
- specs/KdsMonitorServingContractMigration/TASK3.1.md
- specs/KdsMonitorServingContractMigration/TASK3.2.md
- specs/RedshiftFoundation/TASK.md
- specs/RedshiftFoundation/TASK1.1.md
- specs/RedshiftFoundation/TASK1.2.md
- specs/RedshiftFoundation/TASK1.3.md
- specs/RedshiftFoundation/TASK1.4.md
- specs/RedshiftFoundation/TASK2.1.md
- specs/RedshiftFoundation/TASK2.2.md
- specs/RedshiftFoundation/TASK3.1.md
- specs/RedshiftFoundation/TASK3.2.md
- specs/RedshiftFoundation/TASK3.3.md
- specs/RedshiftSyntheticDataFeed/TASK.md
- specs/RedshiftSyntheticDataFeed/TASK1.1.md
- specs/RedshiftSyntheticDataFeed/TASK1.2.md
- specs/RedshiftSyntheticDataFeed/TASK1.3.md
- specs/RedshiftSyntheticDataFeed/TASK2.1.md
- specs/RedshiftSyntheticDataFeed/TASK2.2.md
- specs/RedshiftSyntheticDataFeed/TASK3.1.md
- specs/RedshiftSyntheticDataFeed/TASK3.2.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK1.1.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK1.2.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK2.1.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK2.2.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK2.3.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK3.1.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK3.2.md
- specs/SingleStoreRedshiftRuntimeReadPath/TASK4.1.md
Single-Store Redshift Runtime Read Path - Implementation Tasks
Overview
Implementation of the Single-Store Redshift Runtime Read Path delivery slice.
This task plan is derived from the documentation set in:
../../docs/features/ETL/slices/03-single-store-redshift-runtime-read-path/index.md../../docs/features/ETL/slices/03-single-store-redshift-runtime-read-path/runtime-read-path-spec.md../../docs/features/ETL/slices/03-single-store-redshift-runtime-read-path/follow-ups.md../../docs/features/ETL/slices/01-redshift-foundation/serving-mapping.md../../docs/ETL.md
This task switches current single-store runtime reads from the shared PostgreSQL warehouse to tenant-resolved Redshift curated tables.
It does not migrate monitor specs from kdsdev. to curated.. That belongs to slice 04.
The slice outcome is:
- a runtime tenant resolver with explicit/default single-tenant support,
- anomaly detector data access tools that open tenant-resolved Redshift connections,
- curated-only schema/table discovery,
- curated-only read query guardrails,
- data access prompt/tool descriptions updated for Redshift
curated, - runtime AI reads aligned to source-mirror
curated.<system>_<table>objects, /warehouse/ordersendpoint migration remains unresolved in the current branch,- smoke validation against Redshift
curateddata loaded by slice 02.
Source Documents
../../docs/features/ETL/slices/03-single-store-redshift-runtime-read-path/index.md../../docs/features/ETL/slices/03-single-store-redshift-runtime-read-path/runtime-read-path-spec.md../../docs/features/ETL/slices/03-single-store-redshift-runtime-read-path/follow-ups.md../../docs/features/ETL/slices/01-redshift-foundation/index.md../../docs/features/ETL/slices/01-redshift-foundation/serving-mapping.md../../docs/features/ETL/slices/02-redshift-synthetic-data-feed/index.md../../docs/ETL.md
Spec Name
The canonical documentation slice is named 03-single-store-redshift-runtime-read-path.
This implementation spec should be referred to as Single-Store Redshift Runtime Read Path.
Fixed Decisions
- This slice is single-store only.
- A configured default
tenant_idis acceptable until authenticated tenant resolution exists. - CLI/dev flows may accept an explicit
tenant_idoverride. - Runtime database routing is platform-owned and resolved outside agent SQL.
- Runtime reads use tenant Redshift, not the shared PostgreSQL
warehousedb. - Runtime tools expose approved source-mirror
curatedobjects only. staging,etl_meta,kdsdev, and source schemas are not runtime query surfaces.- Data access prompt/tool language moves to Redshift
curated. - Individual monitor specs are not migrated in this slice.
- API order endpoints are not yet aligned to the branch's source-mirror
curatedmodel. - Cross-tenant Athena, full RBAC, ETL/S3/COPY/UNLOAD, simulator writes, and new serving domains remain out of scope.
Scope
This task includes:
- adding runtime tenant configuration and resolver abstractions,
- integrating runtime consumers with the tenant warehouse foundation from slice 01,
- replacing shared PostgreSQL warehouse reads in the anomaly detector data access tool path,
- restricting AI schema/table discovery to approved source-mirror
curatedobjects, - adding pragmatic curated-only SQL guardrails,
- updating data access prompt and tool descriptions,
- deferring the canonical order-read service and
/warehouse/ordersmigration until a branch-aligned runtime contract exists, - adding smoke validation for tenant Redshift curated reads.
In short, the slice ends when current single-store runtime reads can use tenant Redshift curated without depending on the shared PostgreSQL warehouse.
Out of Scope
The following items are explicitly excluded from this task:
- simulator write migration,
- synthetic data feed implementation,
- monitor spec migration from
kdsdev.tocurated., - authenticated user-to-tenant RBAC,
- store groups,
- cross-tenant Athena path,
- Glue,
- S3 curated exports,
- Redshift
COPYandUNLOAD, - ETL worker and ingestion API,
- POS, inventory, payments, forecasting, pricing, and customer serving domains,
- production-grade SQL parser or policy engine,
- anomaly detector orchestration redesign.
Task Checklist
Phase 1: Runtime Tenant Context
- [x] TASK 1.1 - Add runtime tenant resolver and configuration
- [x] TASK 1.2 - Wire runtime services to tenant warehouse foundation
Phase 2: AI Data Access Runtime
- [x] TASK 2.1 - Update warehouse query tools to use tenant-resolved Redshift
- [x] TASK 2.2 - Restrict schema discovery and SQL execution to approved source-mirror
curatedobjects - [x] TASK 2.3 - Update data access prompt and tool descriptions
Phase 3: Backend Order Read Endpoints
- [ ] TASK 3.1 - Create a branch-aligned Redshift runtime read service
- [ ] TASK 3.2 - Migrate
/warehouse/ordersendpoints to a branch-aligned Redshift runtime contract
Phase 4: Smoke Validation
- [ ] TASK 4.1 - Add smoke validation for the runtime read path
Dependency Graph
Prerequisites
|-- Redshift Foundation complete
| +-- tenant routing metadata
| +-- tenant warehouse connection factory
| +-- bootstrapped tenant database
| +-- source-mirror curated tables for supported systems
+-- Redshift Synthetic Data Feed complete
+-- source-mirror KDS curated tables contain synthetic rows
Phase 1 (Runtime Tenant Context)
|-- 1.1 Runtime tenant resolver and configuration
+-- 1.2 Runtime services wired to tenant warehouse foundation <-- (depends on 1.1)
Phase 2 (AI Data Access Runtime)
|-- 2.1 Tenant-resolved Redshift query tools <-- (depends on 1.2)
|-- 2.2 Source-mirror curated discovery and SQL guardrails <-- (depends on 2.1)
+-- 2.3 Prompt/tool description update <-- (depends on 2.2)
Phase 3 (Backend Order Read Endpoints)
|-- 3.1 Branch-aligned runtime read service <-- (depends on 1.2)
+-- 3.2 Migrate order endpoints <-- (depends on 3.1)
Phase 4 (Smoke Validation)
+-- 4.1 Runtime read path smoke validation <-- (depends on 2.3, 3.2)Recommended Session Order
| Session | Tasks | Description |
|---|---|---|
| 1 | 1.1, 1.2 | Runtime tenant context and foundation wiring |
| 2 | 2.1, 2.2 | Tenant-resolved AI data access and source-mirror curated guardrails |
| 3 | 2.3 | Prompt/tool language update |
| 4 | 3.1, 3.2 | Branch-aligned runtime read service and API endpoint migration |
| 5 | 4.1 | Smoke validation against synthetic Redshift curated data |
Key Design Decisions
Single Tenant Only
The runtime resolver returns one tenant for this slice. Multi-tenant user access, store groups, and Athena routing are future work.
Default Tenant Is Temporary
The configured default tenant is a deliberate shortcut for the current single-store backend context. It must be explicit and easy to replace with authenticated tenant resolution later.
Runtime Uses Tenant Redshift
Migrated runtime reads must use the tenant warehouse foundation to resolve and open Redshift. They should not use the shared PostgreSQL warehousedb read connection.
Curated Is the Runtime Surface
AI tools should read only approved source-mirror curated.<system>_<table> objects in this phase. Internal schemas and source schemas are not runtime query surfaces.
The branch does not currently define a canonical curated.orders / curated.order_items runtime surface for migrated API endpoints.
Guardrails Are Layered
Use Redshift permissions where available, and also add lightweight application guardrails around schema discovery and generated SQL. Prompt instructions alone are not enough.
Preserve Orchestration
Monitor run lifecycle, dry-run behavior, alert suppression, alert emission, and monitor spec storage should remain unchanged.
Monitor Prompts Stay Deferred
Existing monitor specs may still reference kdsdev.* until slice 04. This slice prepares the runtime surface and may expose "table not available" failures for unmigrated prompts.