Repository navigation
Commit 4d08194
authored
Deduplicate thread context by ACP session delivery (block#7620)
## Summary
Buzz can repeat a thread reply in later prompts after the provider
already received that event as context. The old fix treated every
message signed by the agent key as retained by the current provider
session. That could hide an unseen heartbeat reply because independent
sessions share the same signing key.
This PR now removes only exact event IDs already delivered to the live
ACP session. It uses bounded overfetch so removed events do not shrink
the new-context window, and it preserves unseen same-key replies from
other sessions.
The context header reports `truncated=true` whenever session history was
omitted. The harness calls `/count` only when the relay query finds a
sentinel beyond its fetch window.
This deliberately does not parse event IDs from shell output. A reply
that the agent just published may appear once in the next context delta;
after that event reaches the provider as context, later prompts omit it.
---------
Signed-off-by: Salman Mohammed <[email protected]>1 parent f78a32c commit 4d08194
5 files changed
Lines changed: 891 additions & 142 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4669 | 4669 | | |
4670 | 4670 | | |
4671 | 4671 | | |
4672 | | - | |
| 4672 | + | |
4673 | 4673 | | |
4674 | 4674 | | |
4675 | 4675 | | |
| |||
0 commit comments