Skip to content

fix: unify meeting summary rendering, edits, and evidence across clients - #14311

Merged
Git-on-my-level merged 8 commits into
mainfrom
codex/meeting-summary-contract
Sep 17, 2026
Merged

Git-on-my-level merged 8 commits into
mainfrom
codex/meeting-summary-contract

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Meeting summaries repeated their sections in macOS and mobile because overview already contained the complete section projection. This PR renders one primary document across macOS, mobile, web, copy/share, and daily recap generation. Existing edited overviews remain authoritative; identical generated projections use sections once so source links remain available.

  • Adds a shared 17-case selection contract covering whitespace, legacy and edited notes, sections-only records, repeated/blank headings, and missing/duplicate app IDs. Display and export share the same policy; secondary cards exclude the selected result by index.
  • Makes summary edits transactional, removes obsolete sections, and advances the server revision. Ambiguous app-result edits return 409; mobile also rejects stale or unattributed edit targets. Mobile clears old sections optimistically, restores their evidence on failure, and protects refreshed state from late rollback.
  • Validates generated section/action evidence against real transcript segment IDs, including legacy generation paths. Transcript edits atomically clear affected reference sets; macOS source links resolve only loaded transcript IDs and refresh when references change.
  • Persists sections and evidence through the actual SQLite migration/cache path. A stale response cannot restore intentionally cleared sections.
  • Renders settled macOS summaries and app results with heading hierarchy, nested/ordered lists, and hanging indents using the existing selectable AppKit view. Streaming chat retains its parser and separate cache key. Unknown app output keeps explicit app attribution.

Verification before PR creation:

  • macOS: complete app/test-bundle compilation and 84 focused Swift tests passed, including hosted production composition, a real mouse event activating the source Button, secondary app cards, text selection/resize, and actual SQLite round trips. Command: xcrun swift test --package-path desktop/macos/Desktop --skip-update --filter 'ConversationSummary|ConversationDetailRequest|MeetingSummaryPersistence|TranscriptionSessionRecord|SummaryDocumentProse|ChatProseRenderCache|ChatSelectableProse|OmiMarkdown', with isolated CFFIXED_USER_HOME and TMPDIR.
  • Backend: 669 tests across 23 affected files passed through BACKEND_UNIT_TEST_FILE_LIST=<file-list> BACKEND_PYTEST_WORKERS=1 bash backend/test.sh, using Python 3.11.15 and the locked environment. Includes transaction/read-before-write, source validation, exports, daily generation, lifecycle, and Typesense wiring checks.
  • Mobile: 41 focused Flutter tests passed through app/test.sh for parity, provider editing, regular/sliver summaries, attribution, and bottom-bar behavior.
  • Web: bun run check passed TypeScript, 498 tests in 89 files, and 5 Bun smoke tests.
  • Independent review was completed and its confirmed findings were fixed. All 45 repository manifest checks and the complete bounded pre-push gate passed on 64b4c79e92 before PR creation, including backend typing (0 errors), affected backend tests, OpenAPI/Flutter generated-code checks, and the macOS debug build.

The macOS tests used the installed Swift 6.4 toolchain. A separate three-line prerequisite commit applies explicit weak-capture syntax required by that compiler, preserving weak ownership. Release-pinned Xcode 26.6 is unavailable on this host. These checks exercised synthetic hosted views and isolated storage; installed-app acceptance, a physical mobile device, production services, and release packaging were not exercised. The updated conversation-detail e2e flow was statically validated, not run against an installed app.

Backend file list and mobile command

Backend file-list entries are relative to backend/:

tests/unit/test_summary_selection.py
tests/unit/test_conversation_summary_mutation.py
tests/unit/test_conversation_notes_v2.py
tests/unit/test_conversation_notes_v2_beta_rollout.py
tests/unit/test_conversation_structure_provider_timeout.py
tests/unit/test_conversation_structure_timezone.py
tests/unit/test_process_conversation_usage_context.py
tests/unit/test_process_conversation_free_tier_branch.py
tests/unit/test_process_conversation_duplicate_capture.py
tests/unit/test_share_email.py
tests/unit/test_share_email_routes.py
tests/unit/test_conversations_to_string.py
tests/unit/test_transcript_segment.py
tests/unit/test_conversation_revision_contract.py
tests/unit/test_conversation_typesense_index.py
tests/unit/test_client_processing_finalize.py
tests/unit/test_legacy_summary_source_refs.py
tests/unit/test_daily_summary_generation.py
tests/unit/test_free_tier_entrypoint_matrix.py
tests/unit/test_client_processing_acceptance.py
tests/unit/test_compact_speaker_transcript.py
tests/unit/test_wake_word.py
tests/unit/test_summary_lab.py

From app/:

bash test.sh test/parity/conversation_summary_selection_test.dart test/providers/conversation_detail_summary_selection_test.dart test/widgets/app_result_summary_source_label_test.dart test/widgets/conversation_summary_sections_test.dart test/widgets/conversation_bottom_bar_summary_test.dart

The revised decoder expectations follow the existing backend get_conversation_notes projection, which writes render_sections_markdown(structured.sections) into overview. The shared fixture and contract record that actual wire behavior. This is a compatibility repair; a versioned document/variant migration remains a separate architecture proposal.

Product invariants: INV-AUTH-1, INV-CHAT-1, INV-MEM-4, INV-TASK-2. Auth and chat mutation ownership, memory promotion, and task capture authority remain with their existing owners; this change controls summary representation and reference invalidation.

Failure-Class: FC-split-mutation-authority
The canonical selection policy and shared parity vectors prevent competing summary projections from being composed independently. Behavioral composition, persistence, and mutation tests guard the duplicate-summary incident; no additional static checker is introduced.

Line-Count-Exception: backend/database/conversations.py | 2375 -> 2442 | Keep atomic summary edits and transcript evidence invalidation at the existing Firestore mutation owner; extract the pure selection policy separately.
Line-Count-Exception: backend/routers/conversations.py | 2227 -> 2231 | Map ambiguous app-result mutation to an explicit 409 at the existing endpoint.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3167 -> 3190 | Supply actual segment identities and validate references at the existing final structured-output boundary.
Line-Count-Exception: backend/utils/llm/conversation_processing.py | 1873 -> 1903 | Share reference validation across notes and legacy generation paths while moving Markdown projection into the standalone policy module.
Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Components/OmiMarkdown.swift | 1716 -> 1728 | Thread document parsing mode through existing Markdown composition; implement block parsing in a separate small file.
Line-Count-Exception: desktop/macos/Desktop/Sources/Rewind/Core/RewindDatabase.swift | 3636 -> 3646 | Register the additive sections cache migration in the existing migration owner.

Review in cubic

Use the compiler-recommended explicit capture expression in three nested closures without changing their weak ownership. This allows the complete app and hosted summary tests to compile with the installed Swift 6.4 toolchain under warnings-as-errors.

Verified: full macOS app build and 84 focused Swift tests passed. The release-pinned Xcode 26.6 is not installed on this host.

Failure-Class: none
Stub the user data-protection policy lookup at its Redis boundary while exercising the real lifecycle decorators and Firestore writes. This closes an unintended external request exposed by the summary mutation verification.

Verified: all 53 Typesense tests and the 418-test focused backend suite pass using the locked backend environment.
Select one primary document with explicit app provenance; preserve user edits, source evidence and cached sections; render native Markdown blocks without duplicated projections. Align mobile, web, exports and daily recap eligibility using a shared 17-case contract.

Verification: 84 focused Swift tests and complete app compilation; 418 backend tests across 18 affected files; 36 Flutter tests; web TypeScript, 498 Vitest tests and 5 Bun smoke tests. Hosted views cover actual source activation, selection/resize and SQLite persistence. Release-pinned Xcode and installed-device acceptance are not claimed.

Failure-Class: FC-split-mutation-authority
Match the server mutation by clearing generated sections during a first-party summary edit and restoring them on failure. Capture the edited objects so a failed request cannot roll back a refreshed conversation or changed content.

Verified: 41 focused Flutter parity, provider and widget tests passed, including successful edits, preserved evidence on rollback, endpoint arguments, and refresh/newer-content races.

Failure-Class: FC-split-mutation-authority
Keep the free-tier entrypoint and client-processing acceptance fixtures compatible with the new structured-reference validator while preserving their isolated LLM boundary.

Verified: both affected backend files pass through backend/test.sh after reproducing their missing-import failure. Production validator behavior is covered by the dedicated source-reference tests.
Transcript segment identities are declared as Iterable[str]; retain empty-ID filtering without an unnecessary isinstance assertion rejected by the typed boundary.

Verified: backend typecheck passes with zero errors, and all 669 tests in the 23-file focused suite pass.

Failure-Class: none
The isolated conversation-processing fixture now loads the pure summary-selection module required by the production import, while preserving its dependency sandbox.

Verified: action-item date validation suite passes all 26 tests.

Failure-Class: none

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mixed area (app/backend/desktop/web), diff is 4122 lines -- far outside confidence-gate scope regardless of quality. Flagged author (Git-on-my-level, elevated scrutiny per memory) -- scanned diff, no .github/workflows, no eval/exec/secrets found. Approve only.

…-contract

# Conflicts:
#	desktop/macos/Desktop/Sources/AppState/AppState+Transcription.swift
@Git-on-my-level
Git-on-my-level merged commit b5b6547 into main Sep 17, 2026
58 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/meeting-summary-contract branch September 17, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants