reorg B10: market-review 基准面板 L5 并入 provider seam - #11
Merged
Merged
Conversation
market_review_prices 表 + 独立取数梯子删除;基准符号(SPX/US10Y/Gold/…)
现在和普通 ticker 一样走 clean_bars,由新的 DataService.get_close_panel
读取(缺口经 ensure_range 自愈,缺失符号一次性 kick + 单个 grace 窗口共享等待)。
- data_pipeline/read/_query.py: 新增 get_close_panel(symbols, start, end)
- data_pipeline/read/facade.py: DataService.get_close_panel 暴露
- data_pipeline/store/{db,repos}.py: 删 market_review_prices 建表 +
fetch_market_review_latest_dates / upsert_market_review_prices /
fetch_market_review_panel,留 B10 NOTE
- services/market_review/fetch.py: 只保留 5 分钟 L1 内存缓存,取数改走 DataService
- services/market/readiness.py: _augment_with_benchmarks —— market_review 模块
的 readiness plan 补上基准符号,POST / 预取整块面板
(data_pipeline.orchestrate 不能 import core,所以扩展放在 services 层)
- scripts/build_pages_site.py: 演示 fixture 改读 clean_bars
- docs: architecture_review §2 L5 行 resolved;plan §0/§4.1/§5.2/§6 台账/§10;
ADR 0011 Consequences;CLAUDE/CODEBUDDY/copilot 指针(§10 仅剩无风险利率 +
symbol 列两项)
tests: TestGetClosePanel(读 clean_bars / 共享 grace 窗口 / 单坏符号不拖垮面板);
test_market_readiness.py(基准扩展仅对 market_review 触发、ticker 即基准时不重复、
prepare_readiness 会 kick);test_market_review.py 改为 stub get_close_panel;
test_db_errors.py 断言 market_review_prices 不存在。
验证:pytest -m "not network" --ignore=tests/e2e exit 0;pytest tests/e2e exit 0;
vitest 199/16;ruff check + format clean;doc_guard clean;arch_metrics --check ok
(layer 0 / cycles 0 / god 0 / dead 0);audit_tags 16/16。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
什么
业务线重组的最后一个延期批次 B10:把
services/market_review/fetch.py的L1/L2/L3 取数梯子(ADR 0011 里标记的 L5 —— seam 外的第二条采集路径)并入
provider seam。
改动
market_review_prices专用表 + 独立的多 tickeryf.downloadclose 梯子clean_barsPOST /的 readiness plan 补上基准符号,daemon 线程预取整块面板services/market_review/fetch.py直接 importproviders+store.reposDataService.get_close_panel,仅保留 5 分钟 L1 内存缓存DataService.get_close_panel(symbols, start, end)(read/_query.py):逐符号经
needs_backfill/ 后台ensure_range自愈,缺失符号一次性 kick 后共享一个短 grace 窗口(不是每符号一个),再读
clean_bars的 close。market_review_prices建表 +fetch_market_review_latest_dates/upsert_market_review_prices/fetch_market_review_panel。services/market/readiness.py::_augment_with_benchmarks:data_pipeline.orchestrate不能 import
core,所以基准符号列表的展开放在 services 层。scripts/build_pages_site.py演示 fixture 改读clean_bars。文档
architecture_review.md§2 的 L5 watch-list 行标记 resolved;plan §0/§4.1/§5.2/§6台账 + §10;ADR 0011 Consequences 追加 landed 说明;
CLAUDE.md/CODEBUDDY.md/.github/copilot-instructions.md指针更新为「B1–B10 landed,§10 仅剩无风险利率全局设置 + ADR 0011 symbol 列两项」。
验证
pytest -m "not network" --ignore=tests/e2e→ exit 0pytest tests/e2e→ exit 0npx vitest run→ 199 passed / 16 filesruff check+ruff format --check→ cleanscripts/doc_guard.py→ cleanscripts/arch_metrics.py --check→ ok (layer 0 / cycles 0 / god 0 / dead 0)scripts/audit_tags.py→ 16 / 16新增测试:
TestGetClosePanel、tests/test_market_readiness.py;test_market_review.py改为 stubget_close_panel;test_db_errors.py断言market_review_prices不存在。🤖 Generated with Claude Code