Skip to content

✨ meetings: Calendar section, scheduled joins and approvals (Betty C1) - #18399

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

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

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Betty phase C1 (part of #18391): scheduled meetings, the Calendar section and approvals. No email yet; the email phase (C2) calls the same Ingest API.

What changes

  • pkg/meetings/schedule (new)

    • Event: uid, recurrence_id, sequence, method, summary (200 runes max), organizer, attendees, start/end (UTC), tzid, rrule, exdates, next occurrences, join_url, platform (google_meet, teams, zoom, discord), native meeting id, passcode, guild/channel, source (email, manual, discord), status (scheduled, awaiting_approval, live, ended, cancelled, declined, failed, blocked, skipped), the meeting id once joined, per-occurrence history, timestamps.
    • Store: <meetings.data_dir>/schedule.json, rewritten atomically, keyed by UID + RECURRENCE-ID. A higher SEQUENCE replaces the entry; an equal or lower one is ignored (ErrStaleSequence). CANCEL marks the event cancelled. Cancelling a series also cancels its overrides, and cancelling one occurrence that has no override adds an EXDATE.
    • Scheduler:
      • ticks every 15 s (HIVE_MEETINGS_SCHEDULE_TICK_S) and joins 60 s before start (HIVE_MEETINGS_SCHEDULE_LEAD_S) through Manager.Join, passing the inviter;
      • expands RRULEs with github.com/teambition/rrule-go (MIT, added to go.mod and NOTICE) in the event's zone, so local time holds across DST, and allows only daily, weekly, monthly or yearly rules;
      • supports skipping one occurrence;
      • persists the claim on an occurrence before calling join, so a restart never joins it twice (a join cut off by a restart is recorded as failed, not retried);
      • links the meeting back and follows its state through Manager.Subscribe plus a reconcile pass;
      • prunes finished events after 30 days.
    • Ingest(Event) (Event, error) with an Approver interface. The C1 stub OwnerApprover approves the owner's own manual adds; everything else awaits approval.
  • API (api_meetings_schedule.go):

    • GET /api/meetings/schedule: owner or read-write; returns {upcoming, recent, attendee_name}.
    • POST /api/meetings/schedule: owner or read-write manual add. A read-write user's add awaits approval.
    • POST /api/meetings/schedule/{eid}/{approve|decline|cancel|skip}: owner only.

    GET /api/meetings/schedule is a literal, so it takes precedence over /api/meetings/{id}. The action routes have four segments, so they never collide with the /api/meetings/{id}/... routes. The passcode is never returned. openapi.json and the api-reference rows are added, and citations were re-anchored with check-docs-citations.py --fix.

  • Dashboard:

    • A Calendar section right after Inbox (calendar.html, calendar.js, calendar.css, manifest, sidebar, sections.js title and help). Each row shows title, organizer, start and end in the viewer's time zone (Intl), platform badge, next occurrence, source and status. Rows have Approve and Decline for meetings awaiting approval, Skip and Cancel, and Open live panel or Notes. An "Add meeting" form takes a link, start, end, title and repeat.
    • A sidebar badge counting live meetings plus pending approvals.
    • A top-bar indicator ("🐝 Betty is in a meeting" / "in 2 meetings") while a meeting is joining, in the lobby or live. Its tooltip shows the platform and title, and a click opens the live panel, or the Calendar when there are several. It is driven by /api/events meeting frames over an initial GET /api/meetings. The name comes from the bot display name ("Betty Bee from the hive" shows as "Betty Bee"; the default "hive (notes)" shows as "Hive").
    • static/index.html is regenerated by byte-identical manifest concatenation.
  • Docs: meetings.md (Calendar), dashboard-sections.md, env-vars.md. Changelog fragment added.

Tests

  • schedule:
    • fake-clock lead-time join;
    • weekly recurrence over three occurrences;
    • DST local time;
    • skip;
    • approve, decline and cancel;
    • SEQUENCE and CANCEL rules, including overrides and EXDATE;
    • store reload with no double join, and a restart mid-join that is never rejoined;
    • failures, missed meetings, retention and store errors.
  • API: auth for each role, and routes and error mapping.
  • cmd/hive: the adapter and the wiring.
  • UI: wiring tests, plus node-executed indicator states (none, one live, two live, lobby, joining) and the badge count.
  • Section tests updated: summaries, cards, navbar chips.

🤖 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 clubanderson 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
#18401 ✨ Inbox: transcribe first, then share audio-only items same files src/pkg/dashboard/static/index.html
#18405 ✨ Inbox: send items into an Inception (spek) session 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/snapshots-and-style.md (conflict)
src/docs/env-vars.md
src/pkg/dashboard/server.go
src/pkg/dashboard/static/index.html
#18397 ✨ meetings: Betty persona, intro and question-driven chat answers (phase A) same files src/cmd/hive/main.go
src/docs/env-vars.md
src/docs/meetings.md

@hivecommons-hive

Copy link
Copy Markdown
Contributor
736b2e0

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 736b2e05b929) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • src/go.mod

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@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.

hive/awaiting-ci: rebased onto v5 (resolved sections.js help text and regenerated static/index.html from the manifest); CI pending — sweep will merge when green.


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

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

Evidence bundle `#18399b40c9e5` sha256:96da945680ed4fa19c0ad54403bc888c07a05d5a07481aee7f18dc3d8a43fd44 — download from the dashboard or `hivectl review evidence #18399`.

@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
New pkg/meetings/schedule: the Event model shared with the email phase,
schedule.json in the meetings data dir (atomic writes, keyed by UID +
RECURRENCE-ID, SEQUENCE rule, CANCEL marks cancelled), and a scheduler
that joins through Manager.Join a lead time before start (env
HIVE_MEETINGS_SCHEDULE_TICK_S / _LEAD_S), expands RRULEs with
teambition/rrule-go in the event's zone, supports skip-one-occurrence,
claims each occurrence before joining so a restart never joins twice,
and links the created meeting back. Ingest(Event) with an Approver seam
(C1 stub: owner manual adds approved, everything else awaits approval).

Dashboard: /api/meetings/schedule list/add and approve, decline, cancel,
skip routes; a Calendar section right after Inbox with a sidebar badge
(live meetings plus pending approvals); a top-bar indicator while hive is
in a meeting, driven by /api/events meeting frames. openapi.json,
api-reference, meetings.md, dashboard-sections.md and env-vars.md.

Part of #18391. Fixes #18394

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

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 9154cc5 into v5 Nov 16, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/betty-calendar branch November 16, 2026 13:04
@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 b40c9e5.

@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 53 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/schedule/event.go 246 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/event.go 255 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/event.go 266 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/event.go 299 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/event.go 307 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/event.go 380 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/recurrence.go 47 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/recurrence.go 47 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/recurrence.go 47 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/recurrence.go 86 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/recurrence.go 104 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/recurrence.go 104 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/recurrence.go 104 INCREMENT_DECREMENT
src/pkg/meetings/schedule/scheduler.go 89 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 93 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 121 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 124 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 124 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 130 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 130 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 201 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 201 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 201 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 293 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 329 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 369 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 369 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 385 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 436 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 436 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 446 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 454 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 454 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 463 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 503 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 518 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 542 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 569 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 595 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 612 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 620 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 629 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/scheduler.go 637 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 95 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/store.go 95 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 108 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 111 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 114 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 247 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/store.go 256 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 291 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 306 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/store.go 317 CONDITIONALS_BOUNDARY

30 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/main.go 3602 CONDITIONALS_NEGATION
src/cmd/hive/meetings_schedule.go 59 CONDITIONALS_NEGATION
src/cmd/hive/meetings_schedule.go 155 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/event.go 212 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/event.go 214 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/event.go 214 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/event.go 216 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/event.go 216 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/event.go 218 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/recurrence.go 17 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 18 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 20 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 22 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 24 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 24 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 26 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 26 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 219 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 221 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 223 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 386 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 386 INVERT_NEGATIVES
src/pkg/meetings/schedule/scheduler.go 532 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 532 INVERT_NEGATIVES
src/pkg/meetings/schedule/scheduler.go 534 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/scheduler.go 596 ARITHMETIC_BASE
src/pkg/meetings/schedule/scheduler.go 596 INVERT_NEGATIVES
src/pkg/meetings/schedule/store.go 231 CONDITIONALS_BOUNDARY
src/pkg/meetings/schedule/store.go 231 CONDITIONALS_NEGATION
src/pkg/meetings/schedule/store.go 242 CONDITIONALS_NEGATION

Verdict: lived (#17349).

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.

1 participant