Files
X-Financial/document/development/2026-07-16/dev-logs/bugs/savings-backfill-migration-ancestry.md
caoxiaozhu 787bc3a481 feat(platform): close AI expense value loop
Add tenant-safe value, telemetry, connector, commercial, and production-readiness foundations.
2026-07-17 14:14:08 +08:00

10 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 修复记录
- 19:19修复商业计量迁移上线后标准调整 Savings 回填脚本因精确锁定旧版本而错误拒绝执行的问题。
- Git 提交检查:已执行 `git fetch --all --prune``HEAD..origin/main` 无新提交;本地相对 upstream ahead 17 个既有提交,依次为 `242d68c3``28b834ed``4940ebc4``ee88a36b``6bdf65bc``ae3f02c3``54754b55``211f85d9``5b246307``a662cfe6``5ed34c2b``11275e4b``1347366b``22669a90``a616b30c``653eda05``661990b2`;本次未合并、覆盖或改写共享工作树中的其他变更。
- 修改:`backfill_standard_adjustment_savings.py` 不再要求当前 revision 必须精确等于 `20260716_0015`,改为遍历 Alembic `down_revision` 祖先链,只有当前迁移确实包含 Savings 数据契约时才允许回填。
- 修改:`test_standard_adjustment_savings_backfill.py` 覆盖所需版本本身、后继商业迁移 `0016`、更旧版本和未迁移数据库四类边界。
- 操作:全部检查均在 `local-x-financial-linux` 容器内执行,未修改财务规则 XLSX 或历史开发文档。
- 验证Ruff 通过;标准调整 Savings 回填定向回归 `12 passed`
- 影响:数据库升级到 `0016` 及未来合法后继版本后仍可安全执行历史节省回填;更旧、未迁移或不包含目标契约的版本仍会 fail-closed。