add-real-data-regime-input.proposal.mddesign.mdspecs/regime-market-data-contract/spec.mdspecs/point-in-time-breadth-merge/spec.mdspecs/pipeline-data-quality-gate/spec.mdtasks.mddata/io.py with centralized validation, point-in-time sidecar merge, data quality report, and strict/non-strict gate evaluation.data_quality defaults in config/regime.yaml.data_quality_summary.json output into both pipelines/run_demo.py and pipelines/frozen_hypothesis_validation.py.--sidecar-csv, --strict-data, --min-coverage.tests/test_data_io.py, tests/test_pipeline_data_quality_gate.py.add-real-data-regime-input.pytest, PyYAML.py -m pytest -q tests/test_data_io.py tests/test_pipeline_data_quality_gate.py tests/test_pipeline_demo.py tests/test_policy.py tests/test_utility.py -> 13 passed.py pipelines/run_demo.py --output-dir outputs/demo_quality_checkpy pipelines/frozen_hypothesis_validation.py --output-dir outputs/frozen_validation_quality_checkdata_quality_summary.json.add-real-data-regime-input (synced specs).strengthen-frozen-hypothesis-walkforward.backtest/frozen_walkforward.py with:
pipelines/frozen_hypothesis_validation.py to use the new module.config/regime.yaml.tests/test_frozen_walkforward.pytests/test_frozen_validation_pipeline.pypy -m pytest -q tests/test_frozen_walkforward.py tests/test_frozen_validation_pipeline.py tests/test_pipeline_data_quality_gate.py tests/test_data_io.py tests/test_pipeline_demo.py tests/test_policy.py tests/test_utility.py -> 18 passed.py pipelines/run_demo.py --output-dir outputs/demo_quality_check_v2 passedpy pipelines/frozen_hypothesis_validation.py --output-dir outputs/frozen_validation_quality_check_v2 passedstrengthen-frozen-hypothesis-walkforward (synced specs).add-event-anchored-diagnostics (proposal/design/specs/tasks + implementation + archive).backtest/events.py now supports transition event log generation and taxonomy labels:crash_onsetfalse_reboundtrue_repaircrowded_unwindstate_transitionpipelines/run_demo.py now writes event_log.csv in addition to event_summary.csv.tests/test_event_diagnostics.pytests/test_pipeline_data_quality_gate.py to validate event artifact output.py -m pytest -q tests -> 21 passed.py pipelines/run_demo.py --output-dir outputs/demo_event_diag_check passedpy pipelines/frozen_hypothesis_validation.py --output-dir outputs/frozen_validation_event_diag_check passedadd-event-anchored-diagnostics (synced new specs to main).enhance-execution-layer-constraints:
backtest/engine.py.tracking_difference, tracking_error_20.tracking_diff_mean, tracking_diff_abs_mean, tracking_error_20_p95.config/regime.yaml.tests/test_execution_constraints.py.extend-breadth-concentration-features:
top1_contribution_5, top10_contribution_5, sector_concentration_20.tests/test_breadth_concentration_features.py.py -m pytest -q tests -> 25 passed.py pipelines/run_demo.py --output-dir outputs/demo_breadth_ext_check passedpy pipelines/frozen_hypothesis_validation.py --output-dir outputs/frozen_validation_breadth_ext_check passedchinext50_regime_build_handoff_2026-04-08.md; re-read with UTF-8 to avoid previous terminal mojibake and keep it as baseline guidance.build-real-data-pit-dataset:
data/pit_builder.py (ordered sidecar merge + strict/non-strict quality evaluation + source metadata summary).pipelines/build_pit_dataset.py and exported API from data/__init__.py.tests/test_pit_builder_pipeline.py:pit_quality_summary.json and blocks PIT outputpy -m pytest -q tests -> 29 passed.py pipelines/build_pit_dataset.py --market-csv outputs/pit_smoke/market.csv --sidecar-csv outputs/pit_smoke/sidecar.csv --output-path outputs/pit_smoke/chinext50_pit.csv passedoutputs/pit_smoke/chinext50_pit.csv and outputs/pit_smoke/pit_quality_summary.json.openspec.cmd instructions apply --change \"build-real-data-pit-dataset\" --json -> state: all_done (9/9 complete)openspec.cmd archive build-real-data-pit-dataset --yes completedopenspec/changes/archive/2026-04-09-build-real-data-pit-dataset/openspec/specs/pit-dataset-construction/spec.md, openspec/specs/pit-build-artifacts/spec.mdrequire-real-pit-input:
data/io.py: FULL_PIT_REQUIRED_COLUMNS, validate_full_pit_data_contract, load_full_pit_data.--pit-csv, alias --data-csv) and no longer fall back to synthetic data.openspec/specs/real-pit-runtime-input/spec.md.tiered-data-quality-gate:
evaluate_data_quality_gate with blocking_columns and per-breach severity (error/warning).run_demo, frozen_hypothesis_validation, build_pit_dataset, and PIT builder.data_quality.blocking_columns defaults in config/regime.yaml.openspec/specs/pipeline-data-quality-gate/spec.mdopenspec/specs/tiered-quality-severity/spec.mdadd-real-walkforward-report:
pipelines/real_walkforward_report.py.data_quality_summary.jsonfrozen_validation_board.csvreal_walkforward_summary.jsonreal_walkforward_report.mdtests/test_real_walkforward_report_pipeline.py.openspec/specs/real-walkforward-report/spec.md.add-execution-constraint-calibration:
pipelines/calibrate_execution_constraints.py.extreme_day_cost_multiplier, gap_slippage_factor) and emits:execution_calibration_grid.csvexecution_calibration_recommendation.jsontests/test_execution_calibration_pipeline.py.openspec/specs/execution-constraint-calibration/spec.md.py -m pytest -q tests -> 38 passed.openspec.cmd validate --specs --strict -> 18 passed.openspec.cmd list --json -> no active changes.add-real-data-ingestion-pipeline:
data/ingestion.py with:csv, akshare)merge_incremental_by_date, write_incremental_dataset)raw + staging)build_pit_datasetpipelines/ingest_real_data.py.tests/test_ingestion_pipeline.py:py -m pytest -q tests/test_ingestion_pipeline.py -> 3 passed.py -m pytest -q tests -> 41 passed.openspec.cmd instructions apply --change \"add-real-data-ingestion-pipeline\" --json -> state: all_done (10/10)openspec.cmd archive add-real-data-ingestion-pipeline --yes completedopenspec/specs/real-data-ingestion/spec.mdopenspec.cmd validate --specs --strict -> 19 passed.openspec.cmd list --json -> no active changes.add-mairui-fallback-ingestion:
data/ingestion.py:mairui provider modeakshare mode when Akshare fetch failspipelines/ingest_real_data.py with:--mairui-licence--mairui-market-code, --mairui-market-kind--mairui-hs300-code, --mairui-star50-code, --mairui-csi1000-code--mairui-breadth-url, --mairui-breadth-map-jsontest_ingest_akshare_with_mairui_fallback_when_akshare_missing in tests/test_ingestion_pipeline.py.py -m pytest -q tests/test_ingestion_pipeline.py -> 4 passed.py -m pytest -q tests -> 42 passed.openspec.cmd validate --specs --strict -> 20 passed.openspec.cmd list --json -> no active changes.pipelines/ingest_real_data.py with provider mairui against real API and generated:outputs/ingestion_mairui_smoke/pit/chinext50_pit.csvoutputs/ingestion_mairui_smoke/pit/pit_quality_summary.jsonoutputs/ingestion_mairui_smoke/ingestion_manifest.jsonoutputs/system_e2e_20260409_strict/ingestion/pit/chinext50_pit.csv):
1) pipelines/ingest_real_data.py (provider=akshare, Mairui fallback enabled, strict mode)
2) pipelines/run_demo.py --strict-data
3) pipelines/frozen_hypothesis_validation.py --strict-data
4) pipelines/real_walkforward_report.py --strict-data
5) pipelines/calibrate_execution_constraints.py --strict-datastart_date=2018-01-01 failed due star50_close coverage breach; reran with start_date=2020-01-01 (valid history coverage window) and strict chain succeeded.2020-01-02 to 2026-04-09), quality passed with 0 breaches.py -m pytest -q tests -> 42 passed.deliverables/gpt_pro_review_bundle_2026-04-09/deliverables/gpt_pro_review_bundle_2026-04-09.zipconfig, data, features, model, backtest, pipelines, tests, openspec/specs)2026-04-09-*)outputs/system_e2e_20260409_strict/CONTEXT_FOR_GPT_PRO.md and QUESTIONS_FOR_GPT_PRO.mdchinext50_regime_review_2026-04-09.md, analyze the review, and provide an improvement plan.breadth_score non-null ratio = 0.0crowding_score non-null ratio = 0.0down_hazard / repair_hazard / rebound_hazard collapse to constant 0.5chop / trend / risk_offbaseline and pro_risk exposure paths are identicalchinext50_blocker_checklist_for_codex.md as the latest GPT Pro blocker checklist and required strict B1 -> B6 execution order under OpenSpec flow, with per-blocker file/test/metric reporting and no threshold/policy tuning before B1-B5 completion.fix-regime-integrity-blockers with all 18/18 tasks done.model/scores.pytests/test_scores_integrity.pybreadth_score non-null ratio 0.9611crowding_score non-null ratio 0.92160.5warmup and invalid-after-warmup fail-fast in model/state_machine.pyfillna(0) swallowing in model/policy.py119, all zero exposure with veto_reason=warmupfeatures/quality.pyrun_demo and run_strategy_bundleconcentration_spread_5 with unique_non_null_count=1, dominant_value_ratio=1.00.10 ladder836 rows (55.1%) between baseline and pro_risk5 windows / 5 processed / 0 skippedoutputs/calibration_b6_non_strict/py -m pytest -q tests -> 59 passedopenspec.cmd validate --specs --strict -> 20 passedopenspec.cmd instructions apply --change "fix-regime-integrity-blockers" --json -> state: all_donederive-real-breadth-sidecar (proposal/design/specs/tasks implemented, archived).data/breadth_builder.py with:
--derive-breadth, --breadth-index-symbol, --breadth-min-active-constituents, --breadth-max-constituentsbreadth_source, breadth_derivation_path, breadth_integrity_pathtests/test_breadth_builder.pytests/test_ingestion_pipeline.py for derived-breadth path and strict placeholder blocking.py -m pytest -q tests/test_breadth_builder.py tests/test_ingestion_pipeline.py -> 8 passedpy -m pytest -q tests -> 63 passedopenspec.cmd validate --specs --strict -> 24 passedoutputs/ingestion_derived_smoke_20260409_v8) correctly failed on breadth integrity gate (low-information columns) rather than placeholder spread collapse.outputs/ingestion_derived_smoke_20260409_v9) completed and produced derivation/integrity artifacts.1 -> 22~4.34e-19 -> 0.0124继续.outputs/ingestion_derived_smoke_20260409_v12 and found a bug:
cache.hit_count=0, cache.miss_count=12.2020-01-01 start while first trade date is 2020-01-02).data/breadth_builder.py:
CACHE_BOUNDARY_TOLERANCE_DAYS=10._history_covers_range now allows small start/end boundary gaps and still rejects truly out-of-range cache panels.tests/test_breadth_builder.py:
test_derive_breadth_sidecar_cache_handles_non_trading_boundaries.py -m pytest -q tests/test_breadth_builder.py -> 5 passedpy -m pytest -q tests/test_ingestion_pipeline.py -> 6 passedpy -m pytest -q tests -> 66 passedopenspec.cmd validate --specs --strict -> 26 passedv12 command rerun):
hit_count: 0 -> 12miss_count: 12 -> 0{\"akshare\":12} -> {\"cache\":12}breadth_integrity_summary.json remains passed=true, blocking=false, PIT rows 1517.outputs/system_e2e_derived_v12_cachefix/demo/metrics_summary.jsonoutputs/system_e2e_derived_v12_cachefix/frozen/frozen_validation_summary.jsonoutputs/system_e2e_derived_v12_cachefix/report/real_walkforward_summary.jsonoutputs/system_e2e_derived_v12_cachefix/calibration/execution_calibration_recommendation.jsonannual_return=0.034844, sharpe=0.308062, max_drawdown=0.263973, drawdown_improvement_ratio=0.561139, utility_total_score=-0.178361window_count=5, processed=5, skipped=0, positive_window_ratio=0.4, selected_candidate_distribution={\"pro_risk\":4,\"baseline\":1}drawdown_ratio_vs_baseline=0.438861, utility_delta_vs_baseline=-0.213111 (annual_return_delta_vs_baseline is null in current artifact)extreme_day_cost_multiplier=1.0, gap_slippage_factor=0.0, calibration_score=-0.185203.harden-derived-breadth-production and completed proposal/design/specs/tasks for:
data/breadth_builder.py:akshare retries + optional Mairui fallback)metadata_provider_by_symbol, metadata_provider_counts, metadata_errors)_meta_cache.json) with meta_cache.hit/miss summary metricspipelines/real_walkforward_report.py:annual_return_delta_vs_baselinemax_drawdown_delta_vs_baselinetests/test_breadth_builder.pytests/test_real_walkforward_report_pipeline.pypy -m pytest -q tests/test_breadth_builder.py tests/test_real_walkforward_report_pipeline.py tests/test_ingestion_pipeline.py -> 15 passedpy -m pytest -q tests -> 68 passedopenspec.cmd validate --specs --strict -> 26 passedoutputs/ingestion_derived_full50_20260409_v2/row_count=1517, breadth integrity passed=true, blocking=falsehit=47, miss=3hit=50, miss=01199.9s (first run) to ~26.9s (second rerun)industry_unknown_ratio=1.0, sector_concentration_mode=weight_hhi_proxy)deliverables/gpt_pro_blockers_harden_derived_breadth_2026-04-09.mdRemoteDisconnectedHTTP 429 Too Many Requestsoutputs/system_e2e_derived_full50_v2/annual_return=0.067253sharpe=0.519444max_drawdown=0.287127utility_total_score=-0.110408openspec.cmd instructions apply --change harden-derived-breadth-production --json -> state: all_done (10/10)openspec.cmd archive harden-derived-breadth-production --yes completedopenspec/changes/archive/2026-04-09-harden-derived-breadth-production/openspec/specs/constituent-derived-breadth/spec.md (updated)openspec/specs/real-walkforward-report/spec.md (updated)openspec/specs/implementation-issue-log/spec.md (new)openspec.cmd validate --specs --strict -> 27 passedopenspec.cmd list --json -> no active changes.deliverables/gpt_pro_bundle_harden_derived_2026-04-09/deliverables/gpt_pro_bundle_harden_derived_2026-04-09/QUESTIONS_FOR_GPT_PRO.mddeliverables/gpt_pro_bundle_harden_derived_2026-04-09.zip (includes code changes, specs, archived change artifacts, blocker log, and key output summaries).