Skip to content

feat(backend): bounded screen-evidence admission before desktop meeting notes - #19932

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

Git-on-my-level merged 9 commits into
mainfrom
lane/screen-evidence-admission

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Why

Follow-up to #19911 (screen evidence in one pass), found in review of desktop #19886.

On a cloud-STT desktop meeting stop, the Mac closes the listen socket first. routers/listen/runtime.py teardown then admits finalization immediately, so notes were written before the Mac's pre-notes evidence pass landed (screenshot adjudication, meeting identity upload, OCR flush). The on-device meeting identity upload already raced the same way.

What changes

Bounded evidence admission (utils/conversations/meeting_evidence_admission.py, called from finalize_persisted_conversation):

  • Where it runs: in the shared finalizer, so pusher (the live listen path, inline dispatch), the Cloud Tasks worker, and POST /finalize (via Cloud Tasks) all get it.
  • When it waits: before processing a not-yet-completed conversation, only when all of these hold:
    • the trigger is capture_end or client_finalize;
    • the conversation is source == desktop with external_data.conversation_role == 'meeting' AND external_data.screen_evidence_pass == true: the desktop declared the pre-notes pass for this meeting (released desktop builds never run it, so they never wait);
    • MEETING_NOTES_EVIDENCE_WAIT_SECONDS > 0;
    • the host has BUCKET_SCREEN_FRAMES set (no bucket means frame evidence would not be read anyway);
    • the account's meeting_note_screenshots_enabled is on.
  • When it proceeds:
    • as soon as this bucket's adjudication marker is set and its selection fingerprint equals the fingerprint of the conversation's current trusted content window. The window is recomputed from a bounded read of the conversation on every poll, using the same helpers the adjudication route uses, now shared in utils/conversations/screen_content_window.py. A marker stamped mid-meeting for an earlier window is stale and keeps the wait going until the Mac's pass for the extended window lands;
    • otherwise at the bound, 25 s by default and capped at 60 s;
    • on any error it proceeds without evidence and never fails finalization.
  • Fresh row after the wait: after any wait outcome (present, arrived, timed_out or error), the finalizer reloads and deserializes the durable conversation and re-runs its admission (_load_admitted_conversation) before processing. A row deleted or completed by another owner meanwhile follows the existing fence/replay path. Tail segments that land during the wait are summarized, and the pre-wait snapshot never reaches process_conversation, whose persist could otherwise overwrite the newer live transcript.
  • Marker ordering: persistence (persist_enforced_frames) is split from response construction (build_frame_set_response). The route stamps the marker between them, for approved, all-rejected and empty passes alike. A failure building the response (URL signing) therefore never leaves persisted frames unmarked. The response still carries the fresh stamp and fingerprint, so client re-adjudication semantics are unchanged.
  • Bounded reads: every Firestore read runs under asyncio.wait_for with the remaining budget. The RPC itself gets timeout=remaining, retry=None, so a slow or hung read cannot outlive the bound; it proceeds as timed_out.
  • Threads and pool: the wait is async. Each 2 s poll is one Firestore read on db_executor, and the sleep holds no thread, following the pool rules in backend/AGENTS.md.
    • The finalization job lease is 25 min, and listen's pending-request timeout is 120 s, so neither is affected.
  • Observability: proceeding without evidence records record_fallback(component='conversation_finalization', outcome='degraded'), with reason timeout when evidence never arrived or a read hit the deadline, and other on a read error. Metric meeting_notes_evidence_wait_total{outcome=present|arrived|timed_out|error} plus a log line with the time waited. not_applicable returns are not counted.
  • Not waited: reprocess, first-open, merge, and server-recovery triggers, and completed replays.

Config: MEETING_NOTES_EVIDENCE_WAIT_SECONDS is '0' in base and '25' in the dev and prod overlays and charts, on the process-conversation hosts (backend-listen, pusher, Cloud Run backend, backend-sync). It is classified in deployment-setting-classification.json and listed in the pusher co-host env diff. In prod it has no effect until BUCKET_SCREEN_FRAMES is set on the finalizer hosts.

Desktop contract (the desktop lane implements it):

  1. Declare the pass. Open /v4/listen for a meeting with conversation_role=meeting&screen_evidence=enabled. The server persists external_data.screen_evidence_pass = true at conversation creation, only for the meeting role. Without it, finalization never waits.
  2. Report completion. Finish the pre-notes pass in this order: identity upload (POST /v1/calendar/meetings), then the OCR flush, then POST /v1/screen-frame-egress/adjudications for the backend conversation id.
    • Send the chosen candidates, or an empty candidates: [] when selection yields nothing.
    • An empty list means "evidence pass done, nothing to offer". The server makes no judge call and writes no bytes. It runs the same admission checks (egress, ownership, status or trusted window, account setting) and the capture-window check, stamps this bucket's adjudication marker with the selection fingerprint, and returns the current set with outcome no_approved_frames.
    • The marker therefore means the identity upload and OCR flush finished too.
  3. Bound. The finalizer proceeds when the marker lands or after MEETING_NOTES_EVIDENCE_WAIT_SECONDS (25 s on dev/prod), whichever is first.

ScreenFrameAdjudicationRequest.candidates drops minItems: 1 (max stays 8). That only relaxes the request, and app-client compatibility passes. The OpenAPI export is regenerated, along with the stale generated Dart screen_frames_wire.g.dart (it lacked trusted_selection_fingerprint from #19911).

Verification

  • test.sh file lists pass, unit layer:
    • test_meeting_evidence_admission.py (new) covers the outcomes: present, arrived mid-wait, timed out at the bound.
    • It also covers the cases that never wait: non-meeting and non-desktop conversations, a meeting from a released desktop build (no declaration), later triggers, default-off, no bucket, and setting off.
    • test_listen_screen_evidence_declaration.py (new) covers the screen_evidence=enabled query parameter reaching the listen request only for meetings, and conversation creation persisting external_data.screen_evidence_pass.
    • Tests cover segments appended during the wait reaching process_conversation, for every wait outcome, and a row completed by another owner during the wait not being reprocessed;
    • Tests cover a stale-fingerprint marker waiting to the bound, then releasing when the current-window marker lands; the window being re-read each poll; a deleted conversation not counting as evidence; the bounded one-read marker lookup;
    • Tests cover the order persist, then stamp, then build the response; a response (signing) failure still leaving the pass marked; timeout fallbacks (evidence never arrived, hung read) and none when evidence arrives; a hung read cut at the bound with RPC timeouts no larger than it, bounded RPCs (timeout + retry=None), and record_fallback on read failure.
    • Router tests cover an empty candidate list: it stamps the marker with the fingerprint and makes no judge or writer call, the account-setting gate still applies, and more than 8 candidates is still rejected.
    • It also covers read-error fail-open, the bound cap, and the finalizer awaiting admission before geolocation and processing but not on completed replays.
    • Existing finalizer, Cloud Tasks, pusher-finalization, runtime-env validator, and pusher config tests also pass.
  • pre-deploy-check.sh and the feature-flag registry check pass.
  • Not verified: live dev behaviour (no deploy).

Failure-Class: none

Product invariants affected:

  • INV-MEM-4: no change to memory promotion; the finalizer only delays processing for a bounded time.

🤖 Generated with Claude Code

…ng notes

The Mac closes the listen socket before its evidence pass (screenshot
adjudication, identity upload, OCR flush) lands, and teardown admits
finalization at once, so notes were written without that evidence. The
shared finalizer (pusher, Cloud Tasks, POST /finalize) now waits, bounded by
MEETING_NOTES_EVIDENCE_WAIT_SECONDS (0 by default, 25 on dev/prod finalizer
hosts), for this bucket's adjudication marker on desktop meeting captures,
proceeding as soon as it lands. Async poll, fail-open, metered by outcome.

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-30T07:31:54.581668Z d16a237 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.

Git-on-my-level and others added 2 commits September 30, 2026 12:58
…tion marks the pass done

- The finalizer waits only when the desktop declared the pre-notes pass for the
  meeting (listen screen_evidence=enabled, persisted as
  external_data.screen_evidence_pass), so released desktop builds never wait.
- POST /v1/screen-frame-egress/adjudications accepts an empty candidate list
  as 'evidence pass done, nothing to offer': admission checks, no judge, no
  bytes, stamps this bucket's marker with the selection fingerprint.
- Regenerate the OpenAPI export and the stale generated Dart screen-frame wire.

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

mintlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
omi 🟢 Ready View Preview Sep 30, 2026, 6:04 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

…admission

# Conflicts:
#	backend/charts/backend-listen/prod_omi_backend_listen_values.yaml
#	backend/charts/pusher/prod_omi_pusher_values.yaml
#	backend/deploy/runtime_env/prod.overlay.yaml

@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: eb2d2c5ed0

ℹ️ 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 +91 to +94
while True:
if await _evidence_landed(uid, conversation_id, bucket):
outcome = 'present' if first else 'arrived'
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.

P1 Badge Wire adjudication into the meeting-stop path before polling it

With the new 25-second dev setting, this loop waits for a marker that the meeting finalization path never produces. A repository-wide search shows the only production call to adjudicateScreenFrames comes from MeetingScreenshotsStore.run, and that store is loaded by ConversationDetailView (MeetingScreenshotsStore.swift:276-332, ConversationDetailView.swift:116-120), not by ConversationFinalizationService. Consequently normal meeting stops always time out here and processing still runs without screenshots; the marker can only arrive later when the user opens the note. Invoke the adjudication pass from the stop/finalization flow before enabling this admission wait.

Useful? React with 👍 / 👎.

Comment on lines +115 to +119
async def _evidence_landed(uid: str, conversation_id: str, bucket: str) -> bool:
stamp: Optional[Any] = await run_blocking(
db_executor, get_conversation_screen_frames_adjudicated_at, uid, conversation_id, bucket=bucket
)
return stamp is not None

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 Wait for persisted frames instead of the adjudication marker

When the client adjudication request overlaps this poll, a non-null stamp does not mean the evidence is readable yet: routers/screen_frames.py:368-375 writes screen_frames_adjudicated_at before enforcement.enforce_and_persist, which creates the Firestore frame documents consumed by notes. If this poll lands in that interval, finalization immediately reads the old/empty frame set and permanently writes the one-pass note without the newly approved screenshots. Use a readiness signal written only after persistence succeeds, or otherwise wait for the matching persisted revision.

Useful? React with 👍 / 👎.

Comment on lines +115 to +119
async def _evidence_landed(uid: str, conversation_id: str, bucket: str) -> bool:
stamp: Optional[Any] = await run_blocking(
db_executor, get_conversation_screen_frames_adjudicated_at, uid, conversation_id, bucket=bucket
)
return stamp is not None

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 readiness to the current selection fingerprint

For an in-progress desktop meeting that was adjudicated earlier and then received more transcript, this accepts the old marker immediately even though the trusted content window—and therefore the required frame selection—has changed. The Mac deliberately requires both adjudicatedAt and selectionFingerprint == selectionWindow.fingerprint in MeetingScreenshotsStore.swift:292-294; ignoring the fingerprint here lets final notes race ahead of the replacement adjudication and omit later meeting evidence. Compare the stored fingerprint with the current trusted-window fingerprint before returning ready.

Useful? React with 👍 / 👎.

Comment on lines +88 to +89
if not await run_blocking(db_executor, get_meeting_note_screenshots_enabled, uid):
return 'not_applicable'

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 the identity grace period when screenshots are disabled

When a user disables meeting screenshots but leaves on-device meeting identity enabled, this returns immediately even though ConversationFinalizationService.storeMeetingContextIfEnabled still uploads the independently gated screen_activity identity after the listen socket has already admitted backend processing. That recreates the race this change is intended to close, so those users can get generic or misidentified meeting notes. Gate screenshot polling separately from the bounded identity grace period or introduce an identity-completion signal.

AGENTS.md reference: backend/AGENTS.md:L133-L134

Useful? React with 👍 / 👎.

outcome = 'timed_out'
started = monotonic()
try:
if not await run_blocking(db_executor, get_meeting_note_screenshots_enabled, uid):

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 Apply the evidence deadline to Firestore reads

During Firestore latency or an outage, this run_blocking call—and each marker read below—has no timeout, so the configured 25/60-second bound is checked only after an SDK .get() eventually returns. Concurrent meeting finalizations can therefore remain blocked beyond the advertised bound and occupy all 24 db_executor workers, stalling unrelated database work instead of failing open. Apply the remaining admission deadline to each read, including an SDK-level timeout so cancelled awaits do not leave pool workers stuck.

AGENTS.md reference: backend/AGENTS.md:L258-L261

Useful? React with 👍 / 👎.

Comment on lines +49 to +52
return 0.0
return min(max(value, 0.0), MAX_EVIDENCE_WAIT_SECONDS)


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 Reject non-finite evidence wait values

If an operator supplies MEETING_NOTES_EVIDENCE_WAIT_SECONDS=NaN, float() accepts it and the clamp still returns nan. Both bound <= 0 and remaining <= 0 then remain false, while min(EVIDENCE_POLL_SECONDS, remaining) keeps returning the two-second poll interval, so every applicable finalization loops forever rather than respecting the cap. Treat non-finite parsed values as disabled or clamp them after an explicit math.isfinite check.

Useful? React with 👍 / 👎.

break
await sleep(min(EVIDENCE_POLL_SECONDS, remaining))
except Exception as error: # noqa: BLE001 - evidence is optional; notes must proceed
logger.warning('meeting notes evidence wait failed uid=%s error_type=%s', uid, type(error).__name__)

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 Sanitize identifiers in evidence-admission logs

Every failed evidence read and every completed wait logs the raw user UID, and the success path also logs the raw conversation ID. These identifiers should be passed through the repository's logging sanitizer or omitted/hashed so operational logs do not gain unsanitized user-linked identifiers.

AGENTS.md reference: backend/AGENTS.md:L77-L77

Useful? React with 👍 / 👎.

Git-on-my-level and others added 2 commits September 30, 2026 13:16
…ce reads; degraded fallback

- Stamp the adjudication marker only after frame docs persist (approved,
  all-rejected, empty), returning the fresh stamp in the response.
- Each evidence read awaits within the remaining budget, and the Firestore RPC
  gets one attempt with that timeout.
- A read failure records a degraded fallback beside the outcome counter.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Sep 30, 2026
)

- 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]>
…allbacks

- persist_enforced_frames persists only; the route stamps the adjudication
  marker, then builds the response, so a URL-signing failure cannot leave a
  persisted pass unmarked.
- Proceeding without evidence on timeout (never arrived, read deadline) also
  records a degraded fallback with reason timeout.

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: a1c54af6f1

ℹ️ 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 thread backend/routers/screen_frames.py Outdated
# approved to bump it, so without this the client cannot tell that it already offered these
# frames and had them refused, and re-uploads them on every reopen.
screen_frames_db.mark_conversation_screen_frames_adjudicated(
frame_set, committed = enforcement.enforce_and_persist(uid, request.subject.id, policy.max_persisted, new_frames)

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 Stamp readiness before building the signed response

When frame persistence succeeds but build_frame_set_response() fails—for example, during signed-URL generation or a follow-up Firestore read—enforce_and_persist() raises after writing the frame documents, so execution never reaches the adjudication marker. The reserved attempt then has no cached response, retries receive adjudication_in_progress_retry, and finalization unnecessarily waits for the full evidence timeout despite the evidence already being readable. Separate persistence from response construction so the marker is written immediately after successful persistence and before fallible response assembly.

Useful? React with 👍 / 👎.

Comment on lines +434 to +435
if getattr(request, 'screen_evidence_pass', False):
external_data['screen_evidence_pass'] = 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 Persist evidence declarations when resuming a conversation

When a socket declaring screen_evidence=enabled resumes an existing in-progress conversation, the resume branch at lines 385-419 returns before this creation-only block runs, so external_data.screen_evidence_pass remains absent. This occurs, for example, when a meeting was created by an older backend during a rolling deployment and reconnects to the new backend; the client can run the evidence pass, but finalization classifies the conversation as not_applicable and races ahead. OR-persist the declaration on the resume path, as is already done there for uses_custom_stt.

Useful? React with 👍 / 👎.

Comment on lines +113 to +114
except asyncio.TimeoutError:
outcome = 'timed_out' # a read that outlived the bound: proceed without evidence

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 evidence timeouts as degraded fallbacks

When the marker never arrives or a Firestore read consumes the remaining deadline, this branch deliberately continues to notes without evidence, but unlike the generic-error branch it never calls record_fallback; it only increments the new domain counter. Consequently the shared fallback telemetry omits the expected and likely dominant degraded outcome, so central fallback monitoring cannot distinguish successful evidence admission from notes that silently lost evidence. Record screen_evidence → notes_without_evidence with reason timeout and outcome degraded here.

AGENTS.md reference: backend/AGENTS.md:L304-L304

Useful? React with 👍 / 👎.

Git-on-my-level and others added 2 commits September 30, 2026 14:05
… window

A marker stamped mid-meeting for an earlier window no longer releases the
finalizer: each poll re-reads the conversation (bounded) and requires the
marker's selection fingerprint to equal the current trusted window's. The
window helpers move to utils/conversations/screen_content_window.py, shared by
the adjudication route and the finalizer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
After any admission outcome the finalizer reloads and re-admits the
conversation, so tail segments that land during the wait are summarized and
the pre-wait snapshot can never be persisted over the newer live transcript.
A row completed or deleted meanwhile follows the existing replay/fence path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit e92ff57 into main Sep 30, 2026
63 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/screen-evidence-admission branch September 30, 2026 07:31

@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: d16a237e08

ℹ️ 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 +114 to +116
fenced, conversation_data, conversation = await _load_admitted_conversation(
uid, conversation_id, finalization_job_id, dispatch_generation, lease_epoch
)

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 Revalidate evidence against the reloaded conversation

If a tail transcript segment is persisted after _current_pass_landed() reads the content window but before this reload, the reloaded row includes that segment and process_conversation summarizes it even though the accepted marker covers only the earlier fingerprint. The fresh evidence beyond the earlier stale-marker case is this new post-wait reload: it deliberately expands the processing input without repeating the fingerprint check. Revalidate the marker against the reloaded row—or continue waiting—before processing it.

Useful? React with 👍 / 👎.

Git-on-my-level added a commit that referenced this pull request Sep 30, 2026
)

* feat(desktop): gather meeting screen evidence once, before notes

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]>

* test(desktop): cover the meeting screen evidence pass in the capture lifecycle flow

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

* feat(desktop): retry meeting screen evidence after finalize; whole-token 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]>

* chore(desktop): keep diagnostics manager within its line-count ratchet

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

* feat(desktop): terminal-status screen evidence retry, sealed final chunk, 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]>

* feat(desktop): record degraded telemetry when post-creation screen evidence fails

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

* fix(desktop): refetch expiring cached screenshot URLs; casefold tile-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]>

* feat(desktop): report failed strip thumbnails through the existing placeholder

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

* feat(desktop): mirror the backend call-window evidence and agent-tile 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]>

* fix(desktop): read the evidence window without first-open side effects; 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]>

* test(desktop): decode the merged backend's trusted_selection_fingerprint body

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

* fix(desktop): flush meeting OCR on every local-segments upload; degrade 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]>

* feat(desktop): implement the meeting evidence admission contract (#19932)

- 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]>

* test(desktop): pin the empty evidence stamp to the backend request shape

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

* fix(desktop): stamp empty evidence only after a real empty read; never 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]>

* fix(desktop): owner-bind every screen evidence upload; judge the terminal 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]>

* test(desktop): cover the evidence owner binding in the capture lifecycle flow

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

* fix(desktop): no empty stamp for transient pixel reads or untrusted windows

- 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]>

* fix(desktop): lease-bind flush writes; gather evidence on rotations and 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]>

* fix(desktop): the owner-bound meeting flush never delivers frame requests

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]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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