Skip to content

fix(plugin): deduplicate repeated messages in capture batches - #6230

Merged
t0saki merged 5 commits into
volcengine:mainfrom
vriebge:fix/zcode-batch-duplicate-capture-6219
Oct 29, 2026
Merged

t0saki merged 5 commits into
volcengine:mainfrom
vriebge:fix/zcode-batch-duplicate-capture-6219

Conversation

@vriebge

@vriebge vriebge commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #6219.

Ten repeated user messages with one turn ID now produce one user payload, while five distinct assistant fragments with that turn ID remain five payloads.

Human Involvement

  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Fixes #6219

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Test update

Changes Made

  • Deduplicate identical normalized messages within one capture batch using the existing stable hash helper.
  • Preserve distinct assistant fragments that share a host turn ID.
  • Add a regression test for ten repeated user prompts and five distinct assistant fragments.

Testing

  • Added a regression test for the reported batch shape.
  • node --test examples/agent-hook-plugin/tests/zcode-capture.test.mjs examples/agent-hook-plugin/tests/zcode-turns.test.mjs — 34 tests passed.
  • git diff --check passed.

Additional Notes

AI assistance was used for implementation and validation. The issue and suggested behavior were checked against the production capture planner and its existing tests.

@ZaynJarvis ZaynJarvis added the agent-plugins Agent harness and plugin integrations label Oct 19, 2026
@t0saki
t0saki merged commit 81faeb6 into volcengine:main Oct 29, 2026
3 of 4 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Oct 29, 2026
yangpf5271 added a commit to yangpf5271/OpenViking that referenced this pull request Nov 8, 2026
冲突解决:
- config-schema(×3): 保留本地 actor 安全默认,收下上游
  recallEventsDecayProtection knob(事件时间衰减保护)
- doctor-core.test.mjs: 本地 Windows runCommand/resolveWindowsCommand
  测试与上游 whichCommand/describeApiKey 测试双双保留
- install.sh: 保留本地版——上游 v0.5.3 installer 仍不支持 Windows
  ('Needs macOS or Linux',OV_NATIVE/native_path 全无),而 Windows
  适配层是 zcode 桌面端与三端部署的刚需

上游要点: volcengine#6230 捕获批次去重(与本地解析层去重互补)、volcengine#6663 reindex
孤儿向量收敛、volcengine#5246 peer scope 列表读取、volcengine#5113 event chatlogs 保留
role/peer、volcengine#6032 opencode 子会话捕获跳过、volcengine#6003 历史导入脚本、
entities.yaml 迁移至 system_assets(git rename 检测已携带本地句)。
本地修复全存活核验通过。合并后新增 33 个失败均为上游新增测试在本机
(Windows/Node20)跑不了,与本地改动无关。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-plugins Agent harness and plugin integrations

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[agent-hook-plugin][zcode] Stop capture re-sends the same user message once per rollout line (duplicate user messages in one commit batch)

3 participants