|
|
a61c329496
|
refactor: split precheck_core and migrate commands to commands/
- Split 900-line precheck_core.py into 9 focused modules:
precheck_constants, time_utils, data_utils, state_manager,
market_data, candidate_scoring, snapshot_builder,
adaptive_profile, trigger_analyzer
- Remove dead auto_trader command and module
- Migrate 7 root-level command modules into commands/:
check_api, doctor, external_gate, init_user_state,
market_probe, paths, rotate_external_gate_log
- Keep thin backward-compatible facades in root package
- Update cli.py MODULE_MAP to route through commands/
- Verified compileall and smoke tests for all key commands
|
2026-04-15 21:29:18 +08:00 |
|
|
|
f69facde0c
|
refactor(smart_executor): split monolithic executor into clean service modules
- Extract 7 focused services from smart_executor.py:
- trade_common: constants, timezone, logging, dry-run state
- file_utils: file locking + atomic JSON helpers
- smart_executor_parser: argparse + legacy argument compatibility
- execution_state: decision deduplication (executions.json)
- portfolio_service: positions.json + exchange reconciliation
- exchange_service: ccxt wrapper, balances, order prep
- trade_execution: buy/sell/rebalance/hold actions
- Turn smart_executor.py into a thin backward-compatible facade
- Fix critical dry-run bug: module-level DRY_RUN copy caused real orders
in dry-run mode; replace with mutable dict + is_dry_run() function
- Fix dry-run polluting positions.json: skip save_positions() when dry-run
- Fix rebalance dry-run budget: use sell_order cost instead of real balance
- Add full legacy CLI compatibility for old --decision HOLD --dry-run style
v0.1.1
|
2026-04-15 18:39:08 +08:00 |
|