Commit Graph

452 Commits

Author SHA1 Message Date
jgrusewski
2bce9859cc test(trading_service): unit tests for risk service VaR and risk limits
Add 25 unit tests for the RiskServiceImpl pure functions:
- Parametric VaR fallback formula (notional * 0.02)
- Equal contribution percentage for N symbols (including empty)
- Drawdown computation (empty, positive PnL, negative, mixed)
- Returns from executions (empty, single, sorted, zero-price filtering)
- Volatility (empty, single, constant, known series)
- Sharpe ratio (insufficient data, zero vol, positive returns)
- Sortino ratio (insufficient data, no downside, mixed)
- VaR square-root-of-time scaling (1d→5d→30d)
- Concentration risk level thresholds
- Risk constants validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:49:50 +01:00
jgrusewski
18e00fff12 feat(trading_agent): correlation matrix support in Markowitz allocation
Add optional correlation matrix parameter to mean-variance optimization.
When provided, builds full covariance matrix (Sigma[i][j] = corr[i][j] *
vol_i * vol_j) instead of diagonal-only. Existing API unchanged — callers
pass None by default. New allocate_with_correlations() public method for
correlated optimization. Five new tests: identity-matches-diagonal,
correlated-differs-from-diagonal, invalid dimensions, non-square matrix,
and non-MeanVariance delegation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:33:14 +01:00
jgrusewski
940aae71b1 fix(trading_service): NaN/Inf guards in feature normalization
Add defensive checks to FeaturePreprocessor::normalize():
- Return 0.0 with warning log for NaN/Inf input values
- Clamp z-score output to [-10, 10] to prevent extreme values
- Add 4 unit tests covering NaN, Inf, -Inf, and extreme value clamping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:24:07 +01:00
jgrusewski
15c0fb5397 merge: pull liquid CfC v2 and codebase deduplication from main into production-hardening 2026-02-23 10:09:25 +01:00
jgrusewski
3637b49218 fix(trading_service): wire real portfolio notional into VaR calculations
Move position fetching before VaR calculation in both get_va_r and
get_risk_metrics so the portfolio notional is computed from real
position data (sum of |quantity * avg_price|) instead of the fake
confidence_level * 1_000_000.0 placeholder. Falls back to 100_000.0
when the portfolio is empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:04:34 +01:00
jgrusewski
51378aa4cc fix(trading_agent): wire real position data into allocation calculations
Replaces hardcoded zeros in AssetAllocation with real position data
queried from agent_orders. Adds fetch_current_positions() helper that
derives net quantity per symbol (buy - sell) and reuses it in both
allocate_portfolio and rebalance_portfolio to eliminate SQL duplication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:54:12 +01:00
jgrusewski
a51fe0d30d Merge feat/production-hardening: resolve 53 TODOs across 5 phases
Phase 1: ML pipeline verification (checkpoint roundtrip tests, feature pipeline tests, DQN VarMap bug fix, deleted 585 lines dead code)
Phase 2: Service production logic (real portfolio metrics, VaR positions, proto population, safetensors loading, shutdown handling)
Phase 3: Backtesting & data (equity curve, DBN metadata, progress callbacks, cross-symbol validation, event filtering)
Phase 4: ML crate TODOs (statrs t-distribution, quantization savings, safetensors header, microstructure features, 45-action masking, confidence EMA, AttentionMask)
Phase 5: Infrastructure/cleanup (TLS/OCSP docs, compliance roadmap, metrics docs, regime features, execution roadmap, auth #[ignore], chaos docs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:04:43 +01:00
jgrusewski
d777d714b2 feat(liquid): wire Liquid CfC into trading service and gRPC trainer
Closes the integration gap between Liquid CfC and DQN/PPO by adding:
- LiquidTrainer with gRPC progress callbacks, early stopping, and
  checkpoint management (ml/src/trainers/liquid.rs)
- LiquidModel wrapper in enhanced_ml.rs for hot-loading from safetensors
- Ensemble weight rebalance: DQN 0.25, PPO 0.25, TFT 0.20, Mamba2 0.15,
  Liquid-CfC 0.15

Verified: 81 liquid unit tests + 3 integration tests + 211 trading_service
tests pass, 0 compile errors across workspace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 01:14:33 +01:00
jgrusewski
4db5b86d9b chore(tests): clean stale FIXME in test_runner, document lock contention tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 01:14:24 +01:00
jgrusewski
3544e800f8 fix(services): regime feature extraction, correlation docs, execution roadmap, auth #[ignore], chaos docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 01:14:14 +01:00
jgrusewski
2980e6c50a docs(services): TLS/OCSP delegation, compliance roadmap, metrics doc comments
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 01:14:05 +01:00
jgrusewski
d4a0255595 feat(ml): AttentionMask causal masking, document multi-asset DQN and conversion layer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 01:03:53 +01:00
jgrusewski
60593ba8bb fix(services): wire event filter, document job store, implement cross-symbol validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:50:07 +01:00
jgrusewski
c45e4a039a feat(backtesting): DBN file metadata caching and progress callback for strategy engine
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:49:47 +01:00
jgrusewski
1896bb5a38 fix(backtesting): wire equity curve and drawdown periods to GetBacktestResults
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:49:17 +01:00
jgrusewski
bb116bad89 fix(trading_service): safetensors DQN loading, prediction shutdown, emergency order query
- Add load_from_safetensors() to DQNAgent for weight loading via VarMap
- Update RealDQNModel::from_checkpoint to try safetensors first, fall back to JSON
- Replace std::mem::forget(prediction_shutdown_tx) with proper Vec-based storage
  that sends shutdown signal and drops senders during graceful shutdown
- Wire order_manager.get_open_orders() into emergency_stop response so callers
  see which orders were active when the kill switch engaged

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:26:13 +01:00
jgrusewski
b7c92d60f9 fix(trading_service): use real position sizes and marginal VaR contributions
Replace hardcoded position_size: 1000.0 with actual position quantities
from fetch_positions(). Compute contribution_pct as marginal VaR ratio
(symbol_var / portfolio_var * 100) instead of naive equal-weight split.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:20:25 +01:00
jgrusewski
164e96bf44 fix(trading_agent): wire real volatility, prices, and metrics into allocate_portfolio
Replace 7 hardcoded 0.0 values with real calculations:
- target_quantity from last close price
- portfolio_volatility from log return stddev * sqrt(252)
- portfolio_sharpe from weighted returns / portfolio vol
- var_95 parametric VaR
- max_drawdown_estimate from vol approximation
- rebalance_delta as target - current (0 until positions available)
- per-asset volatility from price bars (was hardcoded 0.15)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:20:05 +01:00
jgrusewski
33576dddb9 fix(services): populate event protos, compute max drawdown, document integration gaps
Tasks 8-14 production hardening batch:

- Populate Order/Position/Execution proto messages from JSON payload in event
  stream converters instead of returning None (Task 9)
- Compute max_drawdown from cumulative PnL samples in A/B testing pipeline
  instead of hardcoded 0.0 (Task 11)
- Document feature pipeline integration blockers with detailed roadmap
  comments in state.rs and trading.rs (Task 8)
- Document realized PnL gap: TradingPosition lacks the field, repository
  has async method incompatible with Iterator::map (Task 10)
- Document ML order quantity gap in api_gateway proxy: MlOrderResponse
  proto lacks quantity field (Task 12)
- Document per-symbol weight tracking roadmap in ensemble_coordinator (Task 13)
- Document OHLCV bar pipeline upgrade roadmap in state.rs (Task 14)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:18:39 +01:00
jgrusewski
4a14e53eeb refactor(broker_gateway): replace inline CircuitBreaker with common::resilience::CircuitBreaker
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:39:26 +01:00
jgrusewski
fd1b60bbf5 refactor: unify ModelType into common/model_types.rs
Consolidate 4 separate ModelType enum definitions (ml 15 variants,
model_loader 7, campaign 2, job_spawner 4) into a single canonical
definition in common/src/model_types.rs with the union of all variants
and all methods (file_extension, as_str, to_db_string, weight, from_str,
Display).

- ml/src/lib.rs: replace 15-variant enum with re-export
- model_loader/src/lib.rs: replace 7-variant enum with re-export,
  update PascalCase names (Dqn->DQN, Tft->TFT, etc)
- ml/hyperopt/campaign.rs: replace 2-variant enum with re-export
- services/ml_training_service/job_spawner.rs: replace 4-variant enum
  with re-export, MAMBA2->MAMBA
- Remove orphan impl ToString in ml/observability/metrics.rs (Display
  now provided by canonical type)
- Update backtesting_service and model_loader tests for new names

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:39:26 +01:00
jgrusewski
d2e6a78bab refactor: extract shared TLS types (TlsProtocolVersion, UserRole, ClientIdentity) to common/
Move identical TLS type definitions from 4 service crates into
common/src/tls.rs, eliminating ~435 lines of duplicated code.
Each service retains its own TlsConfig struct and validation logic
(async vs sync, delegated vs monolithic) while sharing the type
definitions. Services re-export the types for backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:35:42 +01:00
jgrusewski
34215f7c7e refactor(api_gateway): rename ConfigError to GatewayConfigError to avoid collision with config crate
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:35:42 +01:00
jgrusewski
74bf052738 refactor: rename duplicate ModelMetadata structs to unique names
8 structs shared the name ModelMetadata across the codebase. Renamed 7
domain-specific variants to descriptive names, keeping ml::ModelMetadata
as the canonical definition:

- model_loader: ModelMetadata → LoadedModelInfo
- config: ModelMetadata → ModelRegistryEntry
- trading_service: ModelMetadata → RuntimeModelInfo
- ml-data: ModelMetadata → ModelRecord
- adaptive-strategy: ModelMetadata → AdaptiveModelInfo
- storage: ModelMetadata → ModelStorageExtras
- tests/harness: ModelMetadata → TestModelMetrics

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:51:57 +01:00
jgrusewski
e3a46ba908 refactor: consolidate ModelType to single canonical enum in ml
Removed 3 duplicate ModelType enums (model_loader, hyperopt campaign,
job_spawner). Canonical definition in ml/src/lib.rs with 15 variants.
model_loader and job_spawner now re-export from ml. Added as_str(),
s3_prefix(), Display, to_db_string(), and weight() to canonical enum.
Replaced conflicting ToString impl with Display. Fixed variant name
mismatches (Dqn->DQN, Mamba2->MAMBA, Liquid->LNN, TlobTransformer->TLOB).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:26:09 +01:00
jgrusewski
42634014b6 refactor: consolidate DQNConfig to single canonical definition
Removed duplicate DQNConfig from agent.rs (13 fields, pre-Rainbow with
f64 gamma/epsilon) and adaptive-strategy stub (unit struct). Canonical
definition in dqn/dqn.rs now has 51 fields covering full Rainbow DQN
plus agent-level trading parameters (minimum_profit_factor, weight_decay).

Key changes:
- agent.rs imports DQNConfig from dqn.rs instead of defining its own
- Fixed f32/f64 type mismatches (epsilon_start/end/decay cast to f64
  where QNetworkConfig expects f64)
- Renamed replay_buffer_size -> replay_buffer_capacity across all callers
- Updated 13 files across ml, adaptive-strategy, and trading_service
- All 2009 ml tests pass, 0 clippy warnings in modified files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 20:49:22 +01:00
jgrusewski
1103fd56cd fix: resolve ambiguous float type in broker_gateway_service tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 20:00:29 +01:00
jgrusewski
92b5ba79be test: fix flaky and environment-dependent tests
- broker_gateway: use 100ms circuit breaker timeout in tests (was 60s)
- ml_training: relax GPU count assertions to >= 1 (env-dependent)
- icmarkets: mark 4 live-credential tests as #[ignore]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:33:50 +01:00
jgrusewski
afee3489cd feat(broker_gateway_service): wire cTrader client for live order routing
Add optional cTrader broker integration behind `icmarkets` feature flag.
When CTRADER_ENABLED=true with credentials, orders are routed to cTrader
after DB persistence. Handlers for account state, positions, execution
streaming, and cancellation all proxy through the live broker when
connected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
8b81138262 docs: rewrite outdated READMEs and add web-gateway docs
Rewrite 7 crate READMEs to reflect current architecture: correct
model types (DQN/PPO/TFT/Mamba2), AtomicKillSwitch, real
EnsembleConfig source from ml, actual data crate purpose,
web-dashboard project details, ml_training_service ports.

Fix 5 api_gateway/TLI docs: strip swarm agent framing, update
service endpoints to api_gateway:50050, remove deleted dashboard
references and hardcoded paths.

Add missing web-gateway/README.md documenting 24 REST endpoints,
WebSocket support, JWT auth, and 3-tier rate limiting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:39:12 +01:00
jgrusewski
f672c0c584 docs: delete stale swarm agent artifacts and reports
Remove 45+ AGENT_*, WAVE_*, and completion report files that were
one-time swarm deliverables with no living documentation value.
Remove reports/2025-11-16_17_hyperopt_analysis/ (55 files, code
changes already landed). Content preserved in git history.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:32:32 +01:00
jgrusewski
328bf202ae safety(services): replace placeholder stubs with proper error handling
- ml_training_service: health check now validates orchestrator readiness
  via AtomicBool flag instead of always returning "healthy"
- broker_gateway_service: replace hardcoded $100k account data with
  explicit FAILED_PRECONDITION errors for unimplemented broker queries
- data_acquisition_service: spawn background download task instead of
  leaving jobs stuck in Pending, add real health check with job counts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 10:32:38 +01:00
jgrusewski
4363f779ab safety(trading-service): replace expect() with if-let in allocation
Replace two .expect() calls on HashMap lookups with safe if-let pattern
to comply with deny(clippy::expect_used) rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:03:10 +01:00
jgrusewski
9ed4fdd489 safety(api-gateway): remove debug token logging from JWT interceptor
Removed error!() call that logged the full JWT token on decode failure.
This was a security risk - tokens should never appear in logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:27:10 +01:00
jgrusewski
f46591dc9e feat(trading-service): add RealMamba2Model, eliminate last Status::unimplemented
Wire Mamba2 model type into the gRPC model loading match in enhanced_ml.rs.
All four model types (DQN, PPO, TFT, Mamba2) now have real loading paths.
The wildcard arm now returns invalid_argument instead of unimplemented.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:23:38 +01:00
jgrusewski
55ec8b3e1d feat(trading-agent): wire GenerateOrders and SubmitAgentOrders to real logic
Replace last 2 stub gRPC handlers with real implementations:
- GenerateOrders: loads allocation, generates orders via OrderGenerator with
  ML signal context, contract price estimation, and dynamic stop-loss
- SubmitAgentOrders: validates orders, supports dry_run mode, persists to
  agent_orders table with full metadata
Trading agent service: 15/15 endpoints now have real implementations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:15:18 +01:00
jgrusewski
a79a151588 feat(trading-service): implement 5 gRPC streaming endpoints
Replace Status::unimplemented() with real streaming implementations:
- stream_va_r_updates: periodic VaR recalculation with change detection
- stream_risk_alerts: kill switch status + VaR breach monitoring
- stream_system_status: real-time health, CPU/memory/disk metrics
- stream_metrics: trading performance counters (connections, requests, latency)
- stream_alerts: operational alerts for health/CPU/memory/disk anomalies
All use tokio::time::interval with graceful client disconnect handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:14:52 +01:00
jgrusewski
c83271bd14 safety: remove hardcoded dev credentials, add clippy deny to broker_gateway
- api_gateway: DATABASE_URL now required (was fallback to hardcoded dev password)
- broker_gateway: DATABASE_URL now required (was fallback to hardcoded dev password)
- broker_gateway: add deny(clippy::unwrap_used, clippy::expect_used) to lib.rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:14:20 +01:00
jgrusewski
0cd9ce53c0 feat(trading-service): initialize EnsembleCoordinator with real ML adapters
Wire EnsembleCoordinator with 4 candle-backed inference adapters:
- DQN (0.30 weight), PPO (0.30), TFT (0.20), Mamba2 (0.20)
Add InferenceAdapterBridge to convert ModelInferenceAdapter→MLModel trait.
Models initialize with random weights; production checkpoints hot-loaded
via ModelRegistry shadow-buffer swap. PredictionGenerationLoop now active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:41:06 +01:00
jgrusewski
e3f0cf7c7d feat(trading-agent): wire GetAllocation, RebalancePortfolio, GetAgentPerformance, StreamAgentActivity
Replace 4 stub gRPC handlers with real implementations:
- GetAllocation: re-computes allocation from latest asset selection via PortfolioAllocator
- RebalancePortfolio: compares target vs current positions, generates drift-based actions
- GetAgentPerformance: queries agent_orders for P&L, win rate, Sharpe, max drawdown
- StreamAgentActivity: sends 5-second heartbeat events until client disconnects
Trading agent service: 14/15 endpoints now have real implementations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:40:35 +01:00
jgrusewski
9036dec71c feat(risk): replace hardcoded zero metrics with real calculations
Compute real values for 5 previously-zero risk metrics:
- current_drawdown: from unrealized PnL vs market value
- volatility: annualized std dev from execution price returns
- sharpe_ratio: excess return / volatility * sqrt(252)
- sortino_ratio: excess return / downside deviation * sqrt(252)
- position_risks: per-position VaR contribution and concentration
Wire get_position_risk() to real positions with filtering.
beta/alpha remain 0.0 (requires benchmark data integration).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:31:04 +01:00
jgrusewski
66717fa67f feat(trading-agent): wire SelectAssets and GetSelectedAssets to AssetSelector
Replace 2 stub gRPC handlers with real implementations:
- SelectAssets: scores instruments via MLFeatureExtractor, ranks with
  AssetSelector (TopN/Threshold/Quantile modes), persists to DB
- GetSelectedAssets: loads latest selection from asset_selections table
Add helper methods: score_instrument, store/load_asset_selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:30:33 +01:00
jgrusewski
118ba694e3 feat: add graceful shutdown to 3 services, fix backtesting expects
- backtesting_service: serve_with_shutdown + fix 4 .expect() violating
  deny(clippy::expect_used) → match/if-let with error logging
- data_acquisition_service: serve_with_shutdown for clean SIGTERM
- ml_training_service: serve_with_shutdown replacing manual serve()

All long-running services now handle CTRL+C/SIGTERM gracefully,
preventing checkpoint corruption and database state issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:06:25 +01:00
jgrusewski
9b482b4db2 feat(monitoring): wire real CPU/memory/disk metrics via sysinfo
Replace hardcoded 0.0 system metrics with live values from sysinfo
crate (already in dependencies). Uses Arc<RwLock<System>> for thread-
safe refreshing. Network I/O left at 0.0 (requires sustained sampling).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:05:58 +01:00
jgrusewski
105435629d safety: fix 11 remaining unwraps, remove blanket clippy allow
- api_gateway/revocation.rs: 7 Prometheus .unwrap()→abort pattern
- ml_training/simple_metrics.rs: remove #![allow(clippy::unwrap_used)],
  fix 4 Prometheus .unwrap()→abort pattern

All service crates now enforce deny(unwrap_used) without file-level
overrides.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:53:14 +01:00
jgrusewski
cfbe7939dd safety: replace 21 unwrap/expect in trading_service and ml_training
- trading_service/metrics.rs: 16 expect→unwrap_or_else+abort on
  Prometheus metric registration (startup-only, fatal if fails)
- ml_training/asset_parser.rs: 5 expect→static Lazy<Regex> with abort
  (compiled once, eliminates per-call Regex::new overhead)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:15:39 +01:00
jgrusewski
1cd2975b70 fix(ml_training): mark DB-dependent test as #[ignore]
test_semantic_version_validation requires DATABASE_URL env var pointing
to a live PostgreSQL instance. Mark as ignored so CI doesn't fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:10:57 +01:00
jgrusewski
824a1412d3 safety: replace 74 unwrap/expect calls in 3 critical services
- api_gateway/main.rs: 18 expect→? or match+error! (gateway crash=outage)
- broker_gateway/metrics.rs: 24 expect→unwrap_or_else+abort (startup-only)
- ml_training/training_metrics.rs: 32 unwrap→unwrap_metric helper+abort

All Prometheus metric registrations now use explicit error handling
instead of bare .unwrap()/.expect(). Production panic surface reduced
by ~75%.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:02:01 +01:00
jgrusewski
1250d66ff1 feat: re-enable observability, migrate jaeger to OTLP exporter
Replace deprecated opentelemetry-jaeger 0.22 (incompatible with OTel 0.27)
with opentelemetry-otlp 0.27. Update TracingConfig fields (jaeger_endpoint
→ otlp_endpoint, enable_jaeger → enable_export). Uncomment
init_observability() in trading_service, ml_training_service, and
backtesting_service.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 03:09:02 +01:00
jgrusewski
704ce8eff6 feat: add broker_gateway_service to workspace, fix compilation
Add the 8.4k-line broker gateway (AMP Futures/CQG FIX routing) to
workspace members. Fix 16 compilation errors from API drift:
- Replace sqlx::query! macros with runtime sqlx::query (no .sqlx cache)
- Add FromRow structs for typed query results
- Remove unused imports, use safe indexing

7 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 02:50:45 +01:00