fix(pipeline): make pipeline_init idempotent per session and emit pipeline_restarted on re-run - #201
Open
ruanzhengxin-zhuxing wants to merge 1 commit into
Open
fix(pipeline): make pipeline_init idempotent per session and emit pipeline_restarted on re-run#201ruanzhengxin-zhuxing wants to merge 1 commit into
ruanzhengxin-zhuxing wants to merge 1 commit into
Conversation
…eline_restarted on re-run Same-contextId re-runs of PipelineRunner.run() (e.g. A2A sidecar mismatch fresh-run paths) appended duplicate pipeline_init meta rows to session.jsonl. Now run() checks best-effort whether the session already recorded a pipeline_init lite-meta row; if so it records an explicit pipeline_restarted meta with a reason instead of a duplicate pipeline_init. Ref: Aone #84289723
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
同一会话(contextId)出现重复
pipeline_init与重复intent_parsingstep_complete 记录(证据 Session:b0963f5a432c4f60ac357fbb36c8b8ef、2253e91dc0c84b678d96e15d88868d90)。根因
PipelineRunner.run()每次被调用都无条件向 session.jsonl 追加pipeline_initlite-meta;A2A 侧 sidecar 状态不匹配后的 fresh-run 及兜底路径会对同一 contextId 再次调用run(),导致重复。修复
run()写pipeline_init前 best-effort 检查 session.jsonl 是否已有pipeline_initmeta;pipeline_restartedmeta(reason=duplicate_pipeline_init_suppressed);预期:每条会话
pipeline_init计数 ≤ 1,重启被pipeline_restarted显式标注。测试
Ref: Aone #84289723 / Harness a6b029db