D
×
A

Deuna × Aidaptive

Smartrouter Scoping Project — internal collaboration portal. Sign in with your work email to continue.

Access restricted to @aidaptive.com and @deuna.com accounts.

🚫

Access Denied

Your account () is not authorized to view this portal.

Access is restricted to @aidaptive.com and @deuna.com email addresses.

Aidaptive × Deuna

Smartrouter
Scoping Project

Phase 0 — In Progress
Overview
🏠Project Overview 📅Timeline & Phases 👥Team
Scope
🎯Use Cases 🗄️Data & Schema
Analysis
🔍Repo Analysis ⚡Training Platform Gaps
Status
❓Open Questions 🔑Access & Blockers 📎References 🗂️All Versions
Last updated 2026-02-19
Start date 2026-02-18
Aidaptive × Deuna › Smartrouter Scoping Project
Phase 0  ·  In Progress  ·  $6K budget
Phase 0 — Assessment Only

Smartrouter AI/ML Integration

Scoping and effort estimation for integrating Athia's AI/ML platform into Deuna's payment routing service. No implementation in this phase — the goal is a clear, detailed effort estimate before committing to delivery.

Budget
$6K
Phase 0
Duration
2 days
Assessment
Latency Target
p95 <200ms
Revised from 50ms
Training Gaps
14 gaps
~104.5 person-days
🏠Project Overview
What this project is and what success looks like
🎯

Purpose

Assess the effort required to integrate Athia AI/ML into Deuna's payment routing. Produce a clear work breakdown and estimate before any implementation begins.

✅

Phase 0 Deliverables

  • Full schema & data understanding
  • Effort estimate per workstream
  • Risks and open questions resolved
  • Recommended build order
🏆

Long-Term Success

  • Measurable approval lift
  • Stability during PSP outages
  • Latency: p95 < 200ms
  • Closed feedback/learning loop

✅ In Scope (Phase 0)

  • Understand Deuna's data, schema, routing rules
  • Assess Athia platform gaps vs. what's needed
  • Size effort for P-01 through P-05 use cases
  • Identify all dependencies, blockers, risks

🚫 Out of Scope (Phase 0)

  • Any implementation or code delivery
  • 3DS optimization (Phase 2)
  • User-facing messaging (Phase 3)
  • Installment optimization
📅Timeline & Phases
Project phases from assessment to full delivery
🔍

Phase 0 — Assess Level of Effort  In Progress

2 days · $6K budget · Started 2026-02-18
Nail down all the work required. Produce a detailed estimate with confidence before committing to delivery.

🚀

Phase 1 — Model in Production  Pending

2 weeks · Core delivery
Model running in production for 2 processors with basic feature store. Target merchant: Volaris.

📊

Phase 2 — Monitoring + Experimentation  Pending

Week 3 · Add monitoring and integrate with A/B experimentation infrastructure.

⚙️

Phase 3 — Drift Detection, CI/CD, Ramp-Up  Pending

TBD · Drift detection, CI/CD pipeline, experiment ramp-up, additional model techniques.

👥Team
People involved and their roles
Deuna (Client)
NameRole
PabloCTO — Executive Sponsor
IsraelData POC — Snowflake & Data Access
FarhanClaude / LLM Access POC
Mark WalickProduct Management Lead
Aidaptive (Contractor)
NameRole
RakeshEngineering Lead
NaokiEngineer
🎯Use Cases (P-01 to P-05)
The five P0 use cases to be delivered
🏢

Phase 1 Target Merchant: Volaris  Decided 2026-02-19

Volaris selected over Cinépolis. Known PSPs: Worldpay (ID: 76), MIT (ID: 85), Elavon (cards), Amex (Amex cards) — 4 processors total with routing policies per currency. Cinépolis deferred: only shows Cybersource (a gateway), actual processor unknown.

P-01

Outage Detection & Failover

Detect PSP failures via persistent timeout codes. Auto fail-over and fail-back using random sampling of downed PSP to detect recovery.

P-02

Routing Optimizer

Optimize Deuna's existing static routing rules based on historical outcomes. Build on existing rules engine rather than starting from scratch.

P-03

Per-Transaction Route Selection

Rank top 3 payment processors per transaction in real time based on prior outcomes, card signals, and merchant context.

P-04

Message Manipulation

Toggle CIT/MIT, AVS, MCC variables in authorization request messages. Provide top 3 configuration recommendations per transaction.

P-05

Retry Optimization

Optimize when, how, and where to retry declined transactions. MIT/subs focused. Enterprise darktime reduction. Delayed retry based on processor reputation.

🗄️Data & Schema
Snowflake database overview — extracted 2026-02-18

Connection

VLTAXPW-RMONTES

Database: PAYMENT_ML

Access: Read-only

ABTESTING Schema

Denormalized flat join of all views. Best starting point for EDA. No complex joins needed.

ALL_VIEWS_FLAT ALL_PAYMENT_EVENTS_FLAT

SOURCES Schema

15 clean views: orders, payments, attempts, events, user profiles, routing logs, merchant rules, airline data.

ViewWhy It MattersUse Cases
VW_ATHENA_PAYMENT_ATTEMPTFull retry chain per payment; processor, error codes, hard/soft decline, DYNAMIC_ROUTING_DETAIL JSONP-03 P-05
VW_SMART_ROUTING_ATTEMPTSLive routing engine log: algorithm type, latency, skip reasons — direct latency signal for p95 <200msP-01 P-02
VW_ROUTING_MERCHANT_RULEExisting static rules engine — foundation for routing optimizer. SHADOW_MODE column suggests testing infrastructure exists.P-02
ABTESTING.ALL_VIEWS_FLATEverything joined in one table — best for initial EDAEDA
Feature GroupKey ColumnsUse
Retry historyNUM_ATTEMPTS_ORDER, PREVIOUS_ORDER_ERROR_CODE, AVG_SEC_BETWEEN_PAYMENT_ATTEMPSP-05
Error signalsERROR_CODE, ERROR_CATEGORY, HARD_SOFTP-03, P-05
Card signalsCARD_BIN, CARD_BRAND, BANK, CARD_COUNTRYP-03
User behaviorTARGET_USER_FRAUD_RATE_COHORT, TOTA_MINUTES_BROWSING, RFM valuesP-03
Message configMCI_MSI_TYPE, ORDER_MCI_MSI_TYPE, PAYMENT_ATTEMPT_METHOD_TYPEP-04
Geo & DeviceORDER_COUNTRY_CODE, TARGET_USER_BROWSER, TARGET_USER_DEVICEP-03
🔍Repository Analysis
Findings from both Deuna GitHub repos — analyzed 2026-02-19

DATA-Athena-Snowflake

github.com/DUNA-E-Commmerce/DATA-Athena-Snowflake

Python / LangGraph

⚠️ Key Finding

This is an LLM-powered analytics platform, not a training platform. It generates strategies via GPT-4o / Claude — it does not train ML models. All pattern detection uses hardcoded thresholds, not learned parameters.

What's Implemented

WorkflowStatus
Acceptance rate analysisDone
Fraud card analysisDone
Metrics anomaly detectionDone
Chatbot / data analystDone
Strategy generation directorPartial
Cost optimizationEarly stage
Retry optimizationMissing

Gaps Found

  • ✗ No retry-specific workflow (P-05 gap)
  • ✗ Strategy Director matcher has exit() placeholder
  • ✗ Ranker node uses dummy prompts
  • ✗ All thresholds hardcoded — no adaptive learning
  • ✗ Limited error recovery / circuit breakers

🧪 Testing Coverage

~18%
Est. coverage
421
Test functions
28
Test files
LayerCoverageNotes
Metrics layer70–80%Well tested — 5 files
Deployment / config50–60%Validation tests solid
Deep-dive utilities40–50%Pareto, metric router, comparator
Route handlers (14)0%Completely untested
Services (13)0%Completely untested
Clients (Redis, Postgres)0%Completely untested
Multi-agent core + 11 branches~5%1 manual test — not in pytest
Lambda / AgentCore entrypoints0%4 entrypoints — no tests

Maturity: 2/5 — Immature. Only peripheral layers tested. The core product (multi-agent workflows) is essentially a black box — changes break silently. CI runs only isolated metrics + deployment tests, not the full suite.

athena-platform

github.com/DUNA-E-Commmerce/athena-platform

Go / Gin

✅ Key Finding

This is a production-ready ML serving + A/B testing platform. Model registry, experiment management, and auto-winner selection are all built. The only missing piece is the automated training pipeline.

ML Inference Types (already in registry)

TypeMaps To
processor_selectorP-03
retry_predictorP-05
retry_sequenceP-05
installment_optimizerOut of scope

Snowflake Tables

TableStatus
ATHIA_PREDICTIONSActive
ATHIA_FEEDBACKActive
ATHIA_TRAINING_DATASETActive
ATHIA_EXPERIMENT_LIFTActive
ATHIA_STAGE_OUTCOMESNot deployed
ATHIA_SESSION_SUMMARYNot deployed

A/B Experimentation — Auto-Winner Guardrails

Stats

p-value < 0.05
Min 1000 samples/variant
Min 7 days runtime

Lift

Min 1% absolute lift
Deterministic bucketing
SHA256(transaction_id)

Guardrails

≤10% latency regression
≥−5% revenue regression
Dry-run mode (safe default)

🧪 Testing Coverage

~25–30%
Est. coverage
777
Test functions
126
Test files
LayerCoverageNotes
Domain services (44)44/44All have test files
Repositories (43)~43/43In-memory SQLite isolation
V1 REST handlers (18)15/18 (83%)agent, workspaces, elements missing
Auth middlewareTestedJWT + API key covered
V2 REST handlers (18)0/18 (0%)Entire new API version untested
Bedrock client0%Excluded from coverage config
auth, bedrock, element, workspace services0%4 domain services with no tests
Bootstrap / DI graphSkippedTODO: testcontainers

Maturity: 3.5/5 — Solid foundation with a critical blind spot. Domain and repository layers well covered. V2 API (18 handlers) and Bedrock ML inference path are completely untested. CI threshold is only 20% and internal/clients/ is excluded from coverage entirely.

Testing Comparison — Both Repos

MetricDATA-Athena-Snowflakeathena-platform
Test functions421777
Test files28126
Est. coverage~18%~25–30%
Core product tested?No — multi-agent core untestedPartial — V2 + Bedrock missing
CI enforced?Partial (fragmented)Yes — every PR
Coverage thresholdNone enforced20% (too low; target: 65%)
Maturity2/5 — Immature3.5/5 — Functional
⚡Training Platform Gaps
14 gaps to close before production — ~104.5 person-days total

Timeline (2 engineers)

Full delivery: 12–13 weeks

MVP (Stages 1–2 only): 5–6 weeks

1 engineer: ~21 weeks

Build Order

Stage 1 must complete before Stage 2. Stages 3–5 can overlap with late Stage 2.

Total Effort

~104.5d

100 tasks across 5 stages

StageGapCategoryPriorityEffortStatus
1 – FoundationG-02 OrchestrationInfrastructureHigh8dNot started
1 – FoundationG-08 Feature StoreML InfraHigh13.5dNot started
1 – FoundationG-04 Data ValidationData QualityHigh7dNot started
2 – AutomationG-03 CI/CD PipelineDevOpsHigh9dNot started
2 – AutomationG-06 Deployment AutomationAutomationHigh7.5dNot started
2 – AutomationG-07 Model RegistrationAutomationMedium5.5dNot started
2 – AutomationG-01 Automated RetrainingAutomationHigh10dNot started
3 – GovernanceG-13 Versioning WorkflowGovernanceHigh5dNot started
3 – GovernanceG-10 Lineage TrackingGovernanceMedium6.5dNot started
3 – GovernanceG-14 Rollback CapabilityReliabilityHigh5dNot started
4 – ObservabilityG-05 Model MonitoringObservabilityHigh8dNot started
4 – ObservabilityG-09 Drift DetectionObservabilityMedium7dNot started
5 – ML QualityG-11 Hyperparameter TuningML QualityMedium5.5dNot started
5 – ML QualityG-12 Algorithm ComparisonML QualityMedium7dNot started
Effort by Stage
Stage 1 – Foundation
28.5d
Stage 2 – Automation
32d
Stage 3 – Governance
16.5d
Stage 4 – Observability
15d
Stage 5 – ML Quality
12.5d
❓Open Questions
Items that need answers before effort estimates are finalized
1

Are ATHIA_PREDICTIONS / ATHIA_FEEDBACK tables populated in Deuna's Snowflake today?

Or only in Athia's internal environment? — Ask Israel

2

Are SageMaker endpoints live for processor_selector / retry_predictor?

Or are they placeholders only? — Rakesh to confirm

3

Is there a live model in MODEL_ARTIFACTS that Deuna's payment service is calling today?

Rakesh to confirm

4

What is the current payment volume through the routing engine?

Minimum 1,000 transactions per variant needed for A/B test statistical validity — Ask Israel

5

Who owns the athena-platform Go repo deployments?

Aidaptive or Deuna infra? Affects Phase 1 deployment planning — Clarify with Pablo

🔑Access & Blockers
Pending provisioning items
ItemOwnerStatus
Snowflake access — RakeshIsrael (Deuna)✓ Done (2026-02-18)
Snowflake access — NaokiRakesh + Naoki✓ Done (2026-02-19)
Code / repo access — RakeshPablo (Deuna)✓ Done (2026-02-19)
Claude / LLM access & budgetPablo → Farhan✓ Done (2026-02-19)
Code / repo access — NaokiTBDPending
Deuna corp accounts — Rakesh & NaokiTBDPending
Claude Code credits — Rakesh & Naoki—Not needed
Deploy ATHIA_STAGE_OUTCOMES + ATHIA_SESSION_SUMMARY in SnowflakeRakeshPending
Build retry_optimization_requested workflowRakeshPending
Decisions Log
DateDecisionRationaleMade By
2026-02-18Latency target updated: p95 <50ms → p95 <200msRevised from original SOW specRakesh (w/ Pablo)
2026-02-19Phase 1 target merchant set to Volaris (not Cinépolis)Volaris has known PSPs (Worldpay ID:76, MIT ID:85, Elavon, Amex); Cinépolis only shows Cybersource gateway — processor unknownMark Walick
📎References & Documents
Key links and documents for this project
📄
Project Plan — v13 (Latest)
2026-02-19 · Testing coverage & architecture deep-dive
📊
Data Dictionary
Google Sheets — Deuna data field definitions
🗺️
Athia Data Model
LucidChart — system architecture diagram
🐍
DATA-Athena-Snowflake
LLM analytics platform (Python / LangGraph)
🐹
athena-platform
ML serving + A/B testing platform (Go / Gin)
📋
Full Project Plan
All versions — see export history below ↓
🗄️
Snowflake Schema Reference
2026-02-18 · Extracted from PAYMENT_ML database
🗂️Project Plan — All Versions
Full export history — all snapshots of the project plan
VersionDateNotesDownload
v13 Latest2026-02-19Added testing coverage & architecture deep-dive for both repos📄 Open
v122026-02-19Latest export📄 Open
v112026-02-19Updated access status (Snowflake done for both, Claude LLM done), Volaris merchant decision, follow-up action items📄 Open
v102026-02-19Added full repo analysis: DATA-Athena-Snowflake + athena-platform findings, updated open questions📄 Open
v92026-02-18Added Next Steps section📄 Open
v82026-02-18Refocused Phase 0 as assessment-only with clear deliverables📄 Open
v72026-02-18Latest snapshot with improved formatting📄 Open
v62026-02-18Improved table formatting — fixed column overlaps📄 Open
v52026-02-18Updated project purpose to reflect scoping nature📄 Open
v42026-02-18Self-contained: includes project plan + teams + schema📄 Open
v32026-02-18Updated with TEAMS.md reference, Mark Walick correction📄 Open
v22026-02-18Updated with schema notes, stakeholders, todos📄 Open
v12026-02-18Initial export📄 Open