Skip to content

Watch upstream surya for PR #493 release; drop local patch when shipped #71

Description

@splaice

Context

PR #56 vendored datalab-to/surya#493 (Apple Silicon MPS `.max()` kernel crash fix) into `scripts/patches/` because no `surya-ocr` release shipped with the fix. As of writing, we're on `surya-ocr==0.17.1` and the latest published release is also 0.17.1. The fix sits unreleased upstream.

When upstream cuts a release that includes PR #493, our vendored patch becomes redundant tech debt.

Proposal

Quarterly check (or watch the PR for merge):

  1. Check the latest released `surya-ocr` version on PyPI.
  2. Diff against the patched function in our installed surya — if upstream now includes `safe_max_item` (or equivalent), the fix has shipped.
  3. If shipped:
    • Bump `surya-ocr` pin in `pyproject.toml`.
    • `uv sync`.
    • Remove `scripts/patches/surya-mps-fix.patch`.
    • Remove `scripts/surya_mps_patch.py`.
    • Remove `patch-surya` justfile target.
    • Remove the documentation reference in CLAUDE.md / runbooks.
    • Open PR.

Acceptance criteria

  • Check performed.
  • If shipped: cleanup PR opened and merged.
  • If not shipped: this issue stays open with a re-check date in ~3 months.

🤖 Generated with Claude Code

Activity

  1. added
    P1High: significant value, do soon
    maintenanceUpstream tracking, dependency hygiene
    on Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High: significant value, do soonmaintenanceUpstream tracking, dependency hygiene

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions