From cbfe793819e81cf0ac5ec42fb95748a7178ca5c5 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 11 Jul 2026 17:56:39 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=AE=8C=E6=88=90=20Kafka=20=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=87=8D=E6=94=BE=E9=AA=8C=E6=94=B6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../R3.4_Task_Report.md | 59 +++++++++++++++++++ .../R3_Task_Report.md | 24 ++++++++ .../pure-kafka-live-single-step-debug.md | 4 +- 3 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 docs/MDTODO/details/pure-kafka-live-single-step-debug/R3.4_Task_Report.md create mode 100644 docs/MDTODO/details/pure-kafka-live-single-step-debug/R3_Task_Report.md diff --git a/docs/MDTODO/details/pure-kafka-live-single-step-debug/R3.4_Task_Report.md b/docs/MDTODO/details/pure-kafka-live-single-step-debug/R3.4_Task_Report.md new file mode 100644 index 00000000..ea990d4f --- /dev/null +++ b/docs/MDTODO/details/pure-kafka-live-single-step-debug/R3.4_Task_Report.md @@ -0,0 +1,59 @@ +# R3.4 Semantic Internal 刷新验收报告 + +- 上下文: + - [HWLAB #2486](https://github.com/pikasTech/HWLAB/issues/2486) + - [HWLAB #2487](https://github.com/pikasTech/HWLAB/issues/2487) + - [UniDesk #1781](https://github.com/pikasTech/unidesk/issues/1781) + - [UniDesk PR #1785](https://github.com/pikasTech/unidesk/pull/1785) +- 验收未提交 prompt,也未启动新的 AgentRun。 + +## 自动交付 + +- UniDesk merge commit:`567b0977f3fdf0807c816074c9d2587b98a8f996`。 +- PipelineRun: + - `hwlab-web-probe-sentinel-nc01-web-probe-sentinel-567b0977f3fd`; + - 状态为 `Succeeded`; + - source commit 与 merge commit 精确一致。 +- GitOps revision:`3ab023a0168e9e63a2a023ca3b28a785caed3259`。 +- Argo:`Synced/Healthy`。 +- runtime digest: + - `sha256:f7eef6f7e88ef8088f7015f2a8989cdc528ebbfa260b08fbc7092dfdcfec6d91`; + - 与产物 digest 精确一致。 +- 全程未执行 `apply`、`closeout`、`trigger`、`sync`、`flush`、人工 PipelineRun 或运行面 patch。 + +## 原入口证据 + +- semantic origin:`internal`。 +- observer:`webobs-mrgj09ow-e3e28e`。 +- typed command:`cmd-mrgj2fub-ca48aa`。 +- session:`ses_7c1a78ae-5fd1-4680-94f0-3568b29c3107`。 +- trace:`trc_de224b05aff24164`。 +- 刷新前后: + - message count 为 `2 -> 2`; + - DOM stable identity 与顺序保持; + - 缺失 identity 与重复 identity 均为 `0`。 +- 产品 SSE: + - EventSource、open、connected 均为 `1`; + - business event 为 `7`; + - typed failure 为 `0`; + - forbidden recovery request 为 `0`。 +- Kafka handoff: + - topic 为 `hwlab.event.v1`; + - barrier 为 `partition=0,endOffset=3144`; + - matched/replayed 为 `7/7`; + - buffered/bufferedDelivered 为 `0/0`; + - liveDelivered 为 `0`; + - deduplicated 为 `0`; + - 最终 phase 为 `live`。 + +## Artifact + +- report SHA:`sha256:1114c1ca5112e8c9ff3ed010b134789f8357ce27991b38489cd868cf9f75c82f`。 +- screenshot SHA:`sha256:8fdda20a13d583e6cd849cb78dc7078080ddd6d56f4eeda392f6a7639484f3b3`。 +- `observe collect --view files` 已返回结构化 `mode=list`,旧 `collect-stdout-json-contract-invalid` 未复现。 + +## 架构结论 + +- 刷新历史与 live 继续复用同一 `hwlab.event.v1` SSE codec、queue 和 reducer。 +- 未观测到 projector、read model、snapshot、sync、gap-fill、finalizer、polling 或 HTTP history fallback。 +- [HWLAB #2487](https://github.com/pikasTech/HWLAB/issues/2487) 与 [UniDesk #1781](https://github.com/pikasTech/unidesk/issues/1781) 已按上述证据关闭。 diff --git a/docs/MDTODO/details/pure-kafka-live-single-step-debug/R3_Task_Report.md b/docs/MDTODO/details/pure-kafka-live-single-step-debug/R3_Task_Report.md new file mode 100644 index 00000000..d3903f0b --- /dev/null +++ b/docs/MDTODO/details/pure-kafka-live-single-step-debug/R3_Task_Report.md @@ -0,0 +1,24 @@ +# R3 纯 Kafka 页面刷新重放交付报告 + +- 上下文:[HWLAB #2486](https://github.com/pikasTech/HWLAB/issues/2486)。 + +## 完成结果 + +- 用户输入、助手消息、工具调用与 terminal 均作为正式 Kafka event 进入同一链路。 +- 页面刷新使用 Kafka retention 的 exclusive offset barrier 重建 session 历史。 +- live listener 在 barrier 前注册,历史 replay 完成后经去重缓冲切换到 shared live fanout。 +- replay 与 live 共享同一 SSE writer、Web codec、queue 和 reducer。 +- 固定 trace CLI 验证 matched/replayed/applied 为 `381/381/381`,duplicate/rejected 为 `0/0`。 +- semantic internal 真实页面刷新验证 matched/replayed 为 `7/7`,唯一产品 EventSource 为 `1`,DOM identity/order 保持,最终 phase 为 `live`。 + +## 证据入口 + +- 实现与 CLI 单步证据:[R3.2](./R3.2_Task_Report.md)、[R3.3](./R3.3_Task_Report.md)。 +- 自动交付与页面刷新证据:[R3.4](./R3.4_Task_Report.md)。 +- issue closeout:[HWLAB #2487](https://github.com/pikasTech/HWLAB/issues/2487)。 + +## 架构边界 + +- 数据权威保持 `codex-stdio.raw.v1 -> agentrun.event.v1 -> HWLAB direct mapper -> hwlab.event.v1 retention -> shared live fanout -> SSE -> Web reducer`。 +- 未引入 projector、read model、snapshot、sync、gap-fill、finalizer、polling 或 HTTP history fallback。 +- refresh replay、live Kafka SSE 与其他能力保持 YAML-first、可组合且可独立开关。 diff --git a/docs/MDTODO/pure-kafka-live-single-step-debug.md b/docs/MDTODO/pure-kafka-live-single-step-debug.md index 67e0679c..7fec23ed 100644 --- a/docs/MDTODO/pure-kafka-live-single-step-debug.md +++ b/docs/MDTODO/pure-kafka-live-single-step-debug.md @@ -31,7 +31,7 @@ ### R2.4 [completed] 以 [HWLAB #2474](https://github.com/pikasTech/HWLAB/issues/2474) 和固定 trace trc_fb6031c28d79495e 完成纯 Kafka 集成闭环:先增强 CLI 直接读取持久 hwlab.event 并复用前端 decode、merge、row model、summary 输出同构 Markdown,再修复 Trace 内 final response 重复、tool-call summary 可见性和每个 HWLAB SSE ingress 刷新 lastEventAt;最后受控部署 NC01/v03,以 Kafka 重放、semantic internal web-probe、DOM 与 OTel 验收 projection=0 且无补洞路径,完成任务后将详细报告写入[任务报告](./details/pure-kafka-live-single-step-debug/R2.4_Task_Report.md)。 -## R3 [in_progress] +## R3 [completed] 在纯 Kafka SSE 权威链内实现页面刷新后的可重放引导,明确区别于 projector/read model/snapshot/sync/gap-fill/finalizer 补洞;上下文:[HWLAB #2486](https://github.com/pikasTech/HWLAB/issues/2486),完成任务后将详细报告写入[任务报告](./details/pure-kafka-live-single-step-debug/R3_Task_Report.md)。 ### R3.1 [completed] @@ -43,7 +43,7 @@ ### R3.3 [completed] 依据 [HWLAB #2486](https://github.com/pikasTech/HWLAB/issues/2486) 与 [AgentRun #283](https://github.com/pikasTech/agentrun/issues/283),使用固定 trace trc_fb6031c28d79495e 做 CLI 单步重放,并用正式 user_message fixture 补充历史 trace 不具备的用户输入验收;验证顺序、barrier、handoff、terminal、final 唯一性、tool summary 和 timing,不启动新真实运行,完成任务后将详细报告写入[任务报告](./details/pure-kafka-live-single-step-debug/R3.3_Task_Report.md)。 -### R3.4 +### R3.4 [completed] 完成 [HWLAB #2486](https://github.com/pikasTech/HWLAB/issues/2486) 的定向测试、受控 CI/CD 与 semantic internal web-probe 页面刷新验收,确认 projection=0 且无 snapshot/sync/gap-fill/finalizer 路径,完成任务后将详细报告写入[任务报告](./details/pure-kafka-live-single-step-debug/R3.4_Task_Report.md)。 ## R4 [in_progress]