Skip to content

✨ meetings: Betty drafts issues, RFCs, Spek sessions and knowledge notes for approval (Betty F) - #18424

Merged
hivecommons-hive[bot] merged 4 commits into
v5from
feat/betty-actions
Nov 16, 2026
Merged

hivecommons-hive[bot] merged 4 commits into
v5from
feat/betty-actions

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Part of #18391. Fixes #18406

People in a meeting can ask Betty, spoken or in the meeting chat, to open an issue, open an RFC, start a Spek session or save a knowledge note ("Betty, open an issue for the lobby timeout", "make that an RFC, Betty", "betty start a spek session on calendar sync", "save that as a knowledge note"). She drafts the item and confirms in the chat: "Drafted an issue: '<title>'. It's waiting for approval in the hive." Nothing is created from the meeting itself.

Flow

  • betty/actions.go: detects a request addressed to her (also the comma-less form speech-to-text writes), drafts title and body from the request plus the last three minutes (meetings model, rule fallback), attaches the meeting link and a transcript excerpt, and asks one clarifying question when the request names nothing and nothing was said before it (the model may ask that one question too, never twice). Confirmations never say the item exists.
  • pkg/meetings/actions: the approval queue (<meetings.data_dir>/actions.json, atomic writes), Approve / Edit / Reject, a restart mid-approval marks the draft failed instead of retrying it. Only knowledge notes may be auto-approved.
  • On approval: issue or RFC through github.Client.CreateIssue (App, provenance label, exact-title dedupe; RFC = RFC: title plus the rfc label rfcnotify reads), Spek session through the Inbox spek_rfc destination, knowledge note through the meetings vault write meeting notes use. The result is posted in the meeting chat while it is live (Runner.Announce), otherwise added to the meeting notes.
  • Dashboard: "Drafts from meetings" under the Calendar, with Edit (type, title, body, repo), Approve, Reject. /api/meetings/actions list, /{aid}/edit|approve|reject need the verified owner or a read-write user.

Config meetings.persona.actions: enabled (default true), types (default all four), default_repo (falls back to inbox.spek.repo, project.primary_repo, the first repo), auto_approve (all false; validation refuses anything but knowledge). Env: HIVE_MEETINGS_PERSONA_ACTIONS_ENABLED, _TYPES, _DEFAULT_REPO, _AUTO_APPROVE_KNOWLEDGE. Settings API for the Meeting attendee tab (#18417 is not merged yet, so this is a separate endpoint): GET /api/meetings/actions/settings (owner or read-write) and PUT (owner); a saved change applies without a restart.

Safety: meeting text reaches the model only inside the data block with delimiters stripped; the type comes from the request, never the model; a repo the model or speaker names is used only when it is monitored; @ mentions are removed before filing; the excerpt is quoted as a code block.

Tests: chat and speech replays for every type, repo from the request, clarification (answer, other speaker, cancel, expiry, model-asked once), type off / actions off, auto-approve only for knowledge, prompt injection treated as data, submit failure, queue approve / edit / reject / retry / restart / prune, announce to chat and notes, executors, auth on every route, settings validation, and the UI wiring and split executed in node.

Docs: meetings.md "Asking Betty to do things", configuration table, env-vars, api-reference, dashboard-sections, openapi.json; static/index.html regenerated.

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 16, 2026
@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 kellyaa 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 the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 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
#18419 ⚠️ Retire the inception API, watcher and brainstorm inception mode CONFLICT dashboard/openapi.json
src/cmd/hive/main.go
src/docs/api-reference/auth.md (conflict)
src/docs/api-reference/dashboard-misc.md (conflict)
src/docs/api-reference/health-status-events.md (conflict)
src/docs/api-reference/snapshots-and-style.md (conflict)
src/pkg/dashboard/server.go
src/pkg/dashboard/static/index.html
#18432 ✨ Inbox: auto-transcribe hive recordings same files src/pkg/dashboard/static/index.html
#18431 ✨ meetings: email invites with an allowlist of proven calendar emails (Betty C2 part 4) CONFLICT dashboard/openapi.json
src/docs/api-reference/auth.md (conflict)
src/docs/api-reference/dashboard-misc.md (conflict)
src/docs/api-reference/health-status-events.md (conflict)
src/docs/api-reference/knowledge.md (conflict)
src/docs/api-reference/snapshots-and-style.md (conflict)
src/docs/env-vars.md
src/docs/meetings.md (conflict)
src/pkg/dashboard/server.go
#18415 ✨ Inbox: pills record where an item was shared, by whom and when same files src/pkg/dashboard/static/index.html

@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

Review findings from adjudicator (folded here because this head already carries its hive review):

Delta re-review at ae497a2 (correctness). Prior findings, re-checked at this head:

  • Knowledge note overwrites same-title fact (src/cmd/hive/meetings_actions.go:179): still present. notes.Upsert(ctx, d.Title, ...) is unchanged and has no existence check.
  • Approve runs the executor on the request context (src/pkg/meetings/actions/actions.go:660): still present. Approve passes the caller's ctx to execute. The dashboard handler passes r.Context() (api_meetings_actions.go:138). A client disconnect cancels the executor mid-create and marks the draft failed, and a retry can then duplicate the created item.
    -	return s.execute(ctx, d), nil
    +	return s.execute(context.WithoutCancel(ctx), d), nil
    execute already applies s.opts.Timeout.
  • appendStoredNote read-modify-write (src/pkg/meetings/live/actions.go:96-109): still present. It does LoadDoc, append, SaveDoc with no lock. r.actions.mu guards only the sink factory. Two concurrent announcements can lose a note. Fix: add a per-runner mutex held around lines 97-110.
  • Speaker display name not defanged (src/pkg/meetings/actions/actions.go:484, rendered at :762): still present. clean defangs Title, Body, Excerpt and Request but not RequestedBy. A display name like someone is filed verbatim and pings that user. Fix: d.RequestedBy = clipRunes(Defang(oneLine(d.RequestedBy)), MaxTitleRunes).
  • Settings as a standalone endpoint (intent-alignment): not a correctness item; not re-evaluated here.

I did not read the full 16k-line delta; I checked the prior-finding sites only.

Review findings from adjudicator-4 (folded here because this head already carries its hive review):

Style re-review at ae497a2 (delta vs e4ce816 is mostly rebase noise: 140 files, only ~35 belong to this PR). Nothing new from the style perspective in the PR's own files. Prior findings at this head:

  • Knowledge note overwrites same-title fact (src/cmd/hive/meetings_actions.go:179): still present, notes.Upsert(ctx, d.Title, ...) unchanged.
  • Approve runs the executor on the request context (src/pkg/meetings/actions/actions.go:660, :673): still present. Suggested fix: ex.Execute(context.WithTimeout(context.WithoutCancel(ctx), s.opts.Timeout)).
  • appendStoredNote read-modify-write unsynchronized (src/pkg/meetings/live/actions.go:96-109): still present. The only mutex in the file guards the sink factory (:24).
  • Speaker display name filed un-defanged: still present. RequestedBy is cleaned at actions.go:484 with oneLine + clip but no Defang, and is rendered into the filed body at :762. Fix: d.RequestedBy = clipRunes(Defang(oneLine(d.RequestedBy)), MaxTitleRunes).
  • Settings as a standalone endpoint (api_meetings_actions.go:70): no longer blocking. The PR body says ✨ meetings: Settings tab "Meeting attendee" with Kokoro persona presets (Betty E) #18417 is unmerged, so this is a stated deferral. Note that dashboard-sections.md and meetings.md say "the Meeting attendee settings tab uses it". Please reword this until the tab exists.

hive/awaiting-ci: merged v5 in (clean, signed off); CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

Evidence bundle `#184249f52ea8` sha256:063d50fc374169e28687b89a530a83f321f89565e9dad49e1c34fa2ab0975fb4 — download from the dashboard or `hivectl review evidence #18424`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Review follow-ups (below review.backlog.min_severity: P2)

Non-blocking findings below the backlog filing line are listed here instead of as issues, one comment per PR, updated in place. Tick them off as they are fixed; set review.backlog.min_severity: P3 to file every finding.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Security review: one fix needed

src/pkg/meetings/actions/actions.go:2914 (clean): RequestedBy gets only oneLine+clip, while Title/Body/Excerpt/Request go through Defang. RenderBody then writes it into the filed item (", asked for by %s (meeting display name)"). The display name is set by any meeting participant, so a name like @someone pings that user from the hive App on approval. A name containing ](http://…) can inject links. This contradicts the PR's stated safety property that @ mentions are removed before filing. MeetingTitle goes into [%s](%s) unescaped in the same function.

Suggested fix:

-	d.RequestedBy = clipRunes(oneLine(d.RequestedBy), MaxTitleRunes)
+	d.RequestedBy = clipRunes(Defang(oneLine(d.RequestedBy)), MaxTitleRunes)
+	d.MeetingTitle = clipRunes(Defang(oneLine(d.MeetingTitle)), MaxTitleRunes)

Also strip [, ], ( and ) from both before they are interpolated in RenderBody.

Checked and fine: role gating on every route (requireMeetingsScheduleRole, owner-only settings PUT), repo checked against monitored repos in Submit and Edit, auto-approve limited to knowledge, excerpt fenced.

— hive: agent=adjudicator-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

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

Copy link
Copy Markdown
Contributor

Mutation testing

⏱️ The 900s mutation budget ran out, so 3 package(s) were not fully mutated and the results below do not cover them:

  • pkg/meetings/actions: skipped (not started)
  • pkg/meetings/betty: skipped (not started)
  • pkg/meetings/live: skipped (not started)

❌ gremlins did not produce a report for 1 package(s), so no verdict can be derived from this run (see the job log):

  • pkg/dashboard: gremlins exited 137

4 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/cmd/hive/meetings_actions.go 51 CONDITIONALS_NEGATION
src/cmd/hive/meetings_actions.go 239 CONDITIONALS_NEGATION
src/cmd/hive/meetings_actions.go 261 CONDITIONALS_NEGATION
src/cmd/hive/meetings_actions.go 280 CONDITIONALS_NEGATION

Verdict: error (#17349).

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Security delta re-review @ ae497a2 (read actions.go, link_fetch.go at head; mailin/auth not deeply audited)

Still present (in-scope): speaker display name filed un-defanged. clean() (src/pkg/meetings/actions/actions.go:484) sets d.RequestedBy = clipRunes(oneLine(d.RequestedBy), MaxTitleRunes) with no Defang, unlike Title/Body/Excerpt/Request (lines 480-483). It is then written verbatim into the filed issue body at actions.go:761-762 ("asked for by %s"). A participant who joins with the display name @some-maintainer or @org/team makes the hive's issue ping that user. The comment on line 135 says the name is unverified, and Defang's own doc (line 463) says meeting text must never ping anyone.

Fix:

	d.RequestedBy = clipRunes(Defang(oneLine(d.RequestedBy)), MaxTitleRunes)

Also consider running Defang on d.MeetingTitle before it is used at line 752-756, since calendar titles are attacker-influenced too.

Other previous findings (correctness/intent) are outside this perspective; I did not re-verify them. The new link fetcher (src/pkg/inbox/link_fetch.go:50-274) blocks private/link-local/metadata ranges at dial time and checks redirects, so no SSRF finding.

— hive: agent=adjudicator-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/scanner: rebase onto v5 conflicts in dashboard/openapi.json (14 hunks, both sides add large meetings blocks), src/docs/api-reference/knowledge.md and src/pkg/dashboard/static/index.html. These are additive on both sides (persona settings from #18396 vs. the actions settings here) but openapi.json is generated and the docs citations shift, so I did not hand-merge them blind. Suggested path: take v5's side, re-add the meetings/actions routes from this branch, then regenerate openapi and run python3 src/scripts/check-docs-citations.py --fix. Deferring this kick.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: bb7d6f2e4

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

…tes for approval

People can ask Betty in a meeting, spoken or typed, to open an issue, open
an RFC, start a Spek session or save a knowledge note. She drafts it from
the request and the recent transcript (title, short body, target repo when
named, link to the meeting, transcript excerpt), confirms in the chat that
it is waiting for approval, and asks one clarifying question when the
request is unclear. Nothing is created from the meeting itself.

- pkg/meetings/actions: the approval queue (actions.json in the meetings
  data dir), approve / edit / reject, executors per type, result announced
  back to the meeting. Only knowledge notes may be auto-approved.
- betty/actions.go: request detection (with or without a comma after the
  name), clarification, model or rule drafting; meeting text stays data,
  the type comes from the request and repos are checked against the
  monitored list.
- live: Runner.SetPersonaActions and Runner.Announce (chat while live,
  notes after).
- cmd/hive: issue and RFC through the GitHub issue path (rfc label and
  "RFC: " title), Spek session through the Inbox spek_rfc destination,
  knowledge note through the meetings vault write.
- dashboard: /api/meetings/actions list, edit, approve, reject (owner or
  read-write) and /api/meetings/actions/settings (read: owner or
  read-write; save: owner); "Drafts from meetings" in the Calendar section.
- config: meetings.persona.actions (enabled, types, default_repo,
  auto_approve) with HIVE_MEETINGS_PERSONA_ACTIONS_* overrides.
- Docs: meetings.md "Asking Betty to do things", env-vars, api-reference,
  dashboard-sections, openapi.json; changelog fragment.

Part of #18391. Fixes #18406

Signed-off-by: Andy Anderson <andy@clubanderson.com>
…ettings

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive
hivecommons-hive Bot merged commit d9bc333 into v5 Nov 16, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/betty-actions branch November 16, 2026 15:38
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 9f52ea8.

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Betty F: action requests in meetings (issue, RFC, Spek session, knowledge item), spoken or typed, approved in the dashboard

1 participant