Skip to content

Conversation

@hyprh
Copy link
Contributor

@hyprh hyprh commented Nov 27, 2025

No description provided.

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.62475%. Comparing base (16307d7) to head (f0463c2).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
runner/runner.go 0.00000% 1 Missing and 1 partial ⚠️
internal/flow/processor/content.go 87.50000% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (70.00000%) is below the target coverage (85.00000%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main        #759         +/-   ##
===================================================
- Coverage   87.63538%   87.62475%   -0.01063%     
===================================================
  Files            281         281                 
  Lines          36564       36573          +9     
===================================================
+ Hits           32043       32047          +4     
- Misses          2937        2940          +3     
- Partials        1584        1586          +2     
Flag Coverage Δ
unittests 87.62475% <70.00000%> (-0.01063%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


// Trigger summarization immediately after appending a qualifying event.
// Trigger summarization only after final assistant responses.
// Skip user messages, tool calls, and tool results to ensure summary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该还有遗漏, !event.IsValidContent() 的也需要排除掉。有一种情况是event中仅带deltaState

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

诶,这里前面的shouldPersistEvent 判定应该能挡住

Copy link
Contributor

@nomand-zc nomand-zc Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

诶,这里前面的shouldPersistEvent 判定应该能挡住

仅带deltaState时 !event.IsValidContent() == true, 拦不住

messages = p.getIncrementMessages(invocation, summaryUpdatedAt)
// When summary is present, ensure messages start with user role to comply with API requirements.
if !summaryUpdatedAt.IsZero() {
messages = p.trimLeadingNonUserMessages(messages)
Copy link
Contributor

@nomand-zc nomand-zc Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可能会有问题。假如第一个agent 执行完后 触发了summary,第二个agent 执行时是不是大概率就都拿不到增量消息了,包括第二个agent在本轮迭代中自己生成的tool相关的消息

Copy link
Contributor

@nomand-zc nomand-zc Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉这里不应该是截断,而是在没有userMessage时 强制将 invocation.Message插入进来

Copy link
Contributor Author

@hyprh hyprh Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

欸,没太理解,现在summary应该是绑定的runner,runner执行执行结束的时候触发吧,应该不会在第一个agent执行之后触发?你说的是graph的场景吗

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

欸,没太理解,现在summary应该是绑定的runner,runner执行执行结束的时候触发吧,应该不会在第一个agent执行之后触发?你说的是graph的场景吗

并不是runner结束时触发哦, 执行过程中也可以触发的。 只是你这一版改成了单个agent执行结束后才触发。 multiagent模式下,就会出现上面提到的这个问题。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"假如第一个agent 执行完后 触发了summary,第二个agent 执行时拿不到增量消息",我理解还是能拿到的吧,如果是顺序执行的话,updatetime绑定的是用于summary的最后一个event,增量event理论上没啥影响

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

第一个agent触发summary后, 第二个agent拿到的增量里是不是就不会包含userMessage了,在经过trimLeadingNonUserMessages处理,返回的就是nil了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants