Include thread roots in agent activity events - #8029
Conversation
Signed-off-by: Codex <codex@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 115575cda7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Some(observer.clone()), | ||
| Some(0), | ||
| context, | ||
| Some("a".repeat(64)), |
There was a problem hiding this comment.
Drive the liveness assertion through run_prompt_task
This test passes the root directly to the private liveness helper, so removing or breaking the production wiring at run_prompt_task would leave every new test green: the production-path test asserts only turn_started, while this helper test would continue emitting the manually supplied root. In that regression, clients that miss the ephemeral start frame could not distinguish or resurrect concurrent thread turns from liveness frames. Exercise a nonzero liveness interval through run_prompt_task and assert the resulting frame instead.
AGENTS.md reference: AGENTS.md:L234-L238
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🔐 Codex Security Review
Review SummaryOverall Risk: NONE
FindingsNo concrete security, correctness, or reliability findings were identified. Notes
Generated by Codex Security Review | |
Signed-off-by: Codex <codex@openai.com>
wpfleger96
left a comment
There was a problem hiding this comment.
🤖 thanks for this. the root comes from the admitted session scope, so start and liveness can't disagree with how the turn was routed, and putting it in the payload keeps the observer envelope unchanged. the updated test now drives liveness through run_prompt_task by holding the context lookup open, which covers the wiring the earlier helper-only test missed. lgtm
* commit '9b083957f^': Include thread roots in agent activity events (#8029) fix(relay): gate owner-only kinds in shared fan-out access filter (#8006) feat(acp): add BUZZ_GIT_IDENTITY switch for agent commit identity (#8024) fix(relay): deny channel writes when the channel lookup fails (#8007) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Brings in 31 upstream commits (639593b), including ACP native-steer frame-writer fixes (block#7568, block#8022), edited-message routing (block#4741), worker wrapping at launch (block#7985), BUZZ_GIT_IDENTITY (block#8024), thread roots in agent activity (block#8029) and built-in prompts without sleep polling (block#7992). Adaptations: - buzz-acp acp.rs: keep the fork's turn_output module alongside upstream's frame_writer module. - buzz-acp pool.rs: turn_started carries both the fork's triggeringRootEventIds and upstream's threadRootEventId. - buzz-acp queue.rs: drain_channel keeps upstream's withheld-steer reaction collection and still clears the cancelled-root tombstones. - buzz-acp queue.rs: task_root_event_id is now edit-aware, so the 1h cancelled-root tombstone also drops edits routed into a stopped tree. - buzz-acp base_prompt.md: keep the fork's empty-final-answer rule for bare acknowledgements, take upstream's handoff wording and no-sleep guidance. - buzz-acp tests: new `edit` field on fork-only QueuedEvent/BatchEvent tests. - desktop channels.rs: keep has_active_non_starter_channel guard inside upstream's ensure_starter_channels_inner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Arnoldinh0 <arnaudlafosse92100@gmail.com>
Summary
With thread conversation context, one agent can work in several threads in the same channel. Observer turn-start and liveness events currently identify only the channel, so clients cannot count distinct active threads reliably.
Add
payload.threadRootEventIdtoturn_startedandturn_livenessfrom the canonical session scope. Conversation-scoped turns, including DMs, and heartbeats omit it. A short code comment explains why thread conversation context requires the root.This PR contains only the shared producer change. Desktop UI changes will follow in
block/buzz-app; telemetry publishing remains separate.Related issue
Producer-only follow-up to the closed #7901. No separate issue found for the thread-count behavior.
Testing
The production-path regression checks turn-start and liveness payloads for thread and conversation scopes. A fixture gate holds channel lookup until a liveness frame arrives. Removing the liveness root argument at
run_prompt_taskfailed its payload assertion; restoring the wiring passed. Existing controlled-clock tests still cover session resolution and liveness shutdown.just cipassed on commit00445906f. Independent agent review found no blockers. Live-relay and human acceptance remain pending.Generated with Codex