记录人工零仓位再投修复的Linux验收

This commit is contained in:
boris
2026-09-15 00:36:09 +08:00
parent 818552bc96
commit 4c6147e2ee
4 changed files with 178 additions and 1 deletions
@@ -0,0 +1,40 @@
{
"source": "/srv/fidc/programs/runtime-snapshots/zero-reinvestment-20260915-Yovt6m",
"build": "/srv/fidc/canonical/build/zero-reinvestment-20260915-Yovt6m",
"commits": {
"fidc-backtest-engine": "818552bc969e0ea40081f0770c1d97db574a1981",
"fidc-backtest-service": "234d85bdb8ed12b552ba8e9eff47fddc5e683acc",
"fidc-trading-platform": "d7d492541e60eb16e58dbff74b664b8ac85f6ccf"
},
"source_unchanged": true,
"results": [
{
"repository": "fidc-backtest-engine",
"exit_code": 0,
"elapsed_seconds": 56.008,
"passed": 919,
"failed": 0,
"ignored": 9,
"log_sha256": "87a4daa4db1c0f735399ce243feff8e514e5f75f72b0dbfdb69da0c21d02f2b4"
},
{
"repository": "fidc-trading-platform",
"exit_code": 0,
"elapsed_seconds": 90.029,
"passed": 625,
"failed": 0,
"ignored": 63,
"log_sha256": "e7f15eb7463f1cc33b7122020549af082d2070ad38392d0918c9c7309a68cc26"
},
{
"repository": "fidc-backtest-service",
"exit_code": 0,
"elapsed_seconds": 112.014,
"passed": 594,
"failed": 0,
"ignored": 16,
"log_sha256": "4faa52e9a87056c192341622d0273942f3daf963cd75a381ad913c76d47aed29"
}
],
"available_bytes": 77131395072
}
@@ -0,0 +1,76 @@
{
"date": "2026-09-15",
"baseline_engine": "534ab42906c7e7a4e253b7791cc143dec894a7f2",
"candidate_engine": "818552bc969e0ea40081f0770c1d97db574a1981",
"reproduced": {
"manual_zero_effective_before_payment": true,
"original_position_cleared": true,
"unexpected_accounting_allocation": {
"symbol": "000001.SZ",
"quantity": 100,
"price": 8.95
},
"original_gross_output": 894.9999999999999,
"actual_posted_amount": 895
},
"verified": {
"global_set_and_scale_zero_leave_cash": true,
"zero_or_excluded_manual_member_leaves_cash": true,
"same_instant_uses_sequence": true,
"input_array_order_does_not_change_result": true,
"future_settings_are_not_backdated": true,
"restore_does_not_mean_forced_full_exposure": true,
"legacy_day_granularity_preserved": true,
"normal_settlement_and_late_replay_share_control": true,
"actual_manual_fills_and_cash_entitlements_not_erased": true,
"invalid_cash_is_rejected_atomically": true,
"unused_reinvestment_reference_not_read_under_zero": true,
"no_control_keeps_legacy_price_quantity_and_fees": true
},
"exact_outcomes": {
"cleared_with_zero": {
"cash": 49998,
"quantity": 0
},
"cleared_without_zero": {
"cash": 49103,
"quantity": 100,
"price": 8.95,
"fee": 0,
"gross": 895
},
"actual_extra_buy_timely_and_late": {
"cash": 41047,
"quantity": 1000,
"corporate_cash_adjustment": 1050,
"optional_allocations": 0
}
},
"local_tests": {
"core": {
"passed": 919,
"ignored": 9
},
"trading": {
"passed": 625,
"ignored": 63
},
"runner": {
"passed": 463,
"ignored": 9
},
"api": {
"passed": 129,
"ignored": 7
}
},
"new_test_functions": 6,
"production_runtime_modified": false,
"production_order_or_cancel_requests": 0,
"limits": [
"isolated replay not actual Source/Runner acceptance",
"does not evaluate arbitrary strategy expressions at settlement",
"Source runtime freeze unchanged",
"no new production UI or broker validation"
]
}
@@ -0,0 +1,53 @@
{
"observed_at": "2026-09-14T16:34:44.320112+00:00",
"status": "tested_not_deployed",
"runtime_services": [
{
"service": "omniquant-highmem177.service",
"pid": 987464,
"state": "active"
},
{
"service": "fidc-backtest-service-highmem177.service",
"pid": 4108679,
"state": "active",
"exe_sha256": "5933b7423c6722e5fe644a604c915a27ceb89900f690b092d1689bfe0fe389b7"
},
{
"service": "fidc-paper-trading-highmem177.service",
"pid": 3765829,
"state": "active",
"exe_sha256": "3ebd7ce815e325ff0bb38632ef5b5e5cd5aff7a4e0601ba0229feb3201cdefe3"
},
{
"service": "fidc-live-trading-highmem177.service",
"pid": 3765783,
"state": "active",
"exe_sha256": "1f4b2d697accdbb76d89cd7cb9c3ae4dad942d86e3dde2e7d211eee5879b9144"
},
{
"service": "fidc-strategy-runtime-highmem177.service",
"pid": 3765705,
"state": "active",
"exe_sha256": "5a160ba9588f0ba9275f7d33152667be176cece310fc3026d4c043d897d44b4c"
},
{
"service": "fidc-trading-control-highmem177.service",
"pid": 3765532,
"state": "active",
"exe_sha256": "9feade5eed04007595f6ef88e076a3f501631b06cb6dc9d9b6d7f5be379b0a20"
}
],
"source_runtime_commit": "d5b682c6d09704ff23d725a8dd8b155db3eb6967",
"source_runtime_tracked_clean": true,
"engine_development_checkout": "818552bc969e0ea40081f0770c1d97db574a1981",
"preserved_service_development_checkout": "5991e7733d9e2a770f740e971924b12cc5f7d29d",
"immutable_source_file_count": 989,
"source_snapshot_manifest_sha256": "9ffdc1bc86e1b4b085caa694e921fc230ce0f09c57d34254058ae28e631d5bb3",
"test_scope": "fidc-zero-reinvestment-check-20260915-Yovt6m.scope",
"test_cpu_quota_percent": 400,
"test_memory_max_gib": 12,
"source_runtime_modified": false,
"production_order_or_cancel_requests_by_this_verification": 0,
"production_task_configuration_writes_by_this_verification": 0
}
+9 -1
View File
@@ -24,8 +24,16 @@ ALV `position_model.py::_handle_dividend_payable` 与FIDC现有再投都是参
## 验证和边界 ## 验证和边界
新增六项专项:有效0%、无控制的原模型、时间/序号/旧日级/恢复组合、逐股0和排除、迟到权益重放、无用价格不查询且坏现金仍原子失败。清仓0%样例最终现金49998、持仓0;没有0%仍100股、8.95、零费。额外实际买入迟到的样例,不掩盖真实1000股持仓,及时/迟到最终现金都为41047,权益现金校正1050,无可选再投。 新增六项专项:有效0%、无控制的原模型、时间/序号/旧日级/恢复组合、逐股0和排除、迟到权益重放、显式0%不读取无用的再投价格且坏现金仍原子失败。清仓0%样例最终现金49998、持仓0;没有0%仍100股、8.95、零费。额外实际买入迟到的样例,不掩盖真实1000股持仓,及时/迟到最终现金都为41047,权益现金校正1050,无可选再投。
本机Core919、Trading625、Runner463/API129全量通过,原9/63/16项ignore不计。没有修改UI、在线配置、账户、通知或交易路由;没有进行新的私有PG、实际Source/Runner、生产页面或券商委托验收。本修复针对经审计人工控制,不提前执行策略表达式来猜测其意图。 本机Core919、Trading625、Runner463/API129全量通过,原9/63/16项ignore不计。没有修改UI、在线配置、账户、通知或交易路由;没有进行新的私有PG、实际Source/Runner、生产页面或券商委托验收。本修复针对经审计人工控制,不提前执行策略表达式来猜测其意图。
Source d5明确冻结保持。仍需完成正式换股字段/范围闭包、在线转换事实及重建、旧目标和活动单边界、其余生命周期/ETF矩阵与真实Source/Runner联合验收。Linux用新快照独立验证,不复用上一轮收据;未建release/tag或重启生产。 Source d5明确冻结保持。仍需完成正式换股字段/范围闭包、在线转换事实及重建、旧目标和活动单边界、其余生命周期/ETF矩阵与真实Source/Runner联合验收。Linux用新快照独立验证,不复用上一轮收据;未建release/tag或重启生产。
## Linux配套验收
功能提交 `818552bc969e0ea40081f0770c1d97db574a1981` 已推送并核对,177引擎开发树已快进至此,Service并行5991e77保留。只读快照 `/srv/fidc/programs/runtime-snapshots/zero-reinvestment-20260915-Yovt6m` 含989文件,独立同名build根;4CPU/12GiB、boris执行、1GiB保护线不改。源码manifest SHA `9ffdc1bc86e1b4b085caa694e921fc230ce0f09c57d34254058ae28e631d5bb3`
Linux Core919、Trading625、Runner/API594共2138项全过,原9/63/16项ignore不计,源码前后不变。结束时可用77131395072字节,scope已inactive,不重复本批或覆盖前阶段收据。证据见 `docs/evidence/manual-zero-reinvestment-20260915/{local-tests,linux-tests,runtime}.json`
2026-09-15 00:34 CST逐服务比较,现有UI/五后端PID及后端实际SHA与上一轮相同,Source d5且tracked clean。未构建release、未建tag、未重启生产或修改任务/账户/路由/通知,没有实际委托/撤单;源码同步不是运行版本发布。