Files
SuperBizAgent-java/devflow/projects/2026-07-21-single-react-harness-run-context/brief.md
T

33 lines
1.3 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.
# Brief: single-react-harness-run-context
## 背景
旧 Chat/AIOps 通过多个 ThreadLocal 和业务方法内状态机传播 session/run/token/retry,无法成为后续 Tool、Agent、Guard 和新入口的稳定共同边界。Spring AI 默认 10 attempts 还会制造未被 Harness 记录的隐藏重试。
## 目标
- 建立显式、结构不可变、可异步传播的 RunContext。
- 集中实现 deadline、协作式取消、线程安全预算和唯一 Run 终态。
- 实现类型化、最多两次 attempt、逐 attempt 记录的 Harness retry。
- 提供阶段 3A 可直接使用的 Tool Call Key Factory 和单 Run 容量计数器。
- 将 Spring AI 底层 retry 压为一次。
## 范围
- 新增 Harness Core/Retry/Tool Store foundation 类型和 focused Fake tests。
- 更新 `application.yml` 的 Spring AI retry 配置。
- 更新 glossary 和 OpenSpec/devflow 档案。
## 非目标
- 不接入旧 ChatService/AiOpsService/Controller/SSE。
- 不读写现有 ThreadLocal,不删除旧实现。
- 不写 `diagnosis_run` 或 Redis,不实现 Tool projection。
## 元数据
- 分档:complex
- 接口影响:L2;另有关闭旧 SDK 隐式 retry 的有意内部行为变化
- 关联 Issue:ISS-014 阶段 2
- 关联 OpenSpec:`openspec/changes/single-react-harness-run-context`