medlab / case

medlab

what got hurt, and what now fails loudly

↑ sublayer

2026-10-14 · fixed: yes

A shared photo always arrives as image data

BehavioralIntegration Tests

now fails loudly A native iOS test supplies a camera filename and requires a stored image after the recovery picker.

What broke

Wortling turns German text and photos shared from phones into flashcards. Its capture Shortcut classified input by English type names and sent unmatched input as text. A photo encounter reached the server as a camera filename without image data.

How it showed

The user saw skipped_not_german beside a camera filename. The capture row contained text and a null image path. A structural repair to the generated workflow did not resolve the repeated phone report. The original Shortcut uploaded JPEG and HEIC images successfully in an English-language simulator. Supplying filename-only text to that same native workflow reproduced the stored filename and failed the image assertion. The corrected physical-phone request recorded the original native type as Fotomedien. The old English image-type comparison had therefore routed German-localized photo media into the text branch.

What was watching

Server integration tests accepted valid image requests and rejected invalid image bytes. Browser tests exercised canvas conversion and image upload. Generated-artifact tests checked request fields, signatures, and control-flow identifiers. None exercised Apple's native workflow runtime with filename-only input. The customer reported the failure twice before native simulator coverage was added.

Where it sits

This is a behavioral failure at the phone-to-server boundary. Integration tests were present on the server and browser paths but absent from native Shortcut execution. A valid server receipt established that content was stored without establishing that the intended image had been sent.

What we did

The Shortcut now extracts native image data from non-text media and file inputs. It compares text and URL types against native sample values rather than English image names. Camera filename text triggers an explanation and a photo picker before any capture request. Requests record the template version and original input type in their attempt key. An isolated simulator harness imports the signed file and verifies stored payloads with processing and Anki writes disabled. A physical-phone request subsequently stored a 920 by 2000 JPEG with 225724 image bytes. OCR recognized the German app text and processing completed.

What now fails loudly

The old native workflow fails the filename fixture with Photo became text. The replacement passes after the test selects an image in the recovery picker. The server must store a 2000 by 1500 JPEG. Separate native checks cover HEIC sharing from Photos and exact German text preservation.