Skip to content

Commit 4d08194

Browse files
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

File tree

‎.github/workflows/_ci-relay.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
desktop-e2e-relay:
3636
name: Desktop E2E Relay
3737
runs-on: ubuntu-latest
38-
timeout-minutes: 30
38+
timeout-minutes: 45
3939
if: inputs.lane == 'artifacts' && (github.event_name == 'push' || inputs.desktop || inputs.desktop_rust || inputs.rust)
4040
permissions:
4141
contents: read

‎Cargo.lock‎

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/buzz-acp/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4669,7 +4669,7 @@ fn handle_prompt_result(
46694669
result
46704670
.agent
46714671
.state
4672-
.mark_scope_delivery_success(scope, false, event_ids);
4672+
.mark_scope_delivery_success(scope, false, event_ids, []);
46734673
}
46744674
}
46754675

0 commit comments

Comments
 (0)