2026-04-09.md 7.8 KB

2026-04-09

  • Continued implementation of dragon_v2_rc1_restructuring_proposal_cn.md after user asked to continue.
  • Validated new structured reason metadata integration in dragon_strategy.py:
  • post-run enrichment now appends reason_layer/reason_family/reason_code to events
  • and buy_reason_* / sell_reason_* metadata to trades while preserving legacy reason strings.
  • Ran compile check successfully:
  • py -3 -m py_compile dragon_strategy.py dragon_rc1_golden_baseline.py dragon_rule_catalog.py tests/test_rc1_golden_regression.py tests/test_reason_catalog_mapping.py
  • Regenerated golden baseline:
  • py -3 dragon_rc1_golden_baseline.py
  • refreshed manifest dragon_rc1_golden_manifest.json with new generated_at (2026-04-09T00:57:54) and core hashes:
  • events core sha256 8965d1b539a998d7d0aff04432aa2a47cf30ee40df013b9d8b7eb66a3d50a331
  • trades core sha256 1298be56b0898266b0b854d62a979c00c20b01629393c82bb8c804faf852cb97
  • summary remains stable at RC1 baseline:
  • trade_count 91, event_count 272, win_rate 52.75%, avg_return 3.42%.
  • Regenerated layer attribution:
  • py -3 dragon_rule_layer_attribution.py
  • dragon_rule_layer_attribution.md still reports no unknown reason mapping.
  • Ran tests successfully:
  • py -3 -m unittest discover -s tests -v
  • result: 3 tests passed (OK), covering golden regression and reason catalog mapping.
  • Ran end-to-end daily signal pipeline regression:
  • py -3 dragon_daily_signal_pipeline.py --as-of 2026-04-08
  • pipeline executed successfully after strategy output enrichment, confirming no immediate downstream break from the added reason metadata columns.
  • Hardened test portability:
  • tests/test_reason_catalog_mapping.py no longer depends on local dragon_historical_trade_details.csv.
  • It now uses _load_indicator_snapshot(...) + DragonRuleEngine.run(...) to derive release-window reasons directly from strategy output.
  • Re-ran tests after this change: all 3 tests still pass.
  • Added a next-stage optimization proposal for execution:
  • file: dragon_v2_rc1_optimization_proposal_cn.md
  • focus: phase-3+ plan with core/secondary/bridge execution split, reason-string decoupling, weak-family optimization in new branch, and stronger regression/reporting acceptance gates.
  • User requested to proceed in OpenSpec format.
  • Added openspec/ structure for dragon/v2:
  • openspec/config.yaml
  • change package openspec/changes/rc1-layered-governed-optimization/ with:
  • .openspec.yaml
  • proposal.md
  • design.md
  • tasks.md
  • specs/layered-rule-engine/spec.md
  • specs/structured-decision-state/spec.md
  • specs/weak-family-research-governance/spec.md
  • specs/golden-regression-governance/spec.md
  • Updated USER.md to persist preference: future optimization/governance推进 should use OpenSpec workflow.
  • User requested full uninterrupted execution ("全部执行完,再找我,中途不停"), and this round followed that mode.
  • Completed OpenSpec task execution for rc1-layered-governed-optimization:
  • added layered modules dragon_rule_engine_v2.py, dragon_rules_core.py, dragon_rules_secondary.py, dragon_rules_bridge.py.
  • dragon_strategy.py kept as compatibility facade and migrated high-risk control paths to structured fields:
  • entry_reason_layer/family/code, last_real_sell_reason_layer/family/code
  • bridge flags for predictive and pending deep-oversold chains.
  • Added compatibility and path-regression tests:
  • tests/test_no_silent_path_change.py
  • tests/test_bridge_chain_regression.py
  • tests/test_deep_oversold_pending_paths.py
  • Full test suite now: 8 tests passed.
  • Added layered attribution/report artifacts:
  • dragon_layered_pnl_attribution.py
  • dragon_layered_pnl_attribution.csv
  • dragon_layered_family_pnl_attribution.csv
  • dragon_layered_entry_pnl_attribution.csv
  • dragon_layered_exit_pnl_attribution.csv
  • dragon_layered_pnl_attribution.md
  • Added migration audit note:
  • dragon_migration_audit.md
  • Executed weak-family experiment pack:
  • created branch alpha_next_weak_family_cleanup
  • added dragon_weak_family_experiments.py
  • generated:
  • dragon_weak_family_experiment_summary.csv
  • dragon_weak_family_trade_diff.csv
  • dragon_weak_family_execution_stress.csv
  • dragon_weak_family_experiment_config_snapshot.json
  • dragon_weak_family_experiment.md
  • Added acceptance report:
  • openspec/changes/rc1-layered-governed-optimization/acceptance-summary.md
  • Updated OpenSpec task status to fully checked in:
  • openspec/changes/rc1-layered-governed-optimization/tasks.md
  • Continued OpenSpec推进 with a new change pack:
  • openspec/changes/predictive-deepoversold-physical-isolation/
  • Added proposal/design/tasks/specs plus acceptance summary for this change.
  • Implemented physical isolation modules:
  • dragon_bridge_predictive_break.py
  • dragon_deep_oversold_classifier.py
  • dragon_deep_oversold_confirmation.py
  • Replaced predictive/deep-oversold inline predicates in dragon_strategy.py with module calls (compatibility path preserved).
  • Added module-level tests:
  • tests/test_predictive_bridge_module.py
  • tests/test_deep_oversold_modules.py
  • Validation completed:
  • golden baseline unchanged (91 trades, core hashes unchanged),
  • layer attribution remains no unknown reason mapping,
  • full test suite now 14 tests passed,
  • daily signal pipeline smoke (--as-of 2026-04-08) passed.
  • Continued OpenSpec execution with a third change pack:
  • openspec/changes/execution-decoupling-rollout-governance/
  • Added proposal/design/tasks/spec docs and acceptance summary for this change.
  • Implemented execution-level decoupling:
  • new module dragon_execution_runtime.py
  • dragon_strategy.py now delegates run(...) compatibility loop to the runtime module.
  • Implemented rollout-governance hardening:
  • new module dragon_rollout_governance.py
  • new checker dragon_rollout_governance_check.py
  • forward pipeline now auto-runs checker:
  • dragon_forward_observation_pipeline.py calls rollout checker before HTML refresh.
  • rollout checker now publishes explicit operational decision artifacts each run.
  • New governance artifacts now generated:
  • dragon_rollout_state.json
  • dragon_rollout_governance_snapshot.csv
  • dragon_rollout_governance_report.md
  • dragon_rollout_rollback_runbook.md
  • Added rollout governance tests:
  • tests/test_rollout_governance.py
  • Validation reruns after this wave:
  • py -3 -m unittest discover -s tests -v -> 17 tests passed.
  • py -3 dragon_rc1_golden_baseline.py -> core hashes unchanged.
  • py -3 dragon_daily_signal_pipeline.py -> passed.
  • py -3 dragon_forward_observation_pipeline.py -> passed.
  • latest rollout decision snapshot after validation:
  • decision FORWARD_OK
  • active branch alpha_first_glued_refined_hot_cap
  • fallback branch alpha_first_selective_veto
  • Improved one-click tracking entry:
  • upgraded update_dragon_reports.ps1 to print latest bar date, rollout decision, active/fallback branch, and gate counts after each run.
  • added optional switches:
  • -StrictGate (non-FORWARD_OK exits with code 2)
  • -OpenReport (opens dragon_reports_index.html after run).
  • Updated dragon/data_fetcher_v2.py for T-day freshness + cache writeback behavior:
  • fetch_index_data_v2(...) now forces refresh when end_date covers today (T日) instead of reusing stale in-memory cache.
  • fetch_index_data_with_latest_snapshot_v2(...) now writes merged latest-snapshot data back only if the matching cache key already exists.
  • If cache key does not exist, writeback is skipped by design (有则回写,无则跳过).
  • Added regression tests:
  • tests/test_data_fetcher_tday_cache.py
  • covers: non-T-day cache hit, T-day forced refresh, conditional cache writeback.
  • Validation after change:
  • py -3 -m unittest discover -s tests -v passed (20 tests).
  • py -3 dragon_daily_signal_pipeline.py smoke run passed.