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
TASK 0 - Module 0 Decision Record
Purpose
Freeze the true v1 scope for the first Brink POS ETL job before implementation work starts in dispatch, extraction, normalization, Redshift load, and curated mapping.
This record overrides the broader and partly outdated Brink POS groundwork documents for this specific implementation slice.
Decision Summary
The first Brink POS ETL job is strictly limited to:
ordersorder_items
The job must run daily and therefore always supports business-date resolution through:
Sales2.GetCurrentBusinessDateSales2.GetOrders
The first implemented end-to-end path is:
- resolve business date
- extract raw XML
- persist raw XML to S3
raw/ - normalize to Parquet in S3
load/ - load Parquet to Redshift
staging - map
staging -> curated - expose correct data in:
curated.pos_orderscurated.pos_order_items
Testing is a mandatory part of every module:
- every module must include unit tests
- every completed ETL stage should include live E2E validation whenever the stage can be verified against real integrations
- Aspire secrets are the standard way to access AWS services and Brink POS API during live verification
In Scope
- one daily tenant-day ETL job for Brink POS
Sales2.GetCurrentBusinessDateas required business-date helperSales2.GetOrdersas the main transactional source- full raw XML preservation in S3
- Parquet
load/artifacts derived fromGetOrders - Redshift staging load from Parquet
- Redshift curated mapping for:
curated.pos_orderscurated.pos_order_items- stage-level metadata, checkpoints, rerun semantics, and traceability
- unit tests for every module
- live E2E verification for each completed ETL stage whenever practical through Aspire-managed secrets and integrations
Out Of Scope
- every Brink endpoint other than
GetCurrentBusinessDateandGetOrders - kitchen contracts and kitchen-oriented curated outputs
- item, destination, tender, tax, employee, modifier, or table enrichment endpoints
- widening the first slice to any additional business contract beyond
ordersandorder_items - treating old Brink groundwork docs as binding scope for this implementation
Final Curated Targets
The curated target names for v1 are already fixed and must not be renamed in this slice:
curated.pos_orderscurated.pos_order_items
Source of truth:
backend/Kds.Ai.Warehouse/Sql/Bootstrap/Tenant/Curated/0612_create_curated_pos_orders.sqlbackend/Kds.Ai.Warehouse/Sql/Bootstrap/Tenant/Curated/0611_create_curated_pos_order_items.sql
Source Of Truth For V1 Contracts
For this slice, the source of truth is:
- the existing curated bootstrap SQL for
pos_ordersandpos_order_items - the existing staging models under
backend/integrations/Kds.Ai.Integrations.BrinkPos/Models/Staging/Sales2/GetOrders - the curated model docs and Brink mapping docs used as semantic reference
The broader documents under:
docs/features/ETL/epics/06-source-adapter-brink-pos-api/01-first-job-foundation/
are treated only as supporting material. They may remain broader than this actual implementation scope.
Staging And Load Interpretation
For this slice, the pipeline layers are interpreted as follows:
- S3
raw/stores the original XML payload from Brink - S3
load/stores processed Parquet contracts - Redshift
stagingstores data loaded from those Parquet contracts - Redshift
curatedstores business-facing mappings built from Redshiftstaging
Important rule:
- the existing
GetOrdersstaging model is reused - Module 0 does not redesign staging
- later implementation work must only verify completeness and correctness of the existing staging model against:
- Brink portal documentation
temp/GetOrders_WithKnownBusinessDate_CallsRealBrinkEndpoint_2024-10-06.xml
Field Coverage Decision
For Module 0, field-scope decisions are frozen as follows:
- the job targets the full existing curated contracts for
curated.pos_ordersandcurated.pos_order_items - the job uses the full existing
GetOrdersstaging contract already modeled in code - fields that cannot be populated correctly from
GetOrdersplusGetCurrentBusinessDatealone are allowed to beNULLin v1 - missing enrichment from other Brink endpoints is not a blocker for the first slice
This means:
- no extra endpoint is added just to backfill one field
- nullable output is preferred over hidden scope expansion
- any later enrichment must be added as a separate, atomic scope extension
Extensibility Rule
The first slice must be easy to extend.
Future addition of a new Brink contract should be:
- fast
- isolated
- atomic
- non-breaking for the existing
ordersandorder_itemsflow
This implies:
- orchestration is stage-based and contract-based
- adding a new endpoint later must not require redesign of the current
GetOrderspath - adding enrichment later must be possible without invalidating the current v1 delivery
Testing Rule
Testing is part of the delivery contract, not a later hardening task.
Unit tests
- every module must include unit tests
- unit tests should verify module-local rules, mappings, validation, orchestration branching, and failure semantics
Live E2E tests
- every module should include live E2E coverage when the module represents a completed ETL step that can be validated against real services
- live E2E tests should use Aspire-managed secrets and environment wiring to reach:
- Brink POS API
- AWS services such as S3
- later Redshift when the stage requires it
Examples
extract_rawshould have a live E2E test that calls real Brink POS endpoints and verifies that raw XML is persisted to S3normalize_loadshould have a live E2E test that starts from a real raw artifact and verifies written Parquet outputload_to_stagingshould have a live E2E test that verifies Redshift staging load from produced Parquetstaging_to_curatedshould have a live E2E test that verifies curated rows after SQL mapping
Practical rule
- if a module ends with a clearly verifiable ETL boundary, that module should not be treated as complete without E2E validation unless there is a concrete technical blocker
- if a live E2E test is temporarily not possible, the blocker must be documented explicitly in the module task
Success Criteria For Module 0
Module 0 is complete when the team treats the following as fixed:
- the first Brink ETL slice is only
ordersandorder_items GetCurrentBusinessDateis required for daily execution supportGetOrdersis the main transactional source- curated targets are fixed as:
curated.pos_orderscurated.pos_order_items- the existing
GetOrdersstaging model is reused and later only verified, not redesigned - fields missing non-
GetOrdersenrichment are allowed to remainNULLin v1 - older groundwork docs are non-authoritative when they widen the scope beyond this decision record
- every module requires unit tests, and completed ETL stages require live E2E verification whenever feasible