fix(acp): honor persona thread_replies in prompt builder - #4746
fix(acp): honor persona thread_replies in prompt builder#4746santhiprakash wants to merge 1 commit into
Conversation
`thread_replies` was parsed and merged in `buzz-persona` but never read in `buzz-acp`. The harness always injected an `IMPORTANT:` directive forcing `--reply-to <event_id>` for new top-level channel mentions, so a persona with `thread_replies: false` still opened a thread. Plumb the resolved flag through `Config` / `PromptContext` / `FormatPromptArgs` with a default of `true` (per PERSONA_PACK_SPEC.md). When `thread_replies` is `false`, `format_prompt` skips the forced reply anchor for new top-level channel mentions. Existing thread and DM anchors continue to work, so the agent can still participate in an active thread or DM. - Add `--thread-replies` / `BUZZ_ACP_THREAD_REPLIES` to `CliArgs` and `Config`. - Thread the value through `PromptContext` and `FormatPromptArgs`. - Skip `resolve_reply_anchor` for human-facing top-level channel turns when `thread_replies == false`. - Add `queue.rs` unit tests covering top-level suppression, existing threads, and DMs when `thread_replies: false`. Fixes block#4699. Signed-off-by: Santhi Prakash <b.santhiprakash@gmail.com>
|
Closing this for now — not because the underlying issue is invalid, but because the branch now conflicts with recent ACP rework that landed in the same files, and I can't give the rebase the verification it deserves from here. What conflicted
The underlying bug is still real #4699 is still open and still reproducible on Next step I'll re-file this as a fresh focused PR against current |
Summary
Fixes #4699.
thread_replieswas parsed and merged inbuzz-personabut never read inbuzz-acp. The harness always injected anIMPORTANT:directive forcing--reply-to <event_id>for new top-level channel mentions, so a persona withthread_replies: falsestill opened a thread.This PR plumbs the resolved flag through
Config/PromptContext/FormatPromptArgswith a default oftrue(perPERSONA_PACK_SPEC.md). Whenthread_repliesisfalse,format_promptskips the forced reply anchor for new top-level channel mentions. Existing thread and DM anchors continue to work.What changed
--thread-replies/BUZZ_ACP_THREAD_REPLIEStoCliArgsandConfig.PromptContextandFormatPromptArgs.resolve_reply_anchorfor human-facing top-level channel turns whenthread_replies == false.queue.rsunit tests covering:thread_replies: falsethread_replies: falsethread_replies: falseVerification
just fmt-checkandjust clippypass.just test-unitpasses (including newbuzz-acptests).