Skip to content

MCP for Cloud 1.3.3

Choose a tag to compare

@jhowjaw jhowjaw released this 09 Nov 01:31
· 145 commits to main since this release

Fix release on top of 1.3.2. No database change and no permission change; updating from 1.3.2 needs no step. This release fixes extraction of an existing ocrmypdf text layer, makes failure diagnostics visible in the Nextcloud log, and fixes calendar warning formatting and invitation-setting compatibility.

Fixed

  • Failure diagnostics in the Nextcloud log: unexpected tool failures now include the tool name and exception class and code in the log message itself, so they remain visible when a host does not expose structured log context. Other failure logs that kept their diagnostic only in context now interpolate it too. Logs that passed a complete exception now record only its class and integer code, never its message or trace, which may contain private file names and paths. Client responses and log levels are unchanged.
  • Calendar plans on servers without Intl: a conflicting event could turn calendar_create_event or a timing change in calendar_update_event into an unexpected error while formatting the overlap warning. Warnings now reuse the calendar formatter, preserving localized dates with Intl and readable local ISO dates and times without it. A zero-duration overlap shows its start once, like the plan renderer; an interval that cannot be formatted still shows its start instead of an empty time. Planning still writes nothing.
  • Native DAV invitation setting compatibility: calendar plans and invitation checks now read sendInvitations using its native configuration type, supporting both legacy yes/no strings and the boolean setting declared by newer upstream DAV code. A boolean setting no longer raises a typed configuration conflict, and a disabled setting stored lazily is no longer mistaken for an absent key.
  • Scans made searchable by ocrmypdf were reported as having no text layer (#31): files_read, resources/read and the reading of a stored version returned the "no text layer" notice, and a PDF mail attachment gave no text, for PDFs whose Tesseract text was added by ocrmypdf with --output-type pdf, with any --optimize level and either PDF renderer, on ocrmypdf 13 with Tesseract 4.1 and on ocrmypdf 15 with Tesseract 5.3. ocrmypdf draws the text layer as a Form XObject named /OCR-…, and pikepdf stores the page that draws it in a compressed object stream. smalot/pdfparser reads objects in object streams with its own grammar, which stops a dictionary key at a hyphen (and a name value at an underscore), so the page lost its XObjects and its text; up to 2.13.1, the latest release, the library still does this. The app now writes every such name in its #xx escape before the library reads an object stream, which the library decodes back to the same name, and keeps the offsets of the stream; strings, objects outside object streams and streams without such names are read exactly as before. Files that went through Ghostscript (ocrmypdf's default PDF/A output) or that Tesseract wrote directly were not affected, which is why only part of a collection failed. Defect present since PDF reading arrived.

Validation and limits

The fix is covered by unit tests with two small scans of synthetic text made by ocrmypdf 15.2 with Tesseract 5.3 and ocrmypdf 13.4 with Tesseract 4.1, read through files_read, through a mail attachment and through the parser, which fail on 1.3.2 and pass now, and by tests of the escaping itself (keys and values, strings, hexadecimal strings, comments and offsets). Thirty-two PDFs made with Tesseract directly, with ocrmypdf (PDF and PDF/A output, every --optimize level, both renderers, several pages, rotated pages), and rewritten by qpdf (object streams, linearization, uncompressed, without ToUnicode) and Ghostscript all return their text now; the thirteen that returned none on 1.3.2 are the ocrmypdf --output-type pdf ones that qpdf or Ghostscript did not rewrite. Text that Tesseract itself recognized wrongly, such as a rotated scan OCRed without page rotation, is returned as Tesseract wrote it.

Calendar collision warnings are covered with and without Intl, including zero-duration events and rejected intervals. Legacy string, boolean and lazy invitation settings are covered in both create and update plans; the embedded DAV factory uses the same reader. A real Nextcloud 34.0.5 test with a mixed-case account, German language, a second calendar, a subscription and a writable share returned all 24 create and description-only update plans through Basic and bearer authentication without confirming a write. The cause of a calendar plan failure reported by email remains under investigation; it was not reproduced in the tested environment. The improved failure log now provides the exception class and code needed to investigate it without exposing private exception content.

Community feedback

The ocrmypdf text-layer fix follows the report by @johkoenig in #31.