Commit Graph

51 Commits

Author SHA1 Message Date
jgrusewski
61f88d3746 fix(monitoring): real streaming metrics, staleness detection, richer TUI
- StreamSystemStatus now queries real Prometheus data (was all zeros)
- StreamAlerts returns honest unimplemented (was sending empty events)
- Training epoch shows "N" not "N/0" (max_epochs not in proto)
- GPU power shows "300W" not "300W / 0W" when limit unavailable
- Services cockpit shows error reason when service is DOWN
- System status polling detects staleness after 3 consecutive failures
- Training cockpit header shows active K8s job count

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 14:44:05 +01:00
jgrusewski
667e480c09 fix(fxt): replace MCP server stubs with honest not_implemented errors
All 30 MCP tool handlers now return structured JSON error with
isError=true instead of fake "stub: would ..." placeholder responses.
Tool registrations preserved so list_tools still works.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 14:43:34 +01:00
jgrusewski
463b2cd130 refactor(fxt): complete TLI→FXT rename + fix token storage panic
- Rename TliConfig→FxtConfig, TliError→FxtError, TliResult→FxtResult
- Migrate token storage path foxhunt-tli→foxhunt-fxt with auto-migration
- Fix FileTokenStorage::Default panic (fallback to /tmp on missing HOME)
- Update all doc comments, login prompt, config.toml.example, env vars
- Update keyring service names foxhunt-tli-access→foxhunt-fxt-access
- Add TOKEN_REFRESH_BUFFER_SECS named constant
- Add clarifying comments for JWT dummy key and IBKR default client ID

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 14:43:07 +01:00
jgrusewski
edfe4da2e8 refactor(proto): remove duplicate config_service.proto
config_service.proto (package foxhunt.config, 4 RPCs) was a subset of
config.proto (package config, 12 RPCs). Migrated api_gateway to implement
ConfigService from config.proto directly. Removed dead config_service()
method from fxt client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 14:17:44 +01:00
jgrusewski
ae0b2ed817 feat(fxt): wire Pods cockpit as key 7, update event loop
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:11:49 +01:00
jgrusewski
2571c2bbb3 feat(fxt): add Pods cockpit with service-grouped table
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:04:53 +01:00
jgrusewski
3c8fe238dd feat(fxt): add spawn_pods_stream with service grouping
Adds a new gRPC stream spawner that subscribes to SubscribeClusterPods
and groups pods by service name for the pods cockpit view. Follows the
same backoff/reconnect pattern used by all other stream spawners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:02:10 +01:00
jgrusewski
4951daea36 feat(fxt): add PodData/PodGroupData structs and StateUpdate::Pods
Add K8s pod data structures to TUI state layer for the upcoming pods
cockpit view. PodData represents individual pods, PodGroupData groups
them by service with ready/total counts. The StateUpdate::Pods variant
and apply_update handler wire the data path from gRPC streams to state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 12:56:40 +01:00
jgrusewski
5fe3608d92 fix(fxt,infra): production hardening — OTLP telemetry, TUI fixes, K8s infra
- Remove opentelemetry-otlp internal-logs feature (OTLP feedback loop)
- Switch trace sampling from AlwaysOn to 10% ratio-based
- Add RUST_LOG filtering (opentelemetry/h2/tonic/hyper=warn) to all 8 services
- Wire per-service latency measurement via health check → proto metadata → TUI
- Replace Vec::remove(0) with VecDeque ring buffers (O(1) vs O(n))
- Add Arc<AtomicBool> connected_sent for first-connected detection across 12 streams
- Add MAX_RECONNECT_ATTEMPTS (10) uniformly to all stream spawners
- Change kill switch/circuit breaker fields to Option types with N/A display
- Wire data_cache to real download status stream, remove dead cluster_events
- Remove ServiceData::new() hardcoded stubs, add honest placeholders
- Fix nanos_to_hms zero/negative guard, total_records semantic fix
- Fix RwLock held across yield in broker_gateway stream_account_state
- Add break after yield Err in broker/trading stream generators
- Fix connected_at advancing per tick in stream_session_status
- Tempo: replace emptyDir with 10Gi PVC, bump memory to 512Mi/2Gi
- Remove Prometheus gitlab-annotated-pods duplicate scrape job
- Wire 6 new gRPC streaming adapters (risk, trading, ml, data-acquisition)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:39:56 +01:00
jgrusewski
6f68e59723 feat(tui): wire live gRPC data into watch dashboard
- Add data_fetcher.rs: StateUpdate enum, DataFetcher with 7 background
  stream/poller tasks (training metrics, system status, account state,
  executions, portfolio summary, download status, risk metrics)
- Wire event_loop.rs: FoxhuntClient connect, DataFetcher start,
  mpsc channel drain each tick, apply_update() for all 11 variants
- Add connection status indicator to status bar (LIVE/CONNECTING/OFFLINE)
- Replace mock data defaults with empty vecs/zeros in state.rs
- Add ConnectionStatus enum (Connecting/Connected/Reconnecting/Error)
- Exponential backoff (1s → 30s) on stream errors with auto-reconnect

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:43:21 +01:00
jgrusewski
8ac49a2db3 fix(fxt): make AES-GCM tamper detection test more robust
Flip 4 positions in the base64 payload instead of 1 to eliminate
any chance of environmental flakiness from OsRng contention.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 01:44:27 +01:00
jgrusewski
078771bf95 feat(fxt): auto-refresh tokens and FXT_PASSWORD env var for non-interactive login
- Auto-refresh: before non-auth commands, if the access token is expired
  but a refresh token exists, silently regenerate tokens. Prints
  "Token refreshed." to stderr so users know what happened.
- FXT_PASSWORD: login reads password from this env var when set,
  skipping the interactive prompt. Safer than a --password flag
  (env vars don't appear in ps output or shell history).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 01:34:34 +01:00
jgrusewski
06cddd85d2 fix(fxt): wire auth interceptor into all gRPC clients
FoxhuntClient now holds an AuthInterceptor<FileTokenStorage> and
all 11 typed service accessors use with_interceptor() instead of
bare Channel::new(). This ensures every outgoing RPC automatically
includes the JWT Bearer token when one is cached on disk.

The bare channel() accessor is preserved for LoginClient which
needs unauthenticated access for the initial login RPC.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 01:21:07 +01:00
jgrusewski
0fdcc496be fix: type-safe proto enums, MCP protocol compliance, TUI teardown
- Replace hardcoded i32 enum matches with ProtoEnum::try_from() in
  8 command files (cluster, config, data, model, risk, service, train, tune)
- Replace hardcoded i32 literals with enum variants (EmergencyStopType,
  ExportFormat, TrainingMode)
- Add JSON-RPC 2.0 PARSE_ERROR (-32700) for malformed JSON input
- Validate jsonrpc:"2.0" version on incoming MCP requests
- Change unreachable execute_tool catch-all from Ok to Err
- Fix TUI teardown to not mask original event_loop error
- Rename config_cmd module to config (commands::config)
- 77 tests pass, 0 clippy warnings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 22:29:13 +01:00
jgrusewski
609f533abc feat: implement all 15 fxt CLI commands with real gRPC calls
- 13 commands with full gRPC implementations: service, train, tune,
  model, trade, broker, agent, data, risk, config, cluster, auth, backtest
- Streaming support: train logs --follow, broker executions --follow
- --json output on every command via OutputFormat/HumanReadable
- Fix web-gateway monitoring URL default (50057 → 50051, API Gateway)
- Rewire 7 remaining build.rs to consolidated proto/ root (web-gateway,
  backtesting_service, training_uploader, 3 test crates, e2e)
- Fix web-gateway ml_training.proto new fields (mode, max_epochs, resume)
- 75 fxt tests + 139 web-gateway tests, 0 clippy warnings, workspace clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 22:16:35 +01:00
jgrusewski
ab101f1110 feat: MCP server mode + TUI cockpit framework
MCP server (bin/fxt/src/mcp/):
- JSON-RPC 2.0 protocol over stdin/stdout
- 32 tool definitions across 11 domains
- McpServer with initialize/tools_list/tools_call handlers
- 21 unit tests

TUI cockpits (bin/fxt/src/tui/):
- Purple/cyan/dark navy theme from design spec
- 6 cockpit views: overview, training, trading, services, risk, data
- Crossterm event loop with key handling (1-6 switch, q quit, ? help)
- CockpitView trait for pluggable cockpit rendering

All 75 tests pass, 0 clippy warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 21:48:59 +01:00
jgrusewski
d1b9de3363 feat: unified FoxhuntClient with typed service accessors
Adds accessor methods for all 11 service clients (trading, ml, ml_training,
broker_gateway, trading_agent, monitoring, config, data_acquisition, risk,
health, config_service). All clients share a single gRPC channel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 21:38:05 +01:00
jgrusewski
724bd64429 feat: fxt 2.0 skeleton — new command tree with 15 command groups
Clean rewrite of the fxt CLI with unified gRPC client, JSON/human
output abstraction, and stub implementations for all 15 command groups:
auth, trade, train, tune, model, agent, backtest, broker, data,
service, cluster, risk, config, watch (TUI), mcp.

Deleted old fat-client commands, client modules, types, prelude, and
tests (-12,769 net lines). Fixed pre-existing clippy issues in auth
module (indexing_slicing in encryption.rs, manual_let_else in
token_manager.rs, str_to_string in build.rs).

60 tests passing (53 lib + 7 binary), 0 clippy warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 21:35:18 +01:00
jgrusewski
1421c46ed4 feat: absorb monitoring service into API Gateway
Port Prometheus scraping and training metrics RPCs directly into
api_gateway, eliminating the monitoring-service backend proxy.
MonitoringServiceProxy replaced with MonitoringServiceHandler that
queries Prometheus directly for training metrics, GPU stats, and
active job counts.

Changes:
- monitoring_proxy.rs -> monitoring_handler.rs with embedded PrometheusClient
- Remove MonitoringBackendConfig and setup_monitoring_proxy from server.rs
- main.rs reads PROMETHEUS_URL + MONITORING_STREAM_INTERVAL instead of
  MONITORING_SERVICE_URL
- Remove monitoring-service from backend health check list
- Monitoring is always available (no graceful degradation needed)
- Fix fxt build.rs compile_protos type mismatch
- All 9 ported unit tests + 0 clippy warnings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 21:05:27 +01:00
jgrusewski
c112d34fec refactor: point fxt build.rs at proto/ root, delete fat-client protos
fxt now compiles from the same service protos as all backend services.
Deleted 8 fat-client protos (3,286 lines) from bin/fxt/proto/.
Updated include_proto! macros to use new package names (trading, ml,
config instead of foxhunt.tli, foxhunt.ml, foxhunt.config).
Added risk, data_acquisition, and config_service proto modules.
Fixed duplicate include_proto in agent.rs to use crate::proto.

Existing command implementations will be rewritten to use new proto
types in Task 6.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:54:04 +01:00
jgrusewski
9501d581ad feat(fxt): add epoch financial metrics to train monitor output
Add print_financial_metrics() to the monitor command, displaying
per-model Sharpe ratio (color-coded green/yellow/red), win rate,
max drawdown, profit factor, total return, trade count, and
action distribution (BUY/SELL/HOLD percentages). Only shown when
sessions report non-zero financial data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 16:08:19 +01:00
jgrusewski
778adb7ce0 feat(fxt): render epoch financial metrics in watch TUI list + detail views
Add Sharpe/Win% columns to training list table, financial summary lines
(Sharpe, Sortino, Win Rate, Max DD, PF, Return, Avg, Trades) to the
detail overview, action distribution (BUY/SELL/HOLD %) to current metrics,
and four new sparklines (Sharpe, Win Rate, Max DD, Total Return) to the
Metrics sub-tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 16:06:00 +01:00
jgrusewski
a471c913d7 feat(proto): add epoch financial metrics + GetEpochHistory to monitoring.proto
Add 11 financial fields (sharpe, sortino, win_rate, max_drawdown,
profit_factor, total_return, avg_return, total_trades, action
distribution) to TrainingSession (fields 36-46), a new
GetEpochHistory RPC with request/response messages, and wire the
Prometheus metric mapping in the monitoring service with a
stub RPC handler for task 7.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 15:57:27 +01:00
jgrusewski
d04b6c7023 fix(fxt,services): remove mock fallbacks and add gRPC health checks
- trade_ml.rs: Replace 3 mock data fallbacks (submit, predictions,
  performance) with proper error propagation. Commands now fail
  honestly when the API Gateway is unreachable instead of silently
  returning fake data. Mark 3 integration tests as #[ignore].

- monitoring_service: Add tonic-health with set_serving for
  MonitoringServiceServer. Enables grpc_health_probe readiness checks.

- ml_training_service: Add tonic-health with set_serving for
  MlTrainingServiceServer. Wired into both TLS and non-TLS paths.

- data_acquisition_service: Add tonic-health with set_serving for
  DataAcquisitionServiceServer.

- ml/cuda_streams: Fix pre-existing unused variable clippy warning.

All 8 services now have standard gRPC health checking enabled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:14:51 +01:00
jgrusewski
afbc668dcd feat(fxt): enhance watch TUI with full training metrics and gRPC helpers
- Add connect_channel/connect_channel_lazy with TLS auto-detection
- Expand TrainingSession to 35+ proto fields (RL diagnostics, hyperopt,
  eval metrics, health counters, checkpoints)
- Add RL-specific rendering (entropy, action diversity, Q-values, rewards)
- Add hyperopt progress panel (trial/best objective tracking)
- Refactor all commands to use shared connect_channel helper
- Default API gateway URL to https://api.fxhnt.ai

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:38:58 +01:00
jgrusewski
72f092e0e5 fix(fxt): read JWT secret from config.toml for gateway auth
The fxt client was using a hardcoded dev fallback secret for JWT signing,
causing InvalidSignature errors against the API gateway. Now reads
jwt_secret from ~/.foxhunt/config.toml with fallback chain:
env var > config file > dev secret.

Also updates default api_gateway_url to https://api.fxhnt.ai.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 10:31:04 +01:00
jgrusewski
a5ca926af6 feat(fxt): wire all stub commands to real gRPC backends
- model list: calls MLTrainingService::ListAvailableModels
- model approve: calls MLTrainingService::ApproveModel
- model reject: calls MLTrainingService::RejectModel
- agent allocate-portfolio: replaces mock assets with GetSelectedAssets RPC
- auth login (non-interactive): real gRPC via LoginClient::login_with_credentials
- tune --watch: uncommented tune_stream module, wired into tune command

177 tests pass, 0 clippy warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 02:02:20 +01:00
jgrusewski
0a15058990 feat(fxt): implement fxt watch streaming dashboard
- streams.rs: gRPC stream manager with reconnect + exponential backoff
  (training metrics, order updates, risk alerts, system status)
- render.rs: ratatui renderer for 4 tabs (Training/Trading/Risk/System)
- event_loop.rs: tokio::select! loop over gRPC streams, crossterm keys, 200ms tick
- Wired Watch command into CLI (main.rs Commands enum + dispatch)
- 35 tests pass, 0 clippy warnings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 02:02:20 +01:00
jgrusewski
d4d070b70b feat(fxt): add dashboard state types with 5 tests
DashboardState with 4 tab substates (Training/Trading/Risk/System),
ring buffers for loss history and fills, scroll support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 02:02:20 +01:00
jgrusewski
e1bab1a587 feat(fxt): add ratatui/crossterm deps and ApproveModel/RejectModel proto RPCs
- ratatui 0.29, crossterm 0.28 (event-stream), tokio-stream to deps
- ApproveModel + RejectModel RPCs added to MLTrainingService
- 4 new proto messages for model promotion workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 02:02:20 +01:00
jgrusewski
6c7a7275de feat(fxt): add grad norm, RL diagnostics, and hyperopt trial detail to monitor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:09:56 +01:00
jgrusewski
6b67f6193a infra: expose monitoring service via monitor.fxhnt.ai Tailscale proxy
Add DNS record, nginx gRPC proxy block, network policy for Tailscale
ingress, and auto-detect fxhnt.ai in fxt monitor URL derivation.
Show GPU telemetry even when no training sessions are active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:56:40 +01:00
jgrusewski
1a62060dab fix(clippy): resolve all workspace clippy warnings
Fix pre-existing and new clippy issues across 5 files:
- service_auth.rs: .to_string() → .to_owned() on &str, backtick doc items
- streams.rs: backtick doc items, allow cognitive_complexity on reconnect_loop
- main.rs: .to_owned(), allow infinite_loop, drop must_use, rename shadow
- start.rs: eliminate shadow_reuse on endpoint binding
- enhanced_ml.rs: remove unnecessary f64 cast

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:06:25 +01:00
jgrusewski
06cf6bf39e feat(fxt): add 'fxt train monitor' subcommand with live TUI
Adds a new CLI subcommand that connects to the monitoring service via
gRPC to display live training metrics. Supports single-snapshot mode
(--once), model filtering (--model), and configurable streaming
interval. Renders per-model epoch/loss table, GPU telemetry, hyperopt
progress, and health counters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:41:54 +01:00
jgrusewski
36d291a8e0 fix(fxt): robust ibapi handshake retry and config test isolation
- ibapi handshake: retry once after 1s on first failure (IB Gateway
  needs time to release stale client_id slots after disconnection)
- test_load_nonexistent_config → test_load_config_succeeds: remove
  default-value assertions that fail when ~/.foxhunt/config.toml exists
  (defaults already tested by test_serde_defaults and test_default_config)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:52:48 +01:00
jgrusewski
032be46e90 fix(fxt): default broker gateway URL 50060 → 50056
Match the actual K8s broker-gateway service port discovered during
live validation of fxt broker check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:49:23 +01:00
jgrusewski
47cea06e86 fix(fxt): default broker check port 4002 → 4004 (socat)
The IB Gateway JVM uses non-blocking I/O on port 4002, which causes
EAGAIN errors with ibapi's blocking Client::connect(). The gnzsnz
image provides socat on port 4004 as a stable proxy that bridges
blocking clients to the non-blocking gateway socket.

Port 4004 is the correct client-facing port for paper mode (4003 for
live). The K8s readiness probe stays on 4002 since TCP probes work
fine with non-blocking sockets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:43:32 +01:00
jgrusewski
ea130bdb52 chore(fxt): suppress unused_crate_dependencies for ibapi
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:53:02 +01:00
jgrusewski
7dbecf2b64 feat(fxt): wire broker check subcommand into CLI
Add Broker variant to Commands enum with BrokerArgs (flatten),
route to execute_broker_command in match block (no JWT required),
exit(1) on check failure. Clone config.api_gateway_url to avoid
partial move. Add two CLI parsing tests for broker check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:49:43 +01:00
jgrusewski
33208c928c feat(fxt): add broker check command with config resolution and connectivity checks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:44:20 +01:00
jgrusewski
9afd985a34 feat(fxt): compile broker_gateway.proto for gRPC client stubs
Copy broker_gateway.proto from broker_gateway_service into fxt/proto/
and wire it into build.rs compile_protos + lib.rs proto module so the
CLI can call BrokerGatewayService RPCs (health check, account state,
session status).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:37:49 +01:00
jgrusewski
ec23919c97 feat(fxt): add BrokerConfig section to TliConfig
Adds IbkrConfig (host/port/client_id with defaults for paper trading)
and BrokerConfig (gateway_url + ibkr nested) to the TLI config file.
Both structs derive serde defaults so existing config files remain
backward-compatible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:36:35 +01:00
jgrusewski
9e42c9264a feat(fxt): add ibapi optional dep behind broker-check feature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:33:43 +01:00
jgrusewski
e2a0576ef5 docs: create/update README.md for all services, CLI, and testing crates
Create 3 missing service READMEs (api_gateway, data_acquisition_service,
trading_agent_service). Create bin/fxt/README.md. Create
testing/service-integration/README.md. Update existing service and testing
READMEs to standard template. Delete 4 subdirectory READMEs from
testing/integration/ and testing/e2e/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:50:38 +01:00
jgrusewski
4a1add5806 cleanup: delete 92 scattered .md files and .serena artifacts
Remove stale test reports, quick-start guides, benchmark analyses,
profiling reports, and tool artifacts from across the workspace.
Keeps only root README.md per crate/service.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 22:42:36 +01:00
jgrusewski
48316d6874 feat(infra): add api.fxhnt.ai DNS + gRPC reverse proxy for API Gateway
Add nginx server block for api.fxhnt.ai with grpc_pass to the
api-gateway ClusterIP service. Add Scaleway DNS A record via Terraform
module. Fix fxt gRPC client to enable TLS when connecting to https://
endpoints (tonic requires explicit ClientTlsConfig).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:41:55 +01:00
jgrusewski
46f84f6770 feat(hyperopt): wire hyperopt dispatch through fxt CLI and K8s dispatcher
Add --hyperopt, --trials, and --parallel flags to `fxt train start` so
users can dispatch PSO hyperparameter optimization jobs alongside
regular training. The mode=hyperopt tag propagates through the service
layer which selects the correct binary (hyperopt_baseline_rl for DQN/PPO,
hyperopt_baseline_supervised for all others) and builds hyperopt-specific
CLI arguments via a new extra_args field on TrainingJobParams.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:29:51 +01:00
jgrusewski
0f9d756caa feat: on-demand training dispatch via K8s Jobs with sidecar uploader
Extend ml_training_service to dispatch GPU training jobs as K8s batch/v1
Jobs, collect results via a Rust sidecar uploader, and support model
promotion with operator approval via fxt CLI.

- K8s dispatcher creates Jobs on gpu-training pool with native sidecar
- training_uploader crate: watches DONE/FAILED marker, uploads to S3,
  reports completion via ReportJobCompletion gRPC
- PromotionManager compares metrics, queues better models for approval
- 4 new proto RPCs: ReportJobCompletion, ListPendingPromotions,
  ApprovePromotion, RejectPromotion
- fxt commands: train start, model list/approve/reject
- Training binaries write DONE/FAILED markers + metrics.json
- Dockerfile, K8s job template, and CI pipeline updated
- StartTraining gracefully falls back to in-process when outside K8s
- 27 new tests (16 service + 11 promotion), 141 total service tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:43:17 +01:00
jgrusewski
e72e4db235 refactor: delete 22 dead examples, 4 CSVs, consolidate data to test_data/
- Delete 22 dead/placeholder/broken example files (-3,489 lines code)
- Delete 4 tracked CSV files (-1.1M lines, were accidentally committed)
- Move baseline training data default from data/cache/ to test_data/
- Update 5 unified binary defaults, gitignore, k8s upload comment, docs
- Consolidate all training data under test_data/futures-baseline/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 01:24:02 +01:00
jgrusewski
b84e14e175 fix(fxt): mark machine_id test as #[ignore] for container CI
test_machine_id_derivation reads /etc/machine-id which doesn't exist
in container environments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 14:35:56 +01:00