refactor: restructure repo — crates/, bin/, testing/ layout

Move 17 library crates into crates/, CLI binary into bin/fxt,
consolidate 10 test crates into testing/, split config crate
from deployment config files.

Root directory reduced from 38+ to ~17 directories.
All Cargo.toml paths and build.rs proto refs updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-02-25 11:18:20 +01:00
parent c821f2bec8
commit 9c3d741a08
1967 changed files with 140 additions and 139 deletions

View File

@@ -0,0 +1,53 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n symbol,\n from_regime,\n to_regime,\n event_timestamp,\n duration_bars,\n transition_probability\n FROM regime_transitions\n WHERE symbol = $1\n ORDER BY event_timestamp DESC\n LIMIT $2\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "symbol",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "from_regime",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "to_regime",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "event_timestamp",
"type_info": "Timestamptz"
},
{
"ordinal": 4,
"name": "duration_bars",
"type_info": "Int4"
},
{
"ordinal": 5,
"name": "transition_probability",
"type_info": "Float8"
}
],
"parameters": {
"Left": [
"Text",
"Int8"
]
},
"nullable": [
false,
false,
false,
false,
true,
true
]
},
"hash": "3309ef62ab76f6ceee2a9b4f83624cae1a14033cd02f8a71c6b5d840359f9f8c"
}

View File

@@ -0,0 +1,21 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO regime_transitions (\n symbol, from_regime, to_regime, event_timestamp,\n duration_bars, transition_probability,\n adx_at_transition, cusum_alert_triggered\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8)\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Text",
"Timestamptz",
"Int4",
"Float8",
"Float8",
"Bool"
]
},
"nullable": []
},
"hash": "413de58ab9d38726897a8e708e31e9f2a6bb0a7845b77a5c64b9d82b262d0da5"
}

View File

@@ -0,0 +1,21 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO regime_states (\n symbol, regime, confidence, event_timestamp,\n cusum_s_plus, cusum_s_minus, adx, stability\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8)\n ON CONFLICT (symbol, event_timestamp) DO UPDATE\n SET regime = EXCLUDED.regime,\n confidence = EXCLUDED.confidence,\n cusum_s_plus = EXCLUDED.cusum_s_plus,\n cusum_s_minus = EXCLUDED.cusum_s_minus,\n adx = EXCLUDED.adx,\n stability = EXCLUDED.stability\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Float8",
"Timestamptz",
"Float8",
"Float8",
"Float8",
"Float8"
]
},
"nullable": []
},
"hash": "747c3e5e6fed454e259f7046e2b1311cbc1b919596a71273fe98c8e9332b171c"
}

View File

@@ -0,0 +1,58 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n regime,\n confidence,\n event_timestamp,\n cusum_s_plus,\n cusum_s_minus,\n adx,\n stability\n FROM get_latest_regime($1)\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "regime",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "confidence",
"type_info": "Float8"
},
{
"ordinal": 2,
"name": "event_timestamp",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "cusum_s_plus",
"type_info": "Float8"
},
{
"ordinal": 4,
"name": "cusum_s_minus",
"type_info": "Float8"
},
{
"ordinal": 5,
"name": "adx",
"type_info": "Float8"
},
{
"ordinal": 6,
"name": "stability",
"type_info": "Float8"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
null,
null,
null,
null,
null,
null,
null
]
},
"hash": "7c243d0016edf93b29a7d874a1491021cde976fb09725f01d1bc079fd1d7ec2f"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO adaptive_strategy_metrics (\n symbol, regime, event_timestamp,\n position_multiplier, stop_loss_multiplier,\n regime_sharpe, risk_budget_utilization,\n total_trades, winning_trades, total_pnl\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)\n ON CONFLICT (symbol, event_timestamp, regime) DO UPDATE\n SET position_multiplier = EXCLUDED.position_multiplier,\n stop_loss_multiplier = EXCLUDED.stop_loss_multiplier,\n regime_sharpe = EXCLUDED.regime_sharpe,\n risk_budget_utilization = EXCLUDED.risk_budget_utilization,\n total_trades = adaptive_strategy_metrics.total_trades + EXCLUDED.total_trades,\n winning_trades = adaptive_strategy_metrics.winning_trades + EXCLUDED.winning_trades,\n total_pnl = adaptive_strategy_metrics.total_pnl + EXCLUDED.total_pnl\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Timestamptz",
"Float8",
"Float8",
"Float8",
"Float8",
"Int4",
"Int4",
"Int8"
]
},
"nullable": []
},
"hash": "843f54679fefdc2fac88d4a80823b096db1b7689e39b3e70c8818f15886236d1"
}

View File

@@ -0,0 +1,21 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO regime_transitions\n (symbol, event_timestamp, from_regime, to_regime, duration_bars, transition_probability, adx_at_transition, cusum_alert_triggered)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8)\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Timestamptz",
"Text",
"Text",
"Int4",
"Float8",
"Float8",
"Bool"
]
},
"nullable": []
},
"hash": "934895aaf38b9bd6b11eac14c5e22c49e0b443bedd4b5231dfdc55397f5e72db"
}

View File

@@ -0,0 +1,21 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO regime_states (symbol, regime, confidence, event_timestamp, cusum_s_plus, cusum_s_minus, adx, stability)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8)\n ON CONFLICT (symbol, event_timestamp) DO UPDATE\n SET regime = EXCLUDED.regime, confidence = EXCLUDED.confidence\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Float8",
"Timestamptz",
"Float8",
"Float8",
"Float8",
"Float8"
]
},
"nullable": []
},
"hash": "b64553624d98716d455e9573e49fdd1c3f23c9049d370ea508b511b109712bf3"
}

View File

@@ -0,0 +1,65 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n regime,\n total_trades,\n win_rate,\n avg_sharpe,\n avg_position_multiplier,\n avg_stop_loss_multiplier,\n total_pnl as \"total_pnl: rust_decimal::Decimal\",\n avg_risk_utilization\n FROM get_regime_performance($1, $2)\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "regime",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "total_trades",
"type_info": "Int8"
},
{
"ordinal": 2,
"name": "win_rate",
"type_info": "Float8"
},
{
"ordinal": 3,
"name": "avg_sharpe",
"type_info": "Float8"
},
{
"ordinal": 4,
"name": "avg_position_multiplier",
"type_info": "Float8"
},
{
"ordinal": 5,
"name": "avg_stop_loss_multiplier",
"type_info": "Float8"
},
{
"ordinal": 6,
"name": "total_pnl: rust_decimal::Decimal",
"type_info": "Numeric"
},
{
"ordinal": 7,
"name": "avg_risk_utilization",
"type_info": "Float8"
}
],
"parameters": {
"Left": [
"Text",
"Int4"
]
},
"nullable": [
null,
null,
null,
null,
null,
null,
null,
null
]
},
"hash": "c5faef5cf0dbb3ac6b065db50d101a0a723d167478cf50558b9f553d76645e11"
}