Skip to content

feat(desktop): opt-in source-linked meeting memory briefs - #20824

Merged
aryanorastar merged 20 commits into
BasedHardware:mainfrom
aryanorastar:feat/meeting-memory-brief
Oct 21, 2026
Merged

aryanorastar merged 20 commits into
BasedHardware:mainfrom
aryanorastar:feat/meeting-memory-brief

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds an opt-in, quiet macOS meeting-memory pilot on the existing Conversations page. Within two hours of an upcoming local calendar event, it can show a short card from a prior, confidently matched Omi conversation: a decision, the user's open follow-up, and/or an unresolved question. Every displayed item opens its source transcript. When a completed meeting has cited, user-owned commitments, the conversation menu can prepare an editable, copy-only follow-up draft. The app never sends it.

This deliberately does not create a Chat card or notification. Automatic cards in Chat were removed by #20665; this pilot keeps meeting context in the Conversations destination and only when the user enables it.

Matching and safety

  • Match by the same local system-calendar event ID, or by an exactly normalized event title of at least 8 characters and an overlapping attendee email. A shorter, generic title ("Sync", "1:1") needs the exact event ID, because one shared attendee cannot tell recurring meetings apart. Never infer the match from an AI-generated conversation title alone.
  • Limit candidate conversations to completed, unlocked, non-deleted, non-discarded meetings within 180 days. Skip a recent match with no cited facts and try an older cited meeting; otherwise show nothing.
  • Show only structured summary sections or explicit user-owned, incomplete action items that carry transcript segment IDs. Clicking a fact opens the source conversation and focuses those segments.
  • Find a decision or open question first under a matching heading ("Decisions", "Open questions"), otherwise in the first cited summary line that states it. Production summaries title sections by topic, so most outcomes live in the text. One veto covers both paths: any negation (except one that negates the agreed action itself: "agreed not to ask", "decided never to store", "chose to not renew"), dispute ("disagreed", "objected"), discussion, proposal, question, or pending wording omits the line. The text fallback also needs a settled verb ("decided", "agreed", "chose", "approved", "made a decision"), so "We will discuss the decision next week" is not a decision. Imperatives under a real Decisions heading ("Ship the smaller pilot first") still count. Lines are classified whole and only shortened for the card, at the last whole word with an ellipsis. When matched meetings yield no fact, the app logs a count-only line.
  • The brief setting offers an explicit Calendar access request; background brief refreshes never prompt. Brief reads are read-only and do not upload calendar data. (The pre-existing recording-context feature has its own independent permission path.) A missing grant, match, citation, owner, or network response fails quietly.
  • Fence conversation reads and source navigation to the current authorization snapshot so an account switch cannot display another account's result. Dismissal keys include owner and meeting identity.
  • Follow-up drafts require cited user-owned actions, stay editable, include every eligible action in full (no truncation, so dates, links and qualifiers survive), and have only a Copy action (no recipient or send action).

Product invariants affected

  • INV-AUTH-1: optional conversation list/detail reads capture the current authorization snapshot, recheck it after awaits, and never publish stale owner content. The existing session invalidation and 401 policy are unchanged.
  • INV-NAV-1: the brief is added to the canonical Conversations page, preserving its established search, filters, folders, selection, pagination, and navigation. No alternate shell-specific destination is introduced.

Failure-Class: new

New class: Calendar purpose string without signing entitlement. The initial pilot bundle had the Calendar purpose string but not the hardened-runtime Calendar entitlement. tccd explicitly refused to prompt (kTCCServiceCalendar requires entitlement com.apple.security.personal-information.calendars), so the app never appeared in System Settings. Both development and release signing inputs now include the entitlement, and the named-bundle fallback has a regression assertion.

Verification

  • Composer tests: 23 passed, 0 failed. testANegativeDecisionIsStillADecision is built from the live production summary line, and restoring the old blanket negation veto fails it with 5 assertions. testLongCardLinesEndAtAWordWithAnEllipsis fails 2 assertions against the old raw 240-character cut.
  • Targeted Swift tests: 44 passed, 0 failed (matching, omission/locking, citation focus, calendar read permissions, conversation decoding, draft safety, and visible card rendering).
  • SwiftLint: 0 new violations across 1,817 Swift files.
  • Pinned swift-format and git diff --check passed on the changed Swift and patch.
  • The entitlement regression test and plutil -lint passed for development/release entitlements and Info.plist.
  • Isolated named macOS bundle com.omi.omi-meeting-brief-pilot passed the full dependency audit, installed, and launched signed in. Its effective code signature contains com.apple.security.personal-information.calendars=true. After the user-requested permission test, macOS listed the exact bundle with Full Access on, and the Meeting Briefs setting became on. Audio and screen capture were disabled in this test bundle.
  • Live pilot app with Meeting Briefs enabled after Calendar grant Live permissions/settings proof; this does not assert that a source-matched card was shown.
  • Meeting brief card rendered from synthetic, cited test data UI fixture only, not a live matched calendar meeting or before/after proof.
  • Tracked evidence: .agent-artifacts/ui-evidence/20824/001-desktop-macos-meeting-brief-calendar-enabled.png and .agent-artifacts/ui-evidence/20824/002-desktop-macos-meeting-brief-card-fixture.png.
  • Live source-matched card, verified against production (Oct 12). I created a "Brief test sync" event on the synced calendar and joined a real Discord voice call during it. The meeting detector marked the session role=meeting and stored the event. A scripted two-voice planning meeting (macOS say) then played through the speakers: 12 min recorded, 6 min of speech, with one decision, one assigned follow-up, one open question and an explicit "pricing is not decided". Production (api.omi.me) summarized it and linked it to the event. I then moved the event 40 minutes later. The Conversations page showed the card for the upcoming occurrence, matched by the same system-calendar event ID.
  • Live brief card before the next Brief test sync Decided and Open question, both from the production summary. "Pricing was not decided" was correctly not shown as a decision. Captured before the ellipsis change, so the lines still end mid-word ("permissi"). They now end at a whole word with "…".
  • Clicking Decided opens the cited transcript The source arrow opens the conversation with the transcript drawer on the cited segment.
  • Tracked evidence: .agent-artifacts/ui-evidence/20824/003-desktop-macos-meeting-brief-live-card.png and .agent-artifacts/ui-evidence/20824/004-desktop-macos-meeting-brief-live-source.png.
  • The live run first showed only the open question. The decision line ("The team agreed not to ask for calendar access at first launch") was vetoed by its "not". That is why negations that scope the agreed action now count (above). No "You owe" line appeared because production created no user-owned action item: the synthetic voice assigned the note to a name spoken by Speaker 2, not to the account owner. This is the intended fail-safe. The follow-up path stays covered by tests, not by this live run.

Pilot scope and follow-up

The first version searches the newest 100 completed conversations, so it intentionally returns no card if the relevant prior meeting is older than that fetch window. It has no external model calls and no new server persistence. Dogfood should measure useful, source-confirmed briefs, wrong matches, dismissals, and reviewed follow-ups before considering broader exposure.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @aryanorastar — reviewed the full diff (all 21 files). This is careful work; some notes below while it's in draft.

What holds up well:

  • Permission split in SystemCalendarMeetingContextService.swift: requestBriefAccess() is the only new prompt path (settings-initiated), while upcomingAuthorizedEvents() gates on an existing .allowed grant, and the new tests (testMeetingBriefReadNeverPromptsOrUploads, testMeetingBriefReadWithoutGrantIsSilent) assert zero requests and zero uploads. Good contract.
  • Owner fencing in ConversationsPage.swift (refreshMeetingBrief/openMeetingBriefSource): fetch, display, and source navigation all re-check RuntimeOwnerIdentity.isAuthorizationCurrent(owner), and the dismissal key embeds the owner ID, so an account switch can't surface another account's brief. The conversation fetch is also skipped entirely when no upcoming event exists.
  • Conservative matching in MeetingMemoryBriefComposer: system-calendar event ID match, or normalized title (≥8 chars) plus an overlapping attendee email; never a generated-title inference. Candidates are limited to completed, unlocked, non-deleted conversations within 180 days, and uncited matches are skipped rather than shown.
  • MeetingFollowUpDraftSheet stays copy-only; MeetingFollowUpDraftComposer only uses cited, user-owned, incomplete action items.

Minor notes (non-blocking):

  1. ConversationDetailView.swift — onDraftFollowUp runs MeetingFollowUpDraftComposer.compose(from:) in the header gating expression, so it re-executes on every body evaluation; consider computing it once when the conversation changes.
  2. ConversationsPage.swift — in the catch of refreshMeetingBrief, a failed fetch leaves the previous meetingBrief on screen. If that's intentional (stale context is better than none), a short comment saying so would help; otherwise clear it.
  3. The dismissal store (meetingMemoryBriefDismissedKey) is a single slot keyed by owner|event|start|source — dismissing a second meeting's brief overwrites the first's key, so a still-upcoming earlier brief can reappear after a refresh. Edge case, but worth a thought.
  4. The 5-minute Timer.publish plus didBecomeActive refresh is reasonable given the events-empty short-circuit; just noting the cadence.

Product-wise: this deliberately reintroduces calendar-derived proactive context after automatic Chat cards were removed in #20665. Keeping it opt-in and inside Conversations reads like the right lesson from that, but the placement decision and the calendar-permission surface deserve a maintainer's explicit sign-off before this leaves draft.

Feedback is AI-generated on behalf of the maintainers.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level

Copy link
Copy Markdown
Member

Follow-up review of the commits added since my earlier review (that head had 21 files; this one has 27). The three minor notes from my earlier comment still apply on this head — compose(from:) re-executing in the header gating expression, the fetch-error path leaving the previous brief on screen, and the single-slot dismissal key — so I won't rehash them here.

On what's new:

  • MeetingFollowUpDraftComposer (in MeetingMemoryBrief.swift) is built conservatively: it requires an explicit meetingIdentity and only includes incomplete, non-deleted, user-owned (captureOwner == "user") action items that carry sourceSegmentIDs. There's no per-item cap — testFollowUpDraftDoesNotSilentlyDropLaterCommitments pins that all seven commitments survive — and each line is truncated at 240 characters rather than dropped.
  • MeetingFollowUpDraftSheet stays copy-only ("Review transcript" / "Copy draft"); nothing is sent. The menu entry is additionally gated on meetingMemoryBriefsEnabled, so the surface stays opt-in end to end.
  • ConversationDetailAutomationState.prepareCitationFocus reuses the automation transcript-focus path without publishing a second open request, and testCitationFocusDoesNotPublishAnotherOpenRequest asserts takePendingOpenRequest() stays nil — nice reuse rather than a parallel navigation path.
  • Signing: com.apple.security.personal-information.calendars is added to both Omi.entitlements and Omi-Release.entitlements; test-prepare-local-dev-entitlements.sh now asserts the teamless and team-scoped fallback generation and the release inputs all preserve it; and the new failure-class doc (FC-calendar-purpose-string-without-signing-entitlement.json) records the TCC pitfall. Info.plist also drops the stale duplicate NSCalendarsFullAccessUsageDescription and rewords the purpose strings to match the read-only usage.
  • APIClient.getConversation now takes an optional authorizationSnapshot, and openMeetingBriefSource re-validates the owner both before and after the fetch — the account-switch fencing from the brief display path extends to source navigation too.

Still leaving two decisions for maintainer sign-off before this leaves draft: the pilot placement (calendar-derived proactive context returning after #20665 removed automatic Chat cards, now opt-in inside Conversations) and the release-entitlement addition.

Feedback is AI-generated on behalf of the maintainers.

@Git-on-my-level Git-on-my-level added the needs-maintainer-review Needs a human maintainer to sign off before merge label Oct 7, 2026
@aryanorastar
aryanorastar marked this pull request as ready for review October 8, 2026 14:23
@Git-on-my-level

Copy link
Copy Markdown
Member

Maintainer review of this pilot — overall this is careful work. The matching logic is conservative, the permission paths are well-fenced, and the test coverage matches the claims in the description. Detail below, plus a few items that need attention.

What checked out

  • MeetingMemoryBrief.swift: matching accepts either an exact system_calendar event ID or a normalized title (min 8 chars, case/diacritic-folded) and an attendee-email intersection — never a generated title alone. Facts require non-empty sourceSegmentIDs; the follow-up composer includes every eligible cited user-owned commitment and produces copy-only text.
  • SystemCalendarMeetingContextService.swift: requestBriefAccess() prompts only from the settings gesture; upcomingAuthorizedEvents() consumes an existing grant and never uploads. Both pinned by testMeetingBriefReadNeverPromptsOrUploads / testMeetingBriefReadWithoutGrantIsSilent (zero requests, zero uploads asserted).
  • ConversationsPage.swift: refreshMeetingBrief() re-checks RuntimeOwnerIdentity.isAuthorizationCurrent(owner) before and after both awaits, with a load-generation guard; dismissal keys bind owner + event identity. Sound account-switch fencing.
  • APIClient.swift / APIClient+ConversationModels.swift: the new authorizationSnapshot parameter defaults to nil, so existing getConversation callers are unaffected; meetingIdentity decodes only from explicit calendar context or an event link.
  • Settings toggle (SettingsContentView+Advanced.swift) persists only after Calendar access is actually granted, with a stale-async generation guard and a remediation hint on denial — good permission UX.
  • The new failure-class record matches the existing .github/failure-classes/ convention, and the entitlement tests in test-prepare-local-dev-entitlements.sh assert all three signing inputs retain Calendar access.

Needs attention

  1. PR Metadata Preflight is failing on the UI-evidence contract ("UI source changed, but the PR body has no tracked UI screenshot reference or exact UI-Evidence: none line"). The failing run predates the current PR body, which now references two tracked PNGs — but they live under desktop/macos/docs/, while the contract expects .agent-artifacts/ui-evidence/<pr-number-or-branch-slug>/ with evidence.json and <NNN>-<platform>-<slug>.png naming. A re-run will likely still fail; please move the evidence to the documented layout (or add the exact UI-Evidence: none line if that's the intended declaration).
  2. Release entitlement expansion: com.apple.security.personal-information.calendars now enters Omi-Release.entitlements, i.e. the signed hardened-runtime release build. That's a privacy-surface change that needs maintainer sign-off — it looks correct and consistent with the read-only brief path, but it shouldn't land unnoticed.
  3. Minor: ConversationDetailView evaluates MeetingFollowUpDraftComposer.compose(from:) in the view body just to decide menu-item visibility, so it recomposes on every body evaluation. Cheap today; computing it once would be cleaner.

Leaving for human maintainer review: a product-direction decision on the meeting-brief pilot (it stays out of Chat, consistent with #20665) and sign-off on the Calendar entitlement entering the release signing input.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

aryanorastar and others added 2 commits October 9, 2026 19:41
The UI-evidence contract expects screenshots under
.agent-artifacts/ui-evidence/<pr>/ with NNN-platform-slug names and an
evidence.json manifest. Move both pilot screenshots there unchanged.

Also compose the follow-up draft once per render; it decides whether the
menu item appears and fills the sheet, instead of composing twice.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed 82ec314: latest main merged, plus fixes for the first and third review items.

  • UI-evidence check: moved both screenshots unchanged to .agent-artifacts/ui-evidence/20824/ with contract-compliant names (001-desktop-macos-meeting-brief-calendar-enabled.png, 002-desktop-macos-meeting-brief-card-fixture.png) and an evidence.json manifest that keeps each image's caveat (settings proof only; synthetic fixture). The PR body now references them. scripts/pr-preflight passes ui-evidence, invariants, failure-class and the line-count ratchet.
  • Draft composed twice per render: ConversationDetailView now composes the follow-up draft once per render. The same text decides whether the menu item appears and fills the sheet.
  • Merge: latest main (c19d832) merged with no conflicts. The PR's file list is unchanged apart from the screenshot move.
  • Checks: a Swift test build against the merged tree completes, and the PR's 44 targeted tests pass (composer, rendering, calendar context service, conversation decoding, detail automation state).

The second item (the Calendar entitlement entering the release build) and the pilot product decision are still waiting for a maintainer's sign-off. A live source-matched card against a real calendar meeting is also still unverified, as the description says.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @aryanorastar — reviewed the full diff and tests. This is a carefully built feature; the privacy posture stands out. Detailed walkthrough with a few non-blocking notes:

Matching and privacy invariants (verified in code and tests)

  • MeetingMemoryBriefComposer.matches requires an exact system-calendar event ID, or a normalized title (≥8 chars) plus an overlapping attendee email — never an AI-title inference. testTitleOnlyAndEmailOnlyAreNotEnough, testExactSystemCalendarEventCanMatchWithoutAttendee, and testLockedOrUncitedSectionCannotBecomeClaim pin these down, including the skip-uncited-latest-for-earlier-cited-source behavior.
  • upcomingAuthorizedEvents consumes an existing grant only: never prompts, never uploads, filters all-day/canceled events. Both properties are test-asserted (testMeetingBriefReadNeverPromptsOrUploads, testMeetingBriefReadWithoutGrantIsSilent).
  • Every displayed fact carries transcript sourceSegmentIDs; the follow-up draft only includes incomplete, cited, captureOwner == "user" action items, includes all of them, and the app never sends it — copy-only with a transcript-review escape hatch. Good.
  • Authorization fencing in ConversationsPage.refreshMeetingBrief/openMeetingBriefSource uses a generation counter plus RuntimeOwnerIdentity.isAuthorizationCurrent checks before each state write, and dismissal keys embed the owner ID — account switches can't leak or carry over briefs.

Entitlements and signing

  • Adding com.apple.security.personal-information.calendars to both Omi.entitlements and Omi-Release.entitlements, extending test-prepare-local-dev-entitlements.sh to assert the key survives teamless/team-scoped fallbacks and release inputs, and recording FC-calendar-purpose-string-without-signing-entitlement.json is exactly the right way to prevent the "usage string without entitlement" TCC failure from recurring. The Info.plist cleanup also removes a duplicated NSCalendarsFullAccessUsageDescription key.

Two non-blocking observations

  1. With the setting on, ConversationsPage refreshes the brief every 5 minutes and on every app activation, each fetching up to 100 conversations. Fine for an opt-in pilot; worth keeping an eye on for battery/network once usage grows.
  2. Fact extraction matches hard-coded heading keywords ("decision", "agreed", "open question", "unresolved"). Differently-phrased headings silently yield no fact — consistent with the quiet-failure design, but it may become a "why is my brief empty?" support question. A debug affordance (even a log line) could help pilot diagnosis.

The .agent-artifacts/ui-evidence/20824 captures and changelog fragment follow repo conventions, and the evidence descriptions are honest about fixture vs. live data. Tests are comprehensive and the desktop suite is green at this head.

This introduces a new user-facing surface and a new Calendar access entitlement in release signing, so keeping the human-maintainer gate before merge rather than treating it as mechanically routine.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

…ty briefs

Production summaries title sections by topic ("Calendar permission"), so a
heading-only match ("Decisions", "Open questions") rarely found a decision or
open question. Keep the heading match first, then take the first cited line
that states the outcome. Negated lines ("have not decided", "no decision")
count as open questions and never as decisions; "disagreed" is never a
decision. Log a count-only line when matched meetings yield no fact.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed 1f0b851, covering the second non-blocking note (hard-coded heading keywords).

  • Why it mattered in practice: in a live run against production, the backend summarised a test meeting under topic headings such as "Calendar permission", "Pilot rollout" and "Measuring wrong matches". With heading-only matching, the brief could never show its decision or open question. Only the follow-up from the user's own action items could appear.

  • Change: a matching heading ("Decisions", "Open questions") still wins. Otherwise the brief takes the first cited summary line that states the outcome, and shows that line rather than the section's first line.

    • Negated lines ("have not decided", "no decision", "left open") count as open questions and never as decisions. "Disagreed" is never a decision.
    • Only cited sections count, as before.
  • Logging: when matched meetings yield no fact, the app logs a count-only line, MeetingMemoryBrief: N matched meeting(s) had no cited decision, follow-up, or open question, so an empty pilot brief is diagnosable.

  • Tests (3 new):

    • Production-shaped topic sections give a decision and an open question from their cited lines.
    • Negated or disputed lines never become decisions.
    • A heading still wins, and uncited bodies never count.

    Removing the negation guard or the line matching fails tests. The brief suites pass: 47 tests, plus the follow-up draft and calendar service suites.

  • PR body: the "Matching and safety" section is updated.

The live run also showed that a recording only gets calendar identity in production if the meeting lasts at least 5 minutes, so a live, source-matched card still needs a real meeting. The pilot verification note in the description still stands.

"We have not yet decided on pricing" matched no fixed phrase, so it showed as
"Decided", and a "Decisions" heading took its first line with no check at all.
Classify by words instead: a negation before the outcome word ("not", "no",
"never", "nobody", "n't") makes an open question, and any negation rules out a
decision. "They agreed not to ship" gets neither label. Under a "Decisions"
heading, unsettled lines are skipped.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed 93ec190: unsettled lines are no longer labelled as decisions.

  • Bug: "We have not yet decided on pricing" matched none of the fixed open-question phrases, so the brief showed it as "Decided". A "Decisions" heading also took its first line without any check.

  • Fix: lines are now classified by their words.

    • A negation before the outcome word ("not", "no", "never", "nobody", "n't", including the curly apostrophe) makes the line an open question.
    • Any negation, "disagreed", or open-question wording rules out a decision.
    • "They agreed not to ship" gets neither label rather than the wrong one.
    • Under a "Decisions" heading, unsettled lines are skipped.
  • Tests:

    • That exact sentence, plus "haven't" (both apostrophes), "Nobody has decided" and "never reached a decision". The "Nobody" case failed on the first run and is fixed.
    • "Agreed not to" gets neither label.
    • A "Decisions" section whose first line is unsettled.

    Turning off the heading filter or the negation rule fails a test. Brief suites: 48 passed.

A source-matched card against a real calendar meeting and the Calendar entitlement sign-off are still outstanding, as before.

@aryanorastar
aryanorastar requested review from Archit-lal and Git-on-my-level and a balanced review from Copilot and removed request for Git-on-my-level October 11, 2026 12:50
@aryanorastar
aryanorastar requested review from Git-on-my-level and a balanced review from Copilot and removed request for Copilot October 11, 2026 12:50

Copilot AI 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.

🟡 Changes recommended

Decision classification and matching/draft behavior currently violate documented pilot safety requirements.

3 open findings
What changed in this PR

Adds an opt-in macOS meeting-memory pilot with source-linked briefs and editable, copy-only follow-up drafts.

Changes:

  • Adds calendar-based conversation matching and cited fact extraction.
  • Integrates briefs, source navigation, settings, and follow-up drafts.
  • Adds Calendar signing entitlements, tests, and pilot evidence.
File Description
desktop/​macos/​tests/​test-prepare-local-dev-entitlements.sh Verifies Calendar entitlements.
desktop/​macos/​e2e/​flows/​conversation-detail.yaml Associates meeting brief views with the detail flow.
desktop/​macos/​Desktop/​Tests/​SystemCalendarMeetingContextServiceTests.swift Tests silent, read-only calendar access.
desktop/​macos/​Desktop/​Tests/​ServerConversationDecodingTests.swift Tests calendar identity decoding.
desktop/​macos/​Desktop/​Tests/​MeetingMemoryBriefRenderingTests.swift Tests card rendering.
desktop/​macos/​Desktop/​Tests/​MeetingMemoryBriefComposerTests.swift Tests matching, facts, and drafts.
desktop/​macos/​Desktop/​Tests/​ConversationDetailAutomationStateTests.swift Tests citation focus behavior.
desktop/​macos/​Desktop/​Sources/​Services/​APIClient/​APIClient+ConversationModels.swift Adds meeting identity to conversations.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Pages/​SettingsPage.swift Adds meeting-brief settings state.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Pages/​Settings/​Sections/​SettingsContentView+Advanced.swift Adds opt-in and permission controls.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Pages/​ConversationsPage.swift Loads and displays owner-fenced briefs.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Pages/​ConversationDetailView.swift Presents follow-up drafts.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Pages/​ConversationDetailHeader.swift Adds the draft menu action.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Conversations/​MeetingMemoryBriefCard.swift Renders source-linked brief facts.
desktop/​macos/​Desktop/​Sources/​MainWindow/​Conversations/​MeetingFollowUpDraftSheet.swift Provides editable copy-only drafts.
desktop/​macos/​Desktop/​Sources/​MainWindow/​ConversationDetailAutomationState.swift Adds transcript citation focus.
desktop/​macos/​Desktop/​Sources/​DefaultsKey.swift Defines pilot preference keys.
desktop/​macos/​Desktop/​Sources/​CalendarMeetingContext/​SystemCalendarMeetingContextService.swift Adds explicit access and authorized reads.
desktop/​macos/​Desktop/​Sources/​CalendarMeetingContext/​MeetingMemoryBrief.swift Implements matching, extraction, and drafting.
desktop/​macos/​Desktop/​Sources/​APIClient.swift Supports owner-fenced detail reads.
desktop/​macos/​Desktop/​Omi.entitlements Enables Calendar access in development.
desktop/​macos/​Desktop/​Omi-Release.entitlements Enables Calendar access in releases.
desktop/​macos/​Desktop/​Info.plist Updates Calendar permission copy.
desktop/​macos/​changelog/​unreleased/​20261006-meeting-memory-briefs.json Adds the release note.
.github/​failure-classes/​FC-calendar-purpose-string-without-signing-entitlement.json Registers the signing failure class.
.agent-artifacts/​ui-evidence/​20824/​evidence.json Describes pilot UI evidence.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}

let title = normalizedTitle(event.title)
guard title.count >= 8, title == normalizedTitle(identity.title) else { return false }

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.

Kept on purpose, and now named (minimumTitleOnlyMatchLength) and documented in the PR's matching contract. Without the same event ID, a short generic title ("Sync", "1:1") plus one shared attendee can't tell recurring meetings apart, and a wrong-meeting brief is the failure this pilot is built to avoid. Short titles still match on the exact system-calendar event ID. testShortTitlesNeedTheExactEventID pins both sides. I'm leaving this thread open for a maintainer to accept or overrule the policy.

…ts whole

- One veto for the "Decisions" heading path and the text fallback: any
  negation, dispute ("disagreed", "objected", "pushed back"), discussion,
  proposal, question, or pending wording omits the line. Imperatives under a
  real Decisions heading ("Ship the smaller pilot first") still count.
- The text fallback needs a settled verb (decided, agreed, chose, approved,
  settled, finalized, made/reached a decision); "decision" alone is not one.
- Lines are classified whole and only shortened for the card, so a late
  negation is never cut off before the veto reads it.
- The editable follow-up draft keeps every commitment in full: no per-action
  240-character truncation.
- Titles shorter than eight normalized characters still need the exact event
  ID; the floor is now a named constant with a test.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed 5d84910: only settled outcomes become decisions, and the follow-up draft keeps every word.

  • One veto for both paths. The "Decisions" heading path and the text fallback now share isUnsettled: any negation, dispute ("disagreed", "objected", "pushed back"), discussion, proposal, question, or pending wording omits the line. Imperatives under a real Decisions heading ("Ship the smaller pilot first") still count.
  • Settled outcome required for the text fallback. The line needs a settled verb (decided, agreed, chose, approved, settled, finalized, made/reached a decision). "The team will discuss the decision next week" and "Sara owns the hosting decision" are no longer decisions.
  • Whole-line classification. Lines are classified in full and only shortened for the compact card, so a late "not" can't be truncated away before the veto reads it.
  • Draft keeps full commitments. The editable follow-up draft no longer truncates commitments at 240 characters. Dates, links and qualifiers ("do not send until legal approves…") survive.
  • Short titles. Titles shorter than 8 normalized characters still need the exact event ID. The floor is now a named constant with a test, and it's documented in the PR's matching contract.

Tests: brief, follow-up draft, calendar context, conversation decoding and detail automation suites, 53 passed. They cover:

  • future discussion versus a completed decision
  • disagreement under a Decisions heading
  • negation, including curly apostrophes
  • valid imperatives under a heading
  • a 400+ character commitment and multiple commitments preserved in full
  • completed, deleted, non-user and uncited actions excluded

Removing any of the four new rules fails a test. test-prepare-local-dev-entitlements.sh and plutil -lint pass. make preflight passes 33 checks.

Still open:

  • No live source-matched card has been shown against a real calendar meeting. Production only links a recording to its calendar event when the meeting lasts at least 5 minutes, so this needs a real meeting. The screenshots in the PR are fixtures.
  • Maintainer sign-off on the Calendar entitlement in release signing and on the pilot.

"The budget will be approved next week", "We will have decided by Friday" and
"We would have approved it" still read as decided. An outcome verb governed by
a future, modal or infinitive auxiliary in the three words before it (will,
would, shall, should, could, may, must, can, going, to, 'll, 'd) is now
unsettled, in the shared veto used by both the Decisions heading and the text
fallback. A later auxiliary ("We agreed we will ship Thursday") still reports a
settled agreement, and heading imperatives are unchanged.

Failure-Class: none

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed 0b3bb98: future and hypothetical outcomes are never shown as decisions.

  • Bug: "The budget will be approved next week", "We will have decided on the launch date by Friday" and "We would have approved the budget if the price had changed" were still labelled Decided. The classifier accepted an outcome verb without looking at its grammatical context.

  • Fix: an outcome verb (decided, agreed, chose, approved, settled, finalized, made/reached a decision) is now unsettled when a future, modal or infinitive auxiliary sits in the three words before it: will, would, shall, should, could, may, must, can, going, to, or 'll/'d (both apostrophes).

    • It's part of the shared veto, so both the Decisions-heading path and the text fallback reject these lines.
    • A later auxiliary still reports a settled agreement: "We agreed we will ship Thursday", "The team decided it would launch in May".
    • Unchanged: heading imperatives ("Ship the smaller pilot first"), the negation and disagreement protections, citations, full follow-up text, account fencing, and the short-title rule.
  • Tests (3 new):

    • All three sentences under a topic heading and under a Decisions heading.
    • Completed agreements about the future still count.
    • A mixed Decisions section keeps the imperative and its citation.

    Turning off the new check fails 11 assertions. Brief suites: 56 passed. test-prepare-local-dev-entitlements.sh and plutil -lint pass, and make preflight passes 33 checks.

Still outstanding: a live, source-matched card against a real calendar meeting of at least 5 minutes, and sign-off on the Calendar entitlement in release signing and on the pilot.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @aryanorastar — reviewed the four commits since the last review pass (now at 0b3bb98) plus the full diff again. The iteration on decision classification holds up:

  • The shared isUnsettled veto in MeetingMemoryBrief.swift (negations incl. n't/curly apostrophe, dispute markers, discussion/proposal/question wording) now governs both the "Decisions"-heading path and the topic-section fallback, and statesDecision additionally requires a settled verb. testNegatedOrDisputedLinesAreNeverDecisions and the topic-section tests pin that "have not decided" reads as an open question, never a decision.
  • reportsUnrealizedOutcome rejects auxiliaries in the three words before the verb ("will be approved", "would have approved"), while "We agreed we will ship Thursday" still counts — covered from both directions in testACompletedAgreementAboutTheFutureIsStillADecision.
  • Whole-line classification before the 240-char card truncation (testALateNegationInALongLineStillVetoesTheDecision) and untruncated follow-up commitments in MeetingFollowUpDraftComposer close the truncation blind spot.
  • ConversationsPage.refreshMeetingBrief skips the conversation fetch entirely when no upcoming event exists, and keeps the generation guard plus owner re-validation around both awaits; openMeetingBriefSource re-checks lock/discarded state after the fetch.

Two non-blocking observations, neither of which blocks this pilot:

  1. refreshMeetingBrief's catch path logs the error but intentionally leaves the previous brief on screen. Fine for a pilot; worth a deliberate call later.
  2. The classifier's word lists are English-only; production summaries in other languages will simply yield fewer (or no) facts. Given every fact is transcript-cited and weak identity yields no brief, that fails safe.

Remaining before merge (unchanged, and correctly still open): the pilot product decision, and sign-off that com.apple.security.personal-information.calendars enters the signed release bundle (Omi-Release.entitlements). The new FC-calendar-purpose-string-without-signing-entitlement record and the three fallback-preservation assertions in test-prepare-local-dev-entitlements.sh document the second one well.

Nice work — the privacy posture (opt-in, no uploads from the brief path, owner-fenced dismissal) is consistently carried through. Leaving the maintainer-review label on for the pilot and entitlement decisions.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

A live pilot run against production surfaced "The team agreed not to ask
for calendar access at first launch" as the meeting's decision, and the
blanket negation veto dropped it. A "not"/"never" that scopes the agreed
action ("agreed not to", "decided never to", "chose to not") settles what
will not happen; every other negation still vetoes.

Adds live-card and source-jump evidence from that run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed 4ce8ab1. The brief is now verified live against production, and the run turned up one classifier gap, which this commit fixes.

  • Live run: a scripted two-voice meeting during a real Discord call and a synced "Brief test sync" event. 12 min recorded. Production summarized it and linked it to the event. After the event moved later, the Conversations page showed the card for the next occurrence, matched by event ID. The source arrow opens the transcript on the cited segment. Screenshots 003 and 004 are in the body.
  • Gap: the first card showed only the open question. The summary's decision, "The team agreed not to ask for calendar access at first launch", was vetoed by its "not".
  • Fix: a "not"/"never" that scopes the agreed action ("agreed not to", "decided never to", "chose to not") no longer vetoes. Every other negation still does: "We have not agreed not to ship", "Nobody agreed not to ship", "They agreed nothing" and "We will have agreed not to ship by Friday" stay omitted.
  • Test: testANegativeDecisionIsStillADecision uses the live production line. Restoring the old blanket veto fails it with 5 assertions. Composer suite: 22 passed. make preflight: 33 checks passed.
  • Not covered live: no "You owe" line. Production created no user-owned action item because the synthetic voice assigned the note to Speaker 2. That path stays covered by tests.

The live card cut its Decided line at 240 characters mid-word
("launch-time permissi") with no marker that text was omitted. Cut at
the last whole word that fits and append an ellipsis; one unbroken
word is still bounded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed bac2030: long brief lines now end at a whole word with an ellipsis.

  • Bug: the live card cut its Decided line at 240 characters mid-word ("launch-time permissi") with no sign that text was left out.
  • Fix: cardExcerpt cuts at the last whole word that fits and appends "…". Short lines are unchanged, and a single unbroken word is still bounded. Classification still reads the whole line, and the follow-up draft still keeps every word.
  • Test: testLongCardLinesEndAtAWordWithAnEllipsis uses the live line. The old raw cut fails it with 2 assertions. Composer suite: 23 passed.
  • Screenshot 003 was captured before this change, so it still shows the mid-word cut. The PR body says so.

@Git-on-my-level

Copy link
Copy Markdown
Member

Reviewed the two commits since the last pass (4ce8ab1 live verification + classifier fix, bac2030 card-excerpt fix) against the full diff again. The iteration holds up; notes below.

What's new, verified

  • cardExcerpt in MeetingMemoryBrief.swift: the 240-char cut now lands on the last whole word and appends an ellipsis, with testLongCardLinesEndAtAWordWithAnEllipsis pinning the live line, the short-line passthrough, and the single-unbroken-word bound. Good catch fixing this — a mid-word cut is exactly the kind of small wrongness users notice.
  • The settled-verb requirement for the topic-section fallback (statesDecision + settledOutcomeIndices) closes the gap from the live run: a decision stated in prose under a topic heading now surfaces without trusting the heading alone, and reportsUnrealizedOutcome (an auxiliary within three words of the verb) keeps "The budget will be approved next week" out of the Decided slot. testACompletedAgreementAboutTheFutureIsStillADecision correctly keeps "We agreed we will ship Thursday" as a decision — the check is scoped to the words before the verb, not the whole line.
  • Classification reads the whole line while the card shows the excerpt — testALateNegationInALongLineStillVetoesTheDecision covers precisely the failure mode where truncation would have hidden a veto.
  • evidence.json (003/004) is honest about what each screenshot proves: fixture vs. live source-matched card vs. citation navigation. The live run validating event-ID matching and transcript-segment focus is the strongest evidence in the PR.
  • FC-calendar-purpose-string-without-signing-entitlement.json matches the failure-class convention, and the new assertions in test-prepare-local-dev-entitlements.sh (dev, teamless fallback, team-scoped fallback, and release inputs) close the loop on the TCC bug that motivated it. Info.plist also drops the duplicated NSCalendarsFullAccessUsageDescription key and makes both calendar purpose strings accurate for this feature.

Non-blocking observations

  • The decision/open-question markers in MeetingMemoryBrief.swift (settledWords, unrealizedMarkers, uncertaintyMarkers, negations) are English-only. A non-English summary yields no decision/open-question facts, so the card silently won't show them — the safe direction, but the pilot is effectively English-first. (Follow-up facts from user-owned action items are language-independent.)
  • reportsUnrealizedOutcome can over-veto: "We are going with the approved vendor" has "going" within three words of "approved" and would be dropped. Again an omission, never a wrong label — acceptable for a pilot, just worth knowing.
  • refreshMeetingBrief in ConversationsPage.swift fetches up to 100 completed conversations over the 180-day lookback; a user with denser history could miss the true prior meeting for an older recurring event.

The earlier non-blocking notes (per-render compose(from:) in the detail-header gating, the fetch-error path leaving the last brief on screen, the single-slot dismissal key) are still open but unchanged in severity.

This stays with needs-maintainer-review: whether this opt-in pilot should ship on the Conversations surface is a product-direction call, and the Calendar permission posture (new entitlement in both signing inputs, settings-initiated prompt only) deserves a maintainer's explicit sign-off.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

…ot gates

Separates what the controlled live run proved (end-to-end card and source
navigation against production) from what is still unverified (a live
user-owned follow-up line, organic usefulness) and lists the human
decisions the pilot needs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Pushed d1f78ec: docs only. Adds CalendarMeetingContext/ARCHITECTURE.md; no behavior change.

  • Covers: matching (exact event ID, or a ≥8-character normalized title plus a shared attendee; shorter titles need the event ID), omission rules, opt-in and permission posture.
  • Evidence status: one controlled live run against production verified the card and source navigation. It did not verify a live user-owned "You owe" line (that run produced no user-owned action item) or usefulness on organic meetings, which has not been measured.
  • Pilot checklist: lists the open human decisions: the opt-in pilot, the Calendar permission and release entitlement, and the short-title exact-event-ID policy.
  • Re-run on this head: targeted Swift tests via xcrun, 58 passed. test-prepare-local-dev-entitlements.sh passes; plutil -lint OK for both entitlements files and Info.plist; personal-information.calendars is true in development and release. make preflight: 33 checks passed.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thank you for this — it's a carefully built pilot. Some observations from a full read of the diff:

What stands out as solid

  • MeetingMemoryBrief.swift: the no-model composer is appropriately conservative. Matching requires the same system-calendar event ID, or a normalized title of ≥8 characters plus a shared attendee email; short/generic titles ("Sync", "1:1") never match, and AI-generated conversation titles are never used for matching. The isUnsettled veto drops negations, disputes, proposals, and unrealized outcomes ("will be approved"), while correctly keeping "agreed not to ask" as a decision. Weak identity yields no card rather than a plausible-looking guess — the right failure mode.
  • SystemCalendarMeetingContextService.swift: requestBriefAccess() is the only new prompt path and it's tied to the settings gesture; upcomingAuthorizedEvents() reads only when already granted and never uploads. The two new tests pin both behaviors (zero requestAccess calls, zero uploader payloads) on the granted and notDetermined paths.
  • ConversationsPage.swift: refreshMeetingBrief() is generation-guarded, re-checks owner authorization currency after every await, and the card is gated off while capturing, finalizing, searching, filtering, or multi-selecting. Dismissal is keyed by owner + event + start + conversation, so it can't carry across accounts.
  • SettingsContentView+Advanced.swift: the toggle stays off on denial with actionable System Settings guidance rather than a dead switch, and the async access request has its own generation guard.
  • APIClient+ConversationModels.swift: meetingIdentity decodes only from explicit calendar_meeting_context / CalendarEventLink, never from the generated title — consistent with the matching rules.
  • Omi.entitlements / Omi-Release.entitlements / test-prepare-local-dev-entitlements.sh: adding the Calendar entitlement to both dev and release inputs, removing the duplicate NSCalendarsFullAccessUsageDescription key in Info.plist, and extending the fallback-generation test to assert the Calendar key survives all three signing paths is exactly the right hardening — and the FC-calendar-purpose-string-without-signing-entitlement.json failure-class entry documents the lesson.
  • ARCHITECTURE.md's evidence table is honest about what was not verified live; the composer tests (459 lines) are substantive rather than stubs.

Points for a maintainer before merge

  1. The Calendar TCC entitlement ships in the release signing inputs for every user of the signed app, even though the feature is opt-in and macOS-local. That's presumably deliberate (matching the entitlement to the app's real capabilities), but it deserves an explicit maintainer decision now rather than at pilot graduation.
  2. The Calendar purpose strings were reworded for all users — justified by the entitlement fix, but user-facing copy worth a skim.
  3. The decision/open-question heuristics are English-keyword based; non-English summaries will conservatively produce no card. Fine for a pilot, just worth knowing.
  4. Each refresh cycle fetches up to 100 completed conversations (bounded, owner-fenced) — acceptable for the pilot scale.

Overall the privacy posture is well done: opt-in, no calendar upload, citation-only facts, copy-only follow-up drafts that never send. The remaining questions are product-direction and release-entitlement sign-off rather than code defects — leaving those with a human maintainer before merge.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar
aryanorastar merged commit 2a46d6a into BasedHardware:main Oct 21, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants