Spensara Spensara Knowledge Base & Documentation Repository

Repository Docs & Knowledge Base

Consolidated Spensara documentation repository (722 Markdown & architecture documents in ../repository)
Built Word Documents (.docx): Spensara Overview (.docx) Capability Assessment (.docx) Brink POS Ingestion Analysis (.docx) The Borg Ingestion Architecture (.docx)

Implementation Specs (157)

Detailed engineering and feature implementation specifications.
implementation-specs/specs/BrinkPosOrdersFirstEtlJob/TASK2.2.md 3,051 bytes · Updated Oct 23, 2026 10:44 AM EDT
Raw File

TASK 2.2: Implement Brink Raw Capture Boundary For GetOrders

Summary

Implement the actual Brink extraction boundary for the ETL path so GetOrders is captured only through IBrinkRawClient and never through typed DTO extraction. This subtask should also narrow IBrinkPosFacade usage to the control-only role needed for GetCurrentBusinessDate, while making the Brink integration consume externally provided connection context instead of resolving it from tenant/DB infrastructure.

Dependencies

  • TASK 2.1 - child extract orchestration and business-date resolution

Files to Create

1. Raw endpoint execution seam

Create or finalize the component that executes GetOrders through the raw client and returns endpoint-level execution metadata.

This boundary must remain protocol-focused and must not take ownership of ETL storage, batch semantics, or tenant binding lookup.

Recommended logical service:

  • BrinkPosEndpointExecutor

Files to Modify

2. Brink integration contracts

Modify the Brink ETL-facing boundary so:

  • IBrinkPosFacade is used only for GetCurrentBusinessDate
  • IBrinkRawClient is the only ETL extraction contract for GetOrders
  • both consume externally provided BrinkConnectionDefinition or are created by a factory that is already bound to that connection context
  • the ETL path does not depend on ISourceConnectionRepository, IRuntimeTenantResolver, or Warehouse/Data abstractions from inside the Brink integration module

Required Behavior

  • GetOrders must be captured as a stream
  • ETL orchestration must not depend on typed GetOrders DTOs
  • SOAP transport and request construction remain hidden inside the Brink integration module
  • endpoint execution returns enough metadata for downstream raw persistence and diagnostics
  • adapter tests for this boundary must be able to run against an explicit test BrinkConnectionDefinition without operational DB coupling

Testing

Unit tests

Add unit tests for:

  • GetOrders routing through IBrinkRawClient
  • no typed extract path used by ETL orchestration
  • endpoint execution metadata generation
  • adapter execution with externally provided BrinkConnectionDefinition

Acceptance Criteria

  • [x] ETL uses IBrinkRawClient for GetOrders
  • [x] IBrinkPosFacade remains control-only for this slice
  • [x] The Brink integration consumes externally provided connection context for the ETL path
  • [x] The ETL path in Kds.Ai.Integrations.BrinkPos no longer depends on tenant or repository resolution
  • [x] ETL does not use typed GetOrders DTO extraction
  • [x] Endpoint execution metadata is available for downstream persistence
  • [x] Unit tests cover the raw boundary behavior

Notes

  • Keep this subtask focused on the Brink boundary itself.
  • Keep the exact API-shape decision flexible between explicit parameters and a bound-factory approach, but do not allow connection lookup to remain inside the integration module.
  • Do not implement S3 write logic here; that belongs to TASK 2.3.