|
| 1 | +# QSL Compatibility & Upgrade Checklist (Central Manifest Phase-1) |
| 2 | + |
| 3 | +This repository carries the first version of the QSL central compatibility manifest. |
| 4 | + |
| 5 | +## 文件结构 |
| 6 | + |
| 7 | +- `compat/bundles/*.toml` |
| 8 | + - 每个 bundle 用 Calendar Version 命名(当前:`2026.07.0`)。 |
| 9 | + - 记录 QSL 管控的固定内部仓库提交。 |
| 10 | +- `compat/repo-tiers.toml` |
| 11 | + - 记录仓库层级(`core/strategy-lib/pipeline/runtime/ops`)与升级 ring 规则。 |
| 12 | +- `qsl.toml` |
| 13 | + - 本仓库自身的 QSL 元信息:`tier`、`compat`/`bundle`、`upgrade_ring`。 |
| 14 | +- `scripts/check_qsl_compat.py` |
| 15 | + - 在任意仓库根目录运行,校验: |
| 16 | + - 禁止 `@main` |
| 17 | + - 禁止短 SHA |
| 18 | + - 禁止 `requirements.txt` / `constraints.txt`(未设置 `allow_legacy=true` 时) |
| 19 | + - 内部依赖 Ref 是否与 `compat/bundles/<bundle>.toml` 一致 |
| 20 | +- `scripts/render_qsl_dependency_graph.py` |
| 21 | + - 输出当前仓库的 QSL 依赖图(Markdown / Text)。 |
| 22 | + |
| 23 | +## 如何接入一个新仓库 |
| 24 | + |
| 25 | +1. 在仓库根目录新建 `qsl.toml`: |
| 26 | + |
| 27 | +```toml |
| 28 | +[qsl] |
| 29 | +bundle = "2026.07.0" # 选择要对齐的 central bundle |
| 30 | +compat = "2026.07.0" # 兼容检查入口(与 bundle 相同) |
| 31 | +tier = "ops/tooling" |
| 32 | +upgrade_ring = "ring_e" |
| 33 | +allow_legacy = false # 需要临时兼容时可先放开 |
| 34 | +``` |
| 35 | + |
| 36 | +2. 在 `pyproject.toml`/`uv.lock` 中用完整 SHA 固定 QuantStrategyLab 的内部 git 依赖。 |
| 37 | + |
| 38 | +3. 运行自检: |
| 39 | + |
| 40 | +```bash |
| 41 | +python scripts/check_qsl_compat.py --repo-root . --non-strict |
| 42 | +python scripts/render_qsl_dependency_graph.py --repo-root . --format md |
| 43 | +``` |
| 44 | + |
| 45 | +说明:默认脚本会输出错误并以非零退出码返回;`--non-strict` 仅用于本地快速预览。 |
| 46 | + |
| 47 | +## 当前中心兼容基线 |
| 48 | + |
| 49 | +- Bundle: `2026.07.0` |
| 50 | +- QPK: `0063af3b4a974650ea58a7d3f26dd1b94f65d3e8` |
| 51 | +- UsEquityStrategies: `46887bc3f5454d5b59623b1f5efb7c65912c6b8b` |
| 52 | +- HkEquityStrategies: `61993bf261aeccf64b5a75428b9405f4e1d1d682` |
| 53 | +- CnEquityStrategies: `ffbdf7303179ba6e7f9d3e28c21202f77e04762c` |
| 54 | +- CryptoStrategies: `8039ddddde7634ad3615496c9b79d2918996938c` |
| 55 | +- QuantStrategyPlugins: `6c10aef8989f52d82571e676092b14d315401989` |
| 56 | +- MarketSignalSources: `ea8771b6b65f356e7edc4a2b08cd621186726646` |
0 commit comments