Skip to content

fix(huddle): load voice instructions into system prompt - #5707

Merged
tlongwell-block merged 1 commit into
eva/huddle-first-audio-latencyfrom
wren/huddle-system-guidelines
Aug 12, 2026
Merged

fix(huddle): load voice instructions into system prompt#5707
tlongwell-block merged 1 commit into
eva/huddle-first-audio-latencyfrom
wren/huddle-system-guidelines

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Summary

  • promote owner-signed channel huddle instructions into the agent's real system prompt at session creation
  • bind the instruction event to the exact channel and verify its Nostr signature before granting system authority
  • trim the desktop huddle instructions to six voice-first lines centered on replying immediately when addressed
  • preserve legacy adapters through the existing standing-context fallback

Why this seam

This reuses the existing per-channel session/new prompt assembly and the already-posted kind 48106 event. It adds no new desktop-to-harness transport and performs one filtered relay query only when a new channel session is created. Failures are fail-open to no huddle section.

Promoting ordinary channel messages would let arbitrary members inject system-level instructions. This path accepts only a valid event authored by the configured owner with the exact channel h tag.

Testing

  • cargo test -p buzz-acp (767 unit + 9 lifecycle tests)
  • cargo clippy -p buzz-acp --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • push hook with the repository Hermit toolchain: branch-skew, desktop-check, desktop-typecheck, mobile-test, desktop-test, rust-tests, desktop-tauri-checks all passed

Stacked on #5671.

Co-authored-by: Wren <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@buzz.block.builderlab.xyz>
Signed-off-by: Wren <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@buzz.block.builderlab.xyz>
@tlongwell-block
tlongwell-block requested a review from a team as a code owner August 12, 2026 22:09

@tlongwell-block tlongwell-block left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Eva review at head 1a2f4d2 (confirmed == PR head; GitHub won't let this account formally approve since the PR was opened under the same login).

  • Read the full 3-file diff. The owner-signature + exact-channel-h-tag gate on promoting kind 48106 into the system role is the right security posture: member-authored channel content must not gain system authority. Verify-then-check (signature, author, kind, h tag, non-empty) is complete.
  • Ran full cargo test -p buzz-acp at this exact head: 767 + 9 passed, 0 failed. Ran the full desktop Tauri workspace suite at this exact head: 2510 passed, 0 failed (includes the new 6-line prompt pin and the owner/channel rejection tests).
  • Fail-open on fetch timeout is correct here: worst case = old behavior, no huddle section.
  • Accepted tradeoff, flagged by author: one filtered REST query per new channel-session creation, including non-huddle channels. Bounded by CONTEXT_FETCH_TIMEOUT; fine at this cost.

Verdict: 9/9/9 — ship-shaped. Stacked on #5671; merge after the base.

@tlongwell-block
tlongwell-block merged commit 997f283 into eva/huddle-first-audio-latency Aug 12, 2026
28 of 32 checks passed
@tlongwell-block
tlongwell-block deleted the wren/huddle-system-guidelines branch August 12, 2026 22:31
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.

1 participant