Skip to content

fix(desktop): query Vision's OCR languages through the request instance (unbreaks release compile on main) - #12932

Closed
nathanchengx wants to merge 1 commit into
BasedHardware:mainfrom
nathanchengx:fix/rewind-ocr-release-compile
Closed

nathanchengx wants to merge 1 commit into
BasedHardware:mainfrom
nathanchengx:fix/rewind-ocr-release-compile

Conversation

@nathanchengx

@nathanchengx nathanchengx commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

main has failed Desktop Swift Release Compile, the Swift test build, and the launcher sentinel build since #12888 (see #12931). That PR resolved Rewind OCR languages through the class-level VNRecognizeTextRequest.supportedRecognitionLanguages(for:revision:), deprecated since macOS 12; the executable target compiles with -warnings-as-errors, so under CI's pinned Xcode 16.4 the deprecation is a hard error on every PR's merge ref. This swaps in the instance query, VNRecognizeTextRequest().supportedRecognitionLanguages(), on a probe request set to the same recognition level. Same fallback to en-US on failure.

Product invariants affected

none

How it was verified

  • Minimal reproduction with the pinned flags: xcrun swiftc -warnings-as-errors -target arm64-apple-macos14.0 on a two-line file calling the old API fails with the identical 'supportedRecognitionLanguages(for:revision:)' was deprecated in macOS 12.0 error; the same file with the instance call compiles clean.
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift build -c debug for the full package (the executable target carries -warnings-as-errors in every configuration) → Build complete, no warnings on RewindOCRService.swift
  • swift test --filter RewindOCRQualityTests → 11 tests, 0 failures
  • Local Xcode is 26.6, not the CI-pinned 16.4, so the CI job itself is the final authority for the release compile.

Tests

No test change. RewindOCRQualityTests already covers resolveRecognitionLanguages(preferred:supported:), the pure part; the Vision query is a one-line platform call whose behavior (languages for the request's level) is unchanged.

Failure class (fixes)

Failure-Class: none

🤖 Generated with Claude Code

https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB

Review in cubic

#12888 resolved Rewind OCR languages via the class-level
`VNRecognizeTextRequest.supportedRecognitionLanguages(for:revision:)`,
which is deprecated since macOS 12. The executable target compiles with
`-warnings-as-errors`, so under CI's Xcode 16.4 the release compile, the
Swift test build, and the launcher sentinel build all fail on main and on
every PR's merge ref (#12931). The instance method is the supported
replacement and answers for the same level and revision.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @nathanjcx — sharp catch and a clean fix. Closing as superseded (details below); the diagnosis lives on in #12931.

What I verified on this head (8a29af0):

  • desktop/macos/Desktop/Sources/Rewind/Core/RewindOCRService.swift — swapping the class-level VNRecognizeTextRequest.supportedRecognitionLanguages(for:revision:) (deprecated since macOS 12) for an instance query on a probe request is the right shape. The probe sets probe.recognitionLevel = recognitionLevel(), and recognitionLevel() is a static .accurate (line 231) — the exact value the real request uses at line 412 — so the supported-languages list answers for the same level this service recognizes with. The ["en-US"] fallback on query failure is preserved, and the result still flows through the already-tested pure resolveRecognitionLanguages(preferred:supported:). The package targets macOS 14.0 and compiles the executable target with -warnings-as-errors (desktop/macos/Desktop/Package.swift), which is why the deprecation was a hard error only in Desktop Swift Release Compile while the debug test lane stayed green.
  • desktop/macos/changelog/unreleased/20260907-rewind-ocr-release-compile.json — the {"kind": "none"} fragment is exactly the convention .github/scripts/check-desktop-changelog.py defines for internal (non-user-facing) production edits. Correct call: an OCR capability query swap is not user-facing behavior.

Why this is being closed rather than merged: while the PR was in review, the same instance-query fix landed on main directly in 83d6e6e ("fix(desktop): use current Vision OCR language API"), about an hour after you opened this. Desktop Swift CI on main has been green since f4afb82, and this branch now conflicts with main — resolving the conflict would just reproduce what is already there, so there is nothing left to take from this PR.

Credit where it is due: the root-cause analysis in #12931 — the pinned error line, #12888 provenance, the pre-push debug-gate gap, and #12910/#12911 as untouched witnesses — is what made a one-line fix land with confidence, and your changelog fragment convention was spot on. Please keep contributing; this is exactly the kind of report-plus-fix the repo needs.


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

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Hey @nathanjcx 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS superseded Superseded by a newer change on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants