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
KDS CDC Replay Execution - Implementation Tasks
Overview
Implementation of the KDS CDC Replay Execution slice.
This task plan is derived from:
../../docs/features/ETL/kds-cdc/index.md../../docs/features/ETL/kds-cdc/implementation-breakdown.md../../docs/features/ETL/kds-cdc/branch-audit.md../KdsCdcIngestion/TASK8.md../KdsCdcIngestion/TASK9.md
Repository analysis for this spec also reviewed the current KDS CDC replay-related implementation in:
backend/Kds.Ai.Integrations/KdsCdc/IKdsCdcReplayService.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcReplayService.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcPipelineLauncher.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcStageJobs.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcExtractJobs.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcNormalizeLoadJobs.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcLoadToStagingJobs.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcStagingToCuratedJobs.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcCuratedToS3Jobs.csbackend/Kds.Ai.Integrations/KdsCdc/KdsCdcCheckpointSupport.csbackend/Kds.Ai.Data/Services/KdsCdcReplayIndexService.csbackend/Kds.Ai.Data/Repositories/EfIngestionBatchRepository.csbackend/Kds.Ai.ApiService/Jobs/BrinkPosEtlJobs.cs
The current branch already implements replay metadata persistence and replay-index lookup, but branch audit confirmed a concrete remaining gap: there is no verified replay execution flow that consumes durable replay lookups and re-runs downstream stages from raw, load, or curated state.
The target slice adds that missing execution layer.
Source Documents
../../docs/features/ETL/kds-cdc/index.md../../docs/features/ETL/kds-cdc/implementation-breakdown.md../../docs/features/ETL/kds-cdc/branch-audit.md../KdsCdcIngestion/TASK8.md../KdsCdcIngestion/TASK9.md
Spec Name
This implementation spec should be referred to as KDS CDC Replay Execution.
Fixed Decisions
- This slice closes the replay-execution gap identified after KDS CDC ingestion delivery.
- Replay must run from durable state, not from SQS retention.
- Existing replay-index persistence and lookup seams should be reused instead of replaced.
- Existing KDS CDC stage job interfaces already provide the main execution seam for replay:
IKdsCdcNormalizeLoadJobsIKdsCdcLoadToStagingJobsIKdsCdcStagingToCuratedJobsIKdsCdcCuratedToS3Jobs- Raw-batch replay may reuse the existing pipeline launch path because raw replay still starts at
extract_raw-adjacent durable state. - Load retry and curated retry should prefer direct downstream stage execution from persisted
UpstreamBatchIdrather than redesigning the general ETL runner. - The generic
EtlPipelineRunnershould not be redesigned unless a concrete replay scenario cannot be expressed through existing KDS CDC stage-job seams. - Replay requests must be explicit and bounded. No implicit replay of arbitrary tenant history.
- Replay execution must preserve current
IngestionBatchlifecycle semantics, includingIsCurrent,ResetOfBatchId,UpstreamBatchId, checkpoint advancement, and failed rerun behavior. - Replay must remain additive. Existing KDS CDC intake behavior, Brink POS behavior, and synthetic KDS behavior must remain unchanged.
Scope
This task plan includes:
- defining the KDS CDC replay execution contract,
- resolving replay entry requests into durable raw/load/curated starting points,
- executing bounded replay from:
- raw batch,
- tenant/entity slice,
- coordinate range,
- load artifact retry,
- curated retry,
- exposing an operator-callable replay entry seam,
- persisting replay-safe lineage and diagnostics through existing stage jobs,
- adding deterministic tests for replay resolution and execution paths.
In short, this slice ends when KDS CDC replay is no longer only queryable metadata and becomes an executable bounded recovery workflow.
Out of Scope
The following items are explicitly excluded from this task plan:
- redesigning KDS CDC intake or batching behavior,
- changing KDS CDC source contracts,
- replacing replay-index persistence with a different storage model,
- building a full admin UI for replay control,
- adding new non-KDS replay behavior to other ETL sources,
- broad live-readiness coverage for KDS CDC replay beyond what is needed to prove the execution seam,
- speculative framework-wide support for arbitrary mid-pipeline starts if KDS CDC-specific seams are sufficient.
Task Checklist
Phase 1: Replay Contract And Resolution
- [ ] TASK 1 - Define bounded replay contracts and durable resolution rules
Sources:
../../docs/features/ETL/kds-cdc/index.md#checkpointing-and-replay../../docs/features/ETL/kds-cdc/index.md#batch-lifecycle-and-lineage../../docs/features/ETL/kds-cdc/branch-audit.md../KdsCdcIngestion/TASK8.md
Phase 2: Replay Execution Engine
- [ ] TASK 2 - Implement replay coordinator and downstream stage execution paths
Sources:
../../docs/features/ETL/kds-cdc/index.md#checkpointing-and-replay../../docs/features/ETL/kds-cdc/index.md#supported-corner-cases../KdsCdcIngestion/TASK8.md
Phase 3: Replay Entry Points And Diagnostics
- [ ] TASK 3 - Expose replay launch seams for operators and internal jobs
Sources:
../../docs/features/ETL/kds-cdc/index.md#checkpointing-and-replay../../docs/features/ETL/kds-cdc/index.md#quarantine-and-failed-packages../../docs/features/ETL/kds-cdc/branch-audit.md
Phase 4: Verification And Guardrails
- [ ] TASK 4 - Add replay execution coverage and regression guardrails
Sources:
../../docs/features/ETL/kds-cdc/index.md#supported-corner-cases../../docs/features/ETL/kds-cdc/index.md#non-goals../KdsCdcIngestion/TASK9.md
Dependency Graph
Phase 1
+-- TASK 1 freezes replay request/target model and durable selection rules
Phase 2
+-- TASK 2 replay coordinator and execution engine <-- depends on TASK 1
Phase 3
+-- TASK 3 replay entrypoint exposure and diagnostics <-- depends on TASK 1, TASK 2
Phase 4
+-- TASK 4 replay validation and regressions <-- depends on TASK 1, TASK 2, TASK 3Recommended Session Order
| Session | Tasks | Description |
|---|---|---|
| 1 | 1 | Freeze replay request model, supported replay levels, and durable lookup rules |
| 2 | 2 | Implement replay coordinator and connect raw/load/curated execution paths |
| 3 | 3 | Add internal/operator entry seam and diagnostics surface |
| 4 | 4 | Add deterministic coverage, regression guards, and remaining readiness checks |
Key Design Decisions
Replay Should Use Existing Stage Job Seams
The KDS CDC code already has direct stage-job interfaces that accept UpstreamBatchId. That is the most natural replay seam for load retry and curated retry. It avoids unnecessary redesign of the generic pipeline runner.
Raw Replay And Downstream Retry Are Different Problems
Raw replay begins from durable raw state and may still resemble pipeline-style execution. Load retry and curated retry begin from already completed upstream durable stages and should re-enter lower stages directly.
Bounded Replay Only
The feature docs define replay as a bounded recovery operation. This spec does not introduce open-ended tenant backfills or catch-up jobs.
Resolution Must Be Durable And Operator-Facing
The system already stores enough replay-index facts to locate candidate batches. This slice must convert those facts into a deterministic execution target, including clear failure messages when the request is ambiguous or impossible.
Preserve Existing Lifecycle Semantics
Replay should not invent a second lineage model. It should create ordinary IngestionBatch reruns and rely on current lifecycle rules for Succeeded, Failed, IsCurrent, ResetOfBatchId, and upstream chaining.
Start With KDS CDC-Specific Entry Seams
If replay can be expressed through a KDS CDC-specific coordinator and API/job entry seam, prefer that over broad ETL-framework generalization. Generalization should happen only if concrete duplication appears.