Skip to content

✨ Betty names who and what each answer is for when requests overlap - #18625

Closed
clubanderson wants to merge 1 commit into
v5from
betty-attribution
Closed

clubanderson wants to merge 1 commit into
v5from
betty-attribution

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Part 2 of the concurrent-requests work on #18590: explicit attribution and queue awareness. Independent of #18623 (parallel model calls); together they let Betty answer in parallel without the room losing track.

Attribution. An answer opens with who asked and a short topic when the order could be unclear:

  • another request was in flight at the same time (both are marked overlapped, so even the one finishing last stays attributed),
  • someone else spoke, or she answered something else, after the request was made,
  • or the answer took longer than 8 s (attributeAfter).

Format, localized for en/es/fr/de/pt/it: chat Andy Anderson (re: open PRs): ..., voice Andy, about open PRs: ... (first name only). The topic is a new topic field in the model's JSON answer (2 to 5 words), else a heuristic over the request's own words with the person's casing restored (Rest is lowercased). Names are written plain: no @name, mention marks stripped, so nothing pings (on Discord a literal @everyone-like name would). A single quick answer keeps no prefix. The prefix is added on top of the already clipped answer rather than cutting it (a dig-in sentence is never lost).

Queue awareness. With two or more addressed requests in hand, one chat note I have N questions; answering each as it's ready., at most once a minute, through the chat rate limit, never charged (new TriggerQueue, handled before the switch in onPersonaReply to stay clear of #18592's hunks). A spoken ack names its asker (Bo, one moment.) when another request is already in flight, both for final-line and partial-transcript acks.

Tests: betty/attribution_test.go (two gated requests answered out of order are both attributed with the model topic, one queue note per minute, late single answer gets a prefix, spoken acks and answers name the asker, a line from someone else in between triggers attribution with the heuristic topic, topic/name/mention cleaning, topic parsed), live/attribution_test.go (overlapping chat requests: one note posted, both answers attributed, note not counted as a reply).

🤖 Generated with Claude Code

With more than one request in flight, other lines said since the
request, or an answer later than 8 s, each answer opens with the asker's
display name (first name when spoken, never an @mention) and a short
topic phrase: the model's new "topic" label, else the request's own
words. Two or more requests in hand post one queue note per minute
(chat, rate limited, not charged), and spoken acks name their asker
when others are waiting.

Part of #18590.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#18615 ✨ Meetings: delete finished meetings and stale join requests same files src/docs/meetings.md
#18623 ✨ Betty runs several model calls per meeting at once same files src/docs/meetings.md
src/pkg/meetings/betty/answer.go
#18633 🐛 Meetings: don't restart-loop the Spektacular stream child when live mode isn't available same files src/pkg/meetings/live/session.go
#18627 ✨ Betty speaks ready answers shortest first and moves a long voice queue to chat same files src/docs/meetings.md
src/pkg/meetings/live/session.go
#18631 ✨ Betty cites the sources of chat answers and says when she is not sure CONFLICT src/docs/meetings.md
src/pkg/meetings/betty/persona.go
src/pkg/meetings/betty/queue.go (conflict)
#18611 ✨ meetings: desktop companion meetings (/api/companion/*) same files src/docs/meetings.md
#18629 ✨ Betty times every answer stage and answers live-state questions without waiting for search CONFLICT src/docs/meetings.md
src/pkg/meetings/betty/betty.go
src/pkg/meetings/betty/queue.go (conflict)
src/pkg/meetings/live/session.go
#18602 📖 docs: Betty on Zoom without a Zoom app, options and recommendation same files src/docs/meetings.md

@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 11 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.

File Line Mutation
src/pkg/meetings/betty/attribution.go 82 CONDITIONALS_BOUNDARY
src/pkg/meetings/betty/attribution.go 140 CONDITIONALS_BOUNDARY
src/pkg/meetings/betty/attribution.go 142 CONDITIONALS_BOUNDARY
src/pkg/meetings/betty/attribution.go 154 CONDITIONALS_BOUNDARY
src/pkg/meetings/betty/attribution.go 158 CONDITIONALS_BOUNDARY
src/pkg/meetings/betty/attribution.go 211 CONDITIONALS_NEGATION
src/pkg/meetings/betty/attribution.go 211 CONDITIONALS_NEGATION
src/pkg/meetings/betty/attribution.go 266 CONDITIONALS_BOUNDARY
src/pkg/meetings/betty/attribution.go 303 CONDITIONALS_BOUNDARY
src/pkg/meetings/betty/betty.go 399 CONDITIONALS_NEGATION
src/pkg/meetings/betty/betty.go 399 CONDITIONALS_NEGATION

3 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/pkg/meetings/betty/attribution.go 24 ARITHMETIC_BASE
src/pkg/meetings/betty/attribution.go 174 CONDITIONALS_NEGATION
src/pkg/meetings/betty/attribution.go 178 CONDITIONALS_NEGATION

Verdict: lived (#17349).

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 17, 2026
@clubanderson

Copy link
Copy Markdown
Member Author

Combined into #18635 to get through CI and review together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant