Skip to content

feat(desktop): gather meeting screen evidence once, before notes - #19886

Merged
Git-on-my-level merged 32 commits into
mainfrom
lane/screen-evidence-desktop
Sep 30, 2026
Merged

Git-on-my-level merged 32 commits into
mainfrom
lane/screen-evidence-desktop

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Screen evidence, one pass (macOS side). Motivated by conversation 449565eb: a 1:1 Google Meet whose other participant's name was on their video tile the whole call, yet the notes said "the feedback user" and the roster said "You, Speaker 2".

  • One pass at finalization. For meeting sessions, ConversationFinalizationService now runs on-device frame selection and MeetingFrameJudge adjudication before it asks the backend to finalize, whenever the conversation id is known (every finalizeConversation call site in cloudReconcile). The pass is bounded at 20s and fails open. It goes through MeetingScreenshotsStore, so a note opened mid-run joins the same in-flight run and never starts a second adjudication. If the bound expires, the work keeps running in the background and the note picks up the result. Any failure is silent (for example a 409 because egress is off), and the note view then retries on open as before.
  • Empty evidence stamp. An empty selection now sends the empty adjudication instead of caching .noCapture locally. The server records the window as looked at, so a later open reads it back rather than selecting again. The stamp is sent only after a successful local read that genuinely found nothing. If Rewind's store could not be read, or the stamp request itself fails, the result is an uncached, retryable .failed with degraded telemetry, and nothing is stamped.
  • Retry after finalize. When the pre-notes pass fails, times out, or finds no trusted window, the Mac adjudicates again once the backend's finalization projection is terminal (completed, or 404 for an inline finalization). It does not act on the /finalize response, because that response can come back while Cloud Tasks is still processing. The retry uses the same schedule as the meeting-completion wake, and the two now share the delay constants. It is coalesced per conversation and not awaited. A run still in flight from the bound is joined through the shared store rather than repeated.
  • Unsealed Rewind chunk. Frames in the chunk still being written used to be dropped, which could permanently cut the meeting's last minute. The store now seals that chunk (RewindStorage.flushCurrentVideoChunk, the same finalize-and-continue flush used for power and memory transitions) and selects again. If frames are still unsealed, the run ends in a retryable .failed state: nothing is uploaded or cached, and the next load selects again.
  • Signed-URL expiry. The finalization pass now fills the session cache before the note is opened, so a cached set is only rendered while every signed URL has more than 5 minutes left. The server reports the true remaining lifetime. Otherwise the persisted set is read again. A thumbnail that fails to load triggers the same re-read, and failures from all tiles are coalesced into one.
  • Owner-bound uploads (product/invariants/auth-session.md, owner-bound background sync).
    • Every evidence upload binds one owner snapshot (MeetingEvidenceAuthorization) before it reads that owner's local stores. The snapshot is rechecked after each read and before each send, and the transport auth is bound to that owner. This covers the frame adjudication and empty stamp (MeetingFrameJudge, APIClient.adjudicateScreenFrames), the on-device identity upload (OnDeviceMeetingIdentityService, BackendDesktopMeetingUploader), and the meeting OCR flush (ScreenActivitySyncService.flushMeetingWindow, pushRows).
    • An owner change aborts. Nothing is uploaded and nothing is marked synced, the run is left uncached and retryable, and degraded telemetry is recorded with reason auth.
    • The meeting flush never delivers frame requests (the pixel claim and upload that can follow a sync response). An account switch during that delivery could pair one owner's pixels with another owner's headers. The backend returns recoverable requests on every sync response, so the periodic sync delivers them.
    • Known gap, follow-up task: the periodic screen-activity sync was already unbound before this PR and stays unchanged here. That covers its row pushes and its frame-request delivery (claimFrameRequests / uploadAndPromoteFrameRequests read Rewind pixels across awaits and upload them with headers minted earlier).
  • Terminal pass. After finalization is terminal, the pass runs again for every meeting whose pre-pass wasn't disabled, including one that settled. If a late STT tail widened the trusted window, the new window is judged. If the window is unchanged, the store's cache and persisted-set check make it a no-op.
  • Telemetry. A deadline expiry, a failed pre-notes, post-finalize or post-creation (/from-segments) pass, or a failed or deadline-stopped OCR flush (push or database) records degraded fallback telemetry (recordFallback, area meeting_screen_evidence, reason timeout or upload_failed). The user sees nothing.
  • localSegments. /from-segments writes notes synchronously, so the meeting adjudicates right after creation without blocking finalization. Screenshots then exist on every surface before the note is opened.
  • Bounded OCR flush. The lossless screen-activity sync holds a row until its 5-minute bucket closes, plus 5 to 15 minutes. That meant the backend screen-text digest never saw the end of the call. ScreenActivitySyncService.flushMeetingWindow compacts and pushes the meeting's own rows before notes: one winner per (app, window, bucket) inside the meeting, in batches of at most 100 (the sync route's limit), drained within the pass deadline. Legacy cursor sync is untouched.
  • Fingerprint parity with the server. The client window now follows _trusted_content_window / _selection_fingerprint exactly: microsecond started_at, timedelta microsecond rounding, and half-even millisecond rounding. The legacy tolerance is now the server's 30s; it was 60s. ISO8601DateFormatter truncates to milliseconds, so the note's fingerprint often differed from the one the server stamped. Every reopen then re-selected and re-uploaded frames the server had already judged.
  • Call-tile names. OnDeviceMeetingIdentityExtractor.callTileNames adds the rule from the backend's call_tile_names, pinned by the shared backend/tests/fixtures/meeting_identity/call_tile_vectors.json. A 2-to-4-token name line counts only if it recurs in 3 or more conferencing rows, and in at least 25% of them. The rule excludes the owner (a "(You)" tile, or a matching owner name or email), Tile names are read only from call-window rows. A "Meet - …" tab always counts. Any other conferencing window (a native video app or a conferencing marker) counts only if it shows call evidence: a call-control marker, or a meeting, call, webinar or huddle title. Teams chat lists and Zoom's home screen therefore do not count, a Meet URL in OCR alone does not count, and messaging apps never do. Agent tiles that pass every other rule, and that the roster's name classifier (ported as looksLikeAIAgentName) also calls agents, are uploaded as plain participant names after the people. The upload has no participant kind, so the backend roster types them as ai_agent by name. Title parts are compared without unread counters or trailing icons, and chrome is compared against the same app's other windows. Name keys use full Unicode case folding, the same as Python casefold(): "Groß" matches "Gross", and final and medial sigma match. AI agents are matched only by whole tokens (bot, chatbot, meetbot, notebot, notes, notetaker, ai, agent, assistant, recorder, companion, boardy, otter, fireflies, fathom, gemini, granola, tldv). "James Talbot" and "Alice Abbot" survive; "Tomorrow Inc - NoteTaker" does not, window-title parts, and browser chrome. It also brings the joiner-word and 200-character roster-line rules into parity.

Cross-lane dependency

Backend field (merged in #19911): the background passes never call GET /v1/conversations/{id}, whose first read runs deferred enrichment and first-open fanout. They read the server's trusted window from trusted_selection_fingerprint on GET /v1/conversations/{id}/screenshots instead (owner route, Optional[str], null when there is no trusted window). When it is null, the passes skip adjudication and the note view adjudicates on open.

Backend admission contract (#19932, merged): this PR implements the client side of the contract.

  • A meeting whose screenshots are on opens /v4/listen with screen_evidence=enabled. Nothing else sends it. The backend persists external_data.screen_evidence_pass=true, and only then holds the meeting's notes for up to 25s, waiting for this conversation's adjudication marker.
  • At stop the pre-notes pass runs in order:
    1. identity upload (POST /v1/calendar/meetings)
    2. the bounded OCR flush (8s of the 20s pass)
    3. POST /v1/screen-frame-egress/adjudications
  • Step 3 sends candidates: [] when selection finds nothing, or when every candidate's pixels are permanently gone (missing, corrupt or undecodable). That empty call only stamps the marker, so the stamp always means identity and OCR have landed. A transient pixel-read failure fails retryably and sends nothing. With no trusted window, nothing is stamped: the server does not wait on such a conversation.
  • If the pass fails, the server proceeds after its bound and the fallback telemetry still records it.

Deploy order: this desktop change must ship after the backend screen-evidence PR (#19911) is deployed. That PR admits in_progress/processing conversations with a trusted window. Before it lands, the pre-notes pass gets a silent 409, and only the post-finalize retry adds screenshots.

Self-audit: finalization entry paths

Every path goes through ConversationFinalizationService. Entry points:

  • AppState+Transcription: explicit stop, meeting end, 4-hour and max-duration rotation, automation stop.
  • TranscriptionRetryService: crash recovery and app-relaunch recovery, through recoverPendingFinalizations.

Order is always identity upload → OCR flush → adjudication/stamp → the backend call that writes notes. Retried attempts are idempotent:

  • The flush sends only rows that are still pending.
  • The store's session cache and persisted-set check skip any window already judged.
  • The terminal pass is coalesced per conversation.
Entry path Identity OCR flush Pre-notes adjudication After notes Tests
localSegments (/from-segments, stop / meeting end / crash) finalizeSession start in uploadLocalSegments, before the POST none: notes are written synchronously at creation, and there is no marker wait afterCreation, not awaited testLocalMeetingMaxDurationUploadPreservesMeetingRole
cloudReconcile, bound id, force allowed (stop, meeting end, relaunch retry) finalizeSession start beforeNotes beforeNotes on the server window, before /finalize terminal pass after terminal status testMeetingScreenEvidenceIsGatheredBeforeTheBackendWritesNotes, testASettledPrePassIsRejudgedWhenTheTerminalWindowGrew
cloudReconcile, bound id, no force (4-hour or max-duration rotation, automation stop) finalizeSession start beforeNotes beforeNotes, before the read terminal pass testMaxDurationRotationGathersEvidenceWithoutForceProcess
cloudReconcile, bound id conflicts with client id finalizeSession start beforeNotes beforeNotes on the client id; a 404 is .unbound, with no telemetry terminal pass testRetryingMeetingFinalizationRecoversExactIdAndWakesChat
cloudReconcile, unbound → force-process finalizeSession start beforeNotes, flush only (.unbound) none: the id is unknown before force-process terminal pass for the returned id covered through retryScreenEvidenceAfterFinalize
cloudReconcile, unbound → timestamp match finalizeSession start beforeNotes if the match gets finalized same as the bound case terminal pass; also when the match was already processed covered through completeTimestampMatchedConversation
Reconciliation exhausted → local-segments fallback (in finalizeCloudSession or markRetryableFailure) earlier in the same attempt in uploadLocalSegments none afterCreation —
Exhausted local fallback during recovery (finalizeExhaustedCloudSessionFromLocalSegments, skips finalizeSession) now uploaded here in uploadLocalSegments none afterCreation testRecoverPendingFinalizationsProcessesExhaustedBackendBoundLocalFallback
Crash recovery (.crashRecovery) and relaunch retry (.retry) same as whichever strategy row the session takes as above

"Terminal pass" means it runs after the finalization status is terminal.

Local database writes added by this PR

  • Screen-activity compaction and sync-state marks (flushMeetingWindow): each write holds an INV-AUTH-1 owner mutation lease through the commit (LocalMutationAuthorization.withCommitLease, require() inside the transaction). The owner is rechecked after the pool opens, after every read and before every push. Test: testMeetingFlushNeverMutatesRowsOnceTheOwnerLeaseIsRevoked.
  • Rewind chunk seal (flushCurrentVideoChunk, the existing mid-capture API): only while the captured owner is still current.
  • Screenshot session cache: in memory, keyed by conversation and window.
  • Transcription session rows: no new writes; the existing markSession* calls are unchanged.

Uploads. Each of these is owner-bound (captured before the read, rechecked before the send, auth bound to that owner):

  • the frame adjudication and empty stamp (MeetingFrameJudge)
  • the on-device identity upload
  • the OCR flush

Failure handling. Terminal outcomes are cached or stamped: .ready, .noCapture after a successful read, and pixels that are permanently gone. Everything else is an uncached, retryable .failed with no stamp:

  • an owner change
  • an unreadable store or a transient pixel read
  • an unsealed chunk
  • any network or HTTP failure, including of the stamp itself

Telemetry. Degraded meeting_screen_evidence fallbacks cover:

  • timeout
  • failed reads and local conditions (other)
  • upload failures (upload_failed)
  • an owner change (auth)
  • a flush that stopped early

They are labelled before_notes→after_finalize, after_finalize→note_open, after_creation→note_open or ocr_flush→periodic_sync. An expected unbound call or a probed 404 records nothing.

Failure class

Failure-Class: none

The fix(desktop) commit corrects defects that review found in this PR's own, not-yet-merged code: the early cache fill and the tile-name key folding. It does not fix a shipped failure.

Test plan

  • xcrun swift build -c debug --package-path Desktop --build-tests (Xcode 27 locally; CI pins 26.6)
  • swift test --filter 'Conversation|Transcription|Meeting|ScreenActivity|Calendar': 676 tests, 0 failures
    • MeetingScreenEvidencePassTests:
      • client fingerprints equal the backend's own functions' output for 7 generated vectors
      • finalization adjudicates once, and a later note (session cache cleared) loads the persisted set with no re-selection or re-adjudication
      • a note opened mid-run joins the running adjudication
      • the bound expires without waiting
      • failures are silent, and the flush still runs
    • TranscriptionFinalizationStateMachineTests.testMeetingScreenEvidenceIsGatheredBeforeTheBackendWritesNotes: adjudication runs on the server window with 0 POSTs issued, and the GET conversation precedes POST finalize
    • OnDeviceMeetingIdentityCallTileTests: all 14 shared backend vectors pass (run with OMI_CALL_TILE_VECTORS_PATH pointing at the backend lane's fixture), plus inline incident, owner, agent and threshold cases
    • ScreenActivityLosslessSyncTests.testMeetingFlushShipsTheOpenBucketsWinnerInsideTheMeetingOnly
  • Not exercised: a named-bundle live meeting against dev. That is unit and integration-hermetic coverage only.

🤖 Generated with Claude Code

Git-on-my-level and others added 2 commits September 30, 2026 10:05
Meeting screenshots were selected and adjudicated only when a note was
opened, long after the notes were written, and the on-device roster
dropped names that appear only on video tiles (conversation 449565eb).

- Finalization runs on-device frame selection + adjudication for meeting
  sessions before asking the backend to finalize (cloudReconcile, when the
  conversation id is known), bounded at 20s and fail-open. The run goes
  through MeetingScreenshotsStore, so a note opened mid-run joins it.
- /from-segments meetings adjudicate right after creation (not awaited).
- A bounded OCR flush pushes the meeting's own screen-activity rows before
  notes so the backend screen-text digest sees the end of the call.
- The selection window/fingerprint now follows the server's arithmetic
  (microsecond started_at, half-even rounding, 30s legacy tolerance), so
  the note reuses the persisted set instead of re-adjudicating.
- Call-tile name rule in OnDeviceMeetingIdentityExtractor, in parity with
  the backend's call_tile_names and its shared test vectors; owner and AI
  agent tiles are excluded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T09:10:18.209233Z cb8ee76 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65fbd6aec4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +436 to +439
_ = await screenEvidencePass.beforeNotes(
captureInterval: Self.captureInterval(of: session),
conversationID: conversationId,
fetchConversation: { try await client.getConversation(id: conversationId) })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Admit in-progress conversations before adjudicating

For a normal cloud meeting, the conversation is still in_progress while this pass runs, but backend/routers/screen_frames.py:83-84 rejects every adjudication unless the conversation is already completed. The store therefore records a 409 failure, line 441 finalizes the conversation, and no post-completion pass is scheduled, so screenshots are still selected only when the note is later opened. Coordinate the backend admission change with this call or explicitly retry after finalization.

Useful? React with 👍 / 👎.

_ = await screenEvidencePass.beforeNotes(
captureInterval: Self.captureInterval(of: session),
conversationID: conversationId,
fetchConversation: { try await client.getConversation(id: conversationId) })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid the enriching detail read before evidence settles

When recovery reaches an already completed deferred conversation, this GET is not read-only: backend/routers/conversations.py:999-1002 synchronously calls _enrich_deferred_conversation, which writes the notes. Because the OCR flush runs concurrently and screenshot adjudication happens only after this fetch returns, that recovery path can generate notes before either source of evidence is ready, violating the ordering this helper promises. Fetch the transcript through a non-enriching projection or otherwise suppress deferred first-open processing here.

Useful? React with 👍 / 👎.

// Notes are already written by `/from-segments`; adjudicate now so the screenshots exist on
// every surface before anyone opens the note. Nothing waits for it.
let pass = screenEvidencePass
Task { _ = await pass.afterCreation(conversation: hydrated) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Finalize the active video chunk before the eager pass

When Rewind capture is running, VideoChunkEncoder continuously keeps a 60-second chunk open, and MeetingFrameSelector deliberately drops every frame in that current chunk because it has no finalized movie metadata (MeetingFrameSelector.swift:208-209,281-283). Starting adjudication immediately after conversation creation therefore commonly excludes the meeting's final minute; if any older candidate is committed, the server stamps the selection fingerprint and later note opens treat the pass as complete, so those tail frames are never reconsidered after the chunk finalizes. Flush/wait for the active chunk or arrange a retry after rotation before recording the pass as settled.

Useful? React with 👍 / 👎.

/// captured after the meeting ended stay pending and may later ship one more winner for that
/// bucket; that bounded extra document is the price of notes that see the end of the call.
/// Legacy (cursor) sync is left alone. Best effort: every failure leaves the periodic path to it.
func flushMeetingWindow(_ interval: DateInterval, limit: Int = 200) async {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep meeting flush batches within the server limit

For a meeting that produces 101–200 compacted (app, window, bucket) winners, this default allows all of them to be sent in one pushRows request, while backend/routers/desktop_screen_crisp.py:110-111 rejects any request containing more than 100 rows. The flush then returns without marking anything synced and finalization proceeds, so none of that meeting's newly flushed OCR is available to the notes; periodic sync may deliver it later, but too late for this processing pass. Cap this fetch at 100 or split the candidates into server-sized batches.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 3 commits September 30, 2026 10:17
…ken agent markers

Review follow-ups for #19886:
- Retry adjudication right after the backend finalizes when the pre-notes
  pass failed, timed out, or had no trusted window (and after force-process
  reveals the id), joining any run still in flight through the shared store.
- Record degraded fallback telemetry when the pre-notes deadline expires or
  the pass fails (area meeting_screen_evidence).
- AI-agent tile markers are whole tokens only, so Talbot/Abbot survive.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ddde49564

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +353 to +358
let hydrated = await hydrateUploadedLocalConversation(id: response.id)
if bundle.session.conversationRole == .meeting, let hydrated {
// Notes are already written by `/from-segments`; adjudicate now so the screenshots exist on
// every surface before anyone opens the note. Nothing waits for it.
let pass = screenEvidencePass
Task { _ = await pass.afterCreation(conversation: hydrated) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Flush OCR for cloud-to-local fallback uploads

When an exhausted meeting reaches resolveExhaustedCloudReconciliation(.uploadLocalSegments), it calls uploadLocalSegments directly and bypasses the beforeNotes flush that only runs in the normal .localSegments switch. Because /from-segments writes the notes before this new afterCreation task runs, recovered meetings can still generate notes without their pending end-of-call OCR; centralize the pre-upload flush in uploadLocalSegments or invoke it from the exhausted fallback path.

Useful? React with 👍 / 👎.

Comment on lines +108 to +109
default:
break

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Record every fail-open evidence outcome

When the pre-notes conversation GET fails (.conversationUnavailable) or its transcript window is untrusted (.untrustedWindow), this default branch lets finalization proceed without screen evidence and silently switches correctness to the post-finalize retry, but emits no fallback event. These are explicit fail-open paths just like the timeout and upload failure handled above, so record bounded degraded telemetry for them as required.

AGENTS.md reference: desktop/macos/AGENTS.md:L50-L51

Useful? React with 👍 / 👎.

Git-on-my-level and others added 2 commits September 30, 2026 10:35
…unk, flush telemetry

Second review round for #19886:
- Post-finalize adjudication waits for the terminal finalization projection
  (shared schedule with the meeting-completion wake), not the /finalize POST.
- Seal Rewind's active chunk and reselect before judging; if frames are still
  unsealed, fail retryably without uploading or caching .noCapture.
- OCR flush push/database failures record degraded fallback telemetry.
- Call-tile rows follow the backend's updated call-window rule (shared vectors).
- A screenshots-disabled pass never schedules a retry.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 022a3c8435

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +222 to +223
if let task { await task.value }
return phase

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Retry after a joined adjudication fails

When beforeNotes times out while its adjudication remains in flight, afterFinalize joins that task through the shared inFlight entry. If the original request subsequently fails, run caches nothing, so the joining store's adopt(nil) leaves its phase at .idle; the newly added loadAndWait then returns .idle here and afterFinalize exits without ever starting the intended retry. This can occur when the adjudication exceeds the 20-second bound and later times out or returns an error, leaving screenshots absent until someone opens the note. After joining, propagate the failed terminal result and launch a fresh adjudication rather than treating the idle phase as settled.

Useful? React with 👍 / 👎.

Comment on lines +354 to +355
let hydrated = await hydrateUploadedLocalConversation(id: response.id)
if bundle.session.conversationRole == .meeting, let hydrated {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Retry local-meeting evidence when hydration fails

After /from-segments succeeds, the session is already marked completed, but a transient failure in this follow-up conversation GET makes hydrateUploadedLocalConversation return nil and skips afterCreation. Completed sessions are not revisited by finalization recovery, so this meeting never gets the new eager screenshot pass unless the note is later opened on this Mac; other surfaces continue to see no frames. Schedule a retry using the returned conversation ID instead of making the one-pass behavior conditional on a single successful hydration request.

Useful? React with 👍 / 👎.

Comment on lines +315 to +319
ownerEmails.compactMap { email -> String? in
let folded = email.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
guard folded.contains("@") else { return nil }
return folded.split(separator: "@", maxSplits: 1, omittingEmptySubsequences: false).first.map(String.init)
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Strip email plus tags before matching the owner

For an owner email such as [email protected], this preserves david.zhang+work as the local part and the later punctuation removal produces davidzhangwork, which does not match the tile name David Zhang. If the account has no display name and the tile lacks a (You) marker, the new extractor therefore adds the signed-in user as another participant and can misattribute the meeting notes. Remove the +tag suffix before normalizing the local part.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5396e8d3ab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 661 to 665
if DesktopConversationMatchPolicy.shouldFinalizeTimestampMatchedConversation(status: match.status) {
conversation = try await apiClient.finalizeConversation(id: match.id)
conversation = try await finalizeBackendConversation(id: match.id, session: session)
} else {
conversation = match
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Run evidence for already-completed reconciliation matches

When an unbound cloud meeting is reconciled to an already-completed timestamp match, this branch accepts match and immediately marks the local session completed without invoking either beforeNotes or afterFinalize. Completed sessions are excluded from recovery, so this path never performs the new eager screenshot pass and screenshots remain absent until the note is opened; schedule the post-finalization evidence pass for completed meeting matches.

Useful? React with 👍 / 👎.

Comment on lines +387 to +393
private static func isCallWindowRow(_ snapshot: MeetingScreenActivitySnapshot) -> Bool {
let app = snapshot.appName.lowercased()
if tileMessagingApps.contains(where: app.contains) { return false }
if nativeVideoApps.contains(where: app.contains) { return true }
let title = cleanLine(snapshot.windowTitle ?? "").lowercased()
return firstMatch(meetTabTitle, in: title) != nil
|| conferencingMarkers.contains(where: "\(app) \(title)".contains)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict native-app rows to actual call windows

For native clients, every Zoom, Teams, Webex, or FaceTime window is classified as a call window solely from appName. If someone uses a Teams chat/channel window during a meeting, persistent sidebar names can satisfy the three-row/25% tile threshold and be uploaded as meeting participants, corrupting attribution in the generated notes. Require call-specific title or control evidence for native-app rows instead of admitting the entire application.

Useful? React with 👍 / 👎.

Comment on lines +137 to +139
let outcome = await adjudicate(conversationID: conversationID, fetchConversation: fetchConversation)
log("MeetingScreenEvidence: after-finalize pass for \(conversationID) -> \(outcome)")
return outcome

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Record failed post-finalization evidence fallbacks

When the post-finalization retry's conversation GET fails, its transcript window is still untrusted, or adjudication returns .failed, this method returns that terminal outcome to an unobserved background task and only writes a local log. The completed session is no longer recovered, so correctness has silently fallen back to retry-on-note-open; emit bounded recordFallback telemetry for this after_finalize → note_open fail-open just as afterCreation does.

AGENTS.md reference: desktop/macos/AGENTS.md:L50-L51

Useful? React with 👍 / 👎.

Comment on lines +249 to +250
let losslessEnabled = await MainActor.run { ScreenActivityLosslessSyncFeature.isEnabled }
guard losslessEnabled, let dbPool = await getDBPool() else { return }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Flush meeting OCR on the stable sync path

On stable production bundles where screen_activity_lossless_sync has not been explicitly enabled, this guard makes the new pre-notes OCR flush a no-op. Those users remain on the legacy cursor path, which does not close and text-sync the meeting's open buckets here, so the backend writes notes without the recent screen text this change is intended to provide. Add a legacy-compatible flush or make this bounded text upload independent of the lossless rollout flag.

AGENTS.md reference: desktop/macos/AGENTS.md:L228-L231

Useful? React with 👍 / 👎.

+ "\(selectionWindow.start) -> \(selectionWindow.end)")

let outcome = await selectCandidates(selectionWindow)
var outcome = await selectCandidates(selectionWindow)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not cache selector unavailability as no capture

During launch recovery or a transient database read failure, MeetingFrameSelector.selectCandidates returns an empty Outcome when SpineScreenIndex.poolWhenReady() times out or its query throws. This eager call then treats that as a genuine empty meeting, caches .noCapture, and reports a settled outcome, which suppresses the post-finalization retry and prevents a later note open in the same app session from selecting frames after the database recovers. Preserve an unavailable/failed selector outcome instead of caching it as an empty capture.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 5 commits September 30, 2026 11:30
…name keys

Cross-PR review with #19911:
- A cached screenshot set is rendered only while its signed URLs outlive a
  5-minute margin; otherwise the persisted set is re-read. A failed
  thumbnail load triggers one coalesced re-read.
- Call-tile owner/candidate keys use full Unicode case folding (Python
  casefold parity: ß/ss, final sigma).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… rules

Tile rows need per-window call evidence unless they are a Meet tab; agent
tiles the roster classifier agrees on join the upload as names (the roster
types them ai_agent). Parity with the 23 shared vectors on #19911.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd58610a42

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// Legacy (cursor) sync is left alone. Best effort: every failure leaves the periodic path to it.
func flushMeetingWindow(_ interval: DateInterval, limit: Int = 200) async {
let losslessEnabled = await MainActor.run { ScreenActivityLosslessSyncFeature.isEnabled }
guard losslessEnabled, let dbPool = await getDBPool() else { return }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Record the unavailable OCR database fallback

When RewindDatabase.initialize() fails or no effective-owner pool is available, getDBPool() returns nil and this guard silently skips the pre-notes OCR flush while finalization continues. That is a fail-open correctness path, but unlike SQL and upload failures below it emits no recordFallback, leaving operators unable to distinguish successful evidence collection from notes generated without recent OCR; record a bounded database-unavailable fallback before returning.

AGENTS.md reference: desktop/macos/AGENTS.md:L50-L51

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 221adc5416

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 555 to 558
if allowForceProcess {
conversation = try await apiClient.finalizeConversation(id: backendId)
conversation = try await finalizeBackendConversation(id: backendId, session: session)
} else {
conversation = try await apiClient.getConversation(id: backendId)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Schedule evidence for completed non-force bindings

When a meeting has a bound backend ID and allowForceProcess is false, an already-completed conversation is accepted through this GET branch and the local session is immediately marked completed without running either beforeNotes or afterFinalize. Several normal stop/rotation callers explicitly pass false, and completed sessions are excluded from finalization recovery, so these meetings never receive the new eager screenshot pass and remain dependent on someone later opening the note on this Mac. Schedule the post-finalization evidence pass when this branch observes a completed meeting.

Useful? React with 👍 / 👎.

Comment on lines +445 to +446
let tokens = Set(words.map { $0.trimmingCharacters(in: CharacterSet(charactersIn: ".'’-")) })
if !tokens.isDisjoint(with: rosterAgentTokens) { return true }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match the backend's AI-agent classifier

For persistent agent tiles such as Otter Bot, Meetbot Recorder, or Fathom Assistant, this token rule classifies the name as an agent and therefore uploads it through callTileAgentNames. However, the receiving classifier in backend/utils/conversations/meeting_participants.py:284-295 has no equivalent generic token rule—those examples match neither its exact-name, first-token, nor phrase checks—so it records them as human participants and can attribute their activity to people in the notes. Mirror the backend predicate exactly or transmit an explicit participant kind.

Useful? React with 👍 / 👎.

Comment on lines +381 to +383
let elsewhere = nonCallRows.filter { row in
row.combinedText.components(separatedBy: .newlines).contains { tileName(cleanLine($0)) == name }
}.count

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Case-fold the non-call chrome comparison

When OCR renders the same persistent browser label with different capitalization in call and non-call rows, this exact string comparison fails to recognize it as recurring chrome even though call-row counts and the rest of the tile identity keys are case-folded. For example, repeated Acme Support call rows and Acme SUPport non-call rows both pass tileName, but the latter never contributes to elsewhere; the label can then pass the persistence threshold and be uploaded as a meeting participant. Compare the extracted names using the same case-folded key used for counting.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 2 commits September 30, 2026 12:13
…s; batch OCR flush

Final review round for #19886:
- Background screen-evidence passes read the server's trusted selection
  window from the screenshots route (trusted_selection_fingerprint) instead
  of the conversation detail route, which runs deferred enrichment and
  first-open fanout. Absent the field, they skip and the note adjudicates.
- The meeting OCR flush ships batches of at most 100 rows (the sync route's
  limit) and drains within the pass deadline, recording degraded telemetry
  when it stops early.
- A failed post-finalize pass records degraded telemetry (to note_open).

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb0369b2cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +185 to +186
try await client.getConversationScreenFrames(conversationID: conversationID).trustedSelectionFingerprint
.flatMap(MeetingScreenshotSelectionWindow.init(serverFingerprint:))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Populate the trusted selection fingerprint endpoint

For every cloud meeting, this read currently resolves to nil: the commit adds trustedSelectionFingerprint only to the Swift wire type, while backend/models/screen_frame.py::ConversationScreenFrameSet and backend/utils/screen_frames/enforcement.py::build_frame_set_response neither define nor populate trusted_selection_fingerprint. Consequently both the pre-notes pass and its post-finalization retry return .untrustedWindow without adjudicating, so the new eager screenshot flow remains dependent on opening the note. Add the trusted window to the backend response (or derive it through an existing side-effect-free API) in the same change.

Useful? React with 👍 / 👎.

…de on failed window reads

Post-merge review of #19886:
- The bounded meeting OCR flush now runs inside uploadLocalSegments, so the
  exhausted-cloud-reconciliation fallback upload gets it too.
- An unbound pre-notes call (no conversation id yet) is `.unbound` and
  records nothing; a failed screenshots-window read is
  `.conversationUnavailable` and records degraded fallback telemetry.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3b9ab1a60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let pass = screenEvidencePass
let client = apiClient
Task { [weak self] in
if await Self.awaitTerminalFinalization(conversationID: conversationID, client: client) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Record exhausted finalization polling as a fallback

When the finalization projection remains nonterminal through the full polling schedule, or every status read transiently fails, awaitTerminalFinalization returns false and this task only clears its coalescing key. The local session has already been completed, so no subsequent automatic evidence attempt is scheduled and correctness silently falls back to retry-on-note-open; emit a degraded recordFallback event before abandoning this retry.

AGENTS.md reference: desktop/macos/AGENTS.md:L50-L51

Useful? React with 👍 / 👎.

Comment on lines +72 to +74
let tiles =
callTileNames(in: snapshots, ownerNames: ownerNames, ownerEmails: ownerEmails)
+ callTileAgentNames(in: snapshots, ownerNames: ownerNames, ownerEmails: ownerEmails)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Sample call tiles across the full meeting

For meetings longer than the provider's 240-row window, these extractors do not actually evaluate the full interval: RewindMeetingScreenActivityProvider requests only 240 screenshots, and RewindDatabase.getScreenshots returns them newest-first. At the default three-second capture cadence this is roughly the final 12 minutes, so a participant who was visible earlier and left before that tail is absent from both the tile candidates and the ordinary participant extraction, causing the new identity evidence to omit them. Query or sample across the entire meeting interval before applying the persistence threshold.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 2 commits September 30, 2026 13:19
)

- Meeting listen sessions with screenshots on declare screen_evidence=enabled.
- Pre-notes order is identity upload, then the bounded OCR flush, then the
  adjudication call, whose marker therefore means all three landed.
- An empty selection, unreadable candidates, or no trusted window send the
  empty-candidates stamp instead of nothing.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bc1158d9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

role: MeetingConversationBoundaryPolicy.Role, screenshotsEnabled: Bool
) -> [URLQueryItem] {
guard role == .meeting, screenshotsEnabled else { return [] }
return [URLQueryItem(name: "screen_evidence", value: "enabled")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wire the evidence declaration into the backend

This query item currently has no effect: backend/routers/transcribe.py:180-201 does not declare a screen_evidence parameter, ListenRequest has no corresponding field, and a repo-wide search finds no notes-admission consumer. Consequently, when the 20-second client pass times out, /finalize can start note generation immediately while adjudication continues in the background, so the resulting notes omit the late screen evidence despite this code claiming a bounded server wait.

Useful? React with 👍 / 👎.

Comment on lines +407 to +408
phase = .noCapture
Self.cache[cacheKey] = ([], nil, notes)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve empty-stamp failures as retryable

When selection legitimately returns zero candidates but the required empty adjudication fails because of a transient network/server error, this catch converts that failure into .noCapture and caches it. Outcome.needsRetryAfterFinalize treats .noCapture as settled, and a later note open reads the cache, so the server never receives the adjudication marker and neither automatic path retries; return .failed without caching instead so the retry and degraded fallback telemetry run.

AGENTS.md reference: desktop/macos/AGENTS.md:L50-L51

Useful? React with 👍 / 👎.

Git-on-my-level and others added 6 commits September 30, 2026 14:26
…r cache a failed stamp

- MeetingFrameSelector reports an unavailable Rewind pool or failed query as
  localReadFailed; the store returns an uncached retryable failure and never
  sends the empty stamp for it.
- A failed empty-stamp request is an uncached .failed (retry + degraded
  telemetry), not a cached .noCapture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…inal window

- One owner snapshot per evidence run, captured before reading that owner's
  Rewind/OCR data, rechecked after reads and before each upload, and bound
  into transport auth: frame adjudication and empty stamp, on-device identity
  upload, and the meeting OCR flush. An owner change aborts with degraded
  (auth) telemetry and nothing sent or marked.
- After finalization is terminal, run the terminal pass even when the
  pre-pass settled, so a window widened by a late STT tail is judged; an
  unchanged window is a cache/persisted-set no-op.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d4627a38d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +59 to +62
if wire.isEmpty && !bounded.isEmpty {
// Chunks aged out between selection and upload: nothing to offer, but the pass is done.
log("MeetingFrameJudge: no candidate had readable pixels; sending the empty evidence stamp")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep unreadable candidate sets retryable

When selection produced candidates but every pixel read fails—for example, because a just-sealed chunk is temporarily unreadable—this branch sends an empty adjudication anyway. The backend then stamps the current fingerprint and MeetingScreenshotsStore.apply caches .noCapture, suppressing both the post-finalization and note-open retries even if the pixels become readable; the settled result also bypasses fallback telemetry. Preserve this as a retryable read failure and reserve the empty stamp for a genuinely empty selector result.

AGENTS.md reference: desktop/macos/AGENTS.md:L50-L51

Useful? React with 👍 / 👎.

Comment on lines +302 to +305
guard await push(candidates.map(\.payload)) else {
log("ScreenActivitySync: meeting flush push failed; periodic sync will retry")
recordFallback("upload_failed")
return .pushFailed(synced: synced)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Separate OCR delivery from frame-request follow-up

For a meeting with multiple OCR batches, if /v1/screen-activity/sync returns 200 after storing the first batch but one of its returned frame-request claim/upload/promote operations fails, pushRows returns false here. The flush consequently stops before sending later batches and leaves the accepted first batch locally pending, so note generation can miss every remaining OCR row until periodic sync runs. Treat successful OCR delivery separately from the optional frame-request follow-up when deciding whether to continue and mark this flush batch.

Useful? React with 👍 / 👎.

Comment on lines +423 to +427
static func screenEvidenceQueryItems(
role: MeetingConversationBoundaryPolicy.Role, screenshotsEnabled: Bool
) -> [URLQueryItem] {
guard role == .meeting, screenshotsEnabled else { return [] }
return [URLQueryItem(name: "screen_evidence", value: "enabled")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep OCR admission independent of screenshot settings

For a cloud meeting whose screenshot setting is off, this guard omits the evidence declaration even though MeetingScreenEvidencePass.beforeNotes still flushes OCR and explicitly intends that text to serve the notes. Socket teardown can start backend capture-end finalization before the client reaches its explicit finalize call, and the backend evidence wait is non-applicable without this declaration (and currently also skips accounts with screenshots off), so end-of-call OCR and identity uploads can arrive after notes are written. Add a declaration/marker for non-image evidence or otherwise coordinate the backend wait independently of the screenshot setting.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 5 commits September 30, 2026 15:15
…indows

- MeetingFrameJudge distinguishes permanently missing pixels (not found,
  corrupt, undecodable) from retryable read failures; a retryable failure
  throws, so nothing is stamped and the store stays uncached and retryable.
- The pre-notes pass no longer stamps a conversation with no trusted
  window (the server 409s it and no longer waits on it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd every recovery path

- Meeting OCR flush compaction and sync-state writes hold an INV-AUTH-1
  owner mutation lease through commit, with the owner re-required inside the
  transaction and rechecked after the pool opens.
- Evidence gathering no longer depends on force-process permission: 4-hour
  and max-duration rotations run the pre-notes pass and the terminal pass.
- Audit fixes: identity upload on the exhausted local-fallback recovery path;
  terminal pass for already-processed timestamp matches; a probed 404 id is
  unbound (no telemetry); never seal a replacement owner's Rewind chunk.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ests

Frame-request delivery reads Rewind pixels across further awaits, where an
account switch could pair one owner's pixels with another's headers. The
backend returns recoverable requests on every sync response, so the periodic
sync delivers them.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e82f78d9b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +409 to +412
.task(id: Self.isFailure(phase)) {
guard Self.isFailure(phase), !reportedUnavailable else { return }
reportedUnavailable = true
onContentUnavailable?()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reset thumbnail retry state after refreshing its URL

When expired thumbnails all fail together, each tile sets reportedUnavailable before the coalesced refreshPersistedSet() finishes. If that single refresh request fails transiently, or the replacement URL also fails, the flag remains true even when frame.thumbnailURL later changes because ForEach preserves the tile by frame ID. Further failures therefore never request another refresh, leaving placeholders until the note view is recreated; reset this state when the URL changes or after a failed refresh.

Useful? React with 👍 / 👎.

Comment on lines +674 to +676
guard authorization.isCurrent else {
log("OnDeviceMeetingIdentity: signed-in account changed; identity not uploaded")
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Record the identity owner-change fallback

When the account changes while snapshots or owner identity are being read, this new guard only logs and returns; the enclosing finalization path then proceeds without the meeting identity and provides no bounded health event explaining that degraded evidence pass. Record this auth fallback before returning, as required for fail-open paths.

AGENTS.md reference: desktop/macos/AGENTS.md:L50-L51

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb8ee7613c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +206 to 210
if let authorizationSnapshot, !RuntimeOwnerIdentity.isAuthorizationCurrent(authorizationSnapshot) {
throw AuthError.userChangedDuringRequest
}
let baseURL = await apiClient.baseURL
let generatedClient = OmiAPI.OmiApiClient(baseURL: baseURL, headers: headers)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Revalidate the owner immediately before the identity upload

When the account changes during await apiClient.baseURL, the last authorization check has already passed, so the generated client can still send owner A's meeting identity with owner A's cached headers after that authorization generation was revoked. This contradicts the method's owner-bound guarantee and allows an upload to continue after sign-out or an A→B switch; recheck the snapshot after this await and immediately before invoking the generated request.

Useful? React with 👍 / 👎.

Comment on lines +407 to +409
// Keyed on failure, not on appearance: the placeholder is already on screen
// while loading, so it does not re-appear when the load then fails.
.task(id: Self.isFailure(phase)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow another refresh after a transient URL refresh failure

When an expired thumbnail triggers this task but refreshPersistedSet() fails transiently, reportedUnavailable remains true even though the frame still has the same unusable URL. Because this tile instance will never invoke onContentUnavailable again, it remains a placeholder for the rest of the open note despite the network recovering; reset the one-shot state when the refresh fails or otherwise schedule a bounded retry.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 1d01244 into main Sep 30, 2026
49 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/screen-evidence-desktop branch September 30, 2026 09:24
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.

1 participant