Files
Neo-ZQYY/docs/audit/changes
Neo 6df02f8efe docs(audit): F1-5b BE-3 + T3 测试回归覆盖 (W1)
补强 F1-5a runtime_context 落地后的测试覆盖,防止未来 PR 回归。
测试文件本地通过,因 .gitignore:71 不入仓(同 T1 / T2 / af02446 处理)。

BE-3 ai_run_logs runtime 写入回归(5 case,本地 PASS):
- apps/backend/tests/test_ai_run_logs_runtime.py
- 覆盖 AIRunLogService.create_log() 在 live / sandbox 模式下分别写入
  正确的 runtime_mode + sandbox_instance_id 字段
- 边界:prompt 截断、INSERT 失败 rollback、bind_to_session=True 调用

T3 dispatcher runtime 单测(5 case,本地 PASS):
- apps/backend/tests/test_dispatcher_runtime.py
- 覆盖 AIDispatcher._run_step 在 4 条路径(circuit_open / rate_limited
  / budget_exceeded / 正常)下都把 context["site_id"] 正确传给
  run_log_svc.create_log
- 防御目标:dispatcher 内部不该意外丢失 site_id,否则 sandbox 切换
  在 dispatcher 路径上失效

依赖 F1-5b A3(commit af02446)的 RuntimeContext 接口契约。
两份测试与 T2(test_admin_ai_batch_runtime,af02446 已 PASS)互补,
一起构成 F1-5a 落地后的回归守护网。

审计:
- docs/audit/changes/2026-05-05__wave1_f1_5b_be3_run_log_runtime_regression.md
- docs/audit/changes/2026-05-05__wave1_f1_5b_t3_dispatcher_runtime.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 19:17:19 +08:00
..