diff --git a/e2e/setup/vault-fixture.ts b/e2e/setup/vault-fixture.ts index 31320e09c..cf7ee7764 100644 --- a/e2e/setup/vault-fixture.ts +++ b/e2e/setup/vault-fixture.ts @@ -160,6 +160,30 @@ function tinyPng(marker: string): Buffer { return Buffer.concat([PNG_1X1, Buffer.from(marker, "utf8")]); } +/** + * A minimal JPEG carrying a GPS marker inside an APP1 (Exif) segment so the + * share serve route's egress EXIF strip is observable end-to-end: the stored + * bytes contain `GPSLatitude`, the served bytes must not. SOI → APP1(Exif) → + * SOS(+entropy). Not a decodable photo — the serve route sniffs the STORED + * mime type, never re-decodes pixels, so this is enough to exercise the strip. + */ +function jpegWithGps(marker: string): Buffer { + const payload = Buffer.concat([ + Buffer.from("Exif\0\0"), + Buffer.from(`GPSLatitude=48.137 ${marker}`), + ]); + const lenField = Buffer.alloc(2); + lenField.writeUInt16BE(payload.length + 2); + const app1 = Buffer.concat([Buffer.from([0xff, 0xe1]), lenField, payload]); + const sos = Buffer.concat([ + Buffer.from([0xff, 0xda]), + Buffer.from([0x00, 0x08]), + Buffer.from([0x01, 0x01, 0x00, 0x3f, 0x00, 0x00]), + Buffer.from([0xaa, 0xbb]), + ]); + return Buffer.concat([Buffer.from([0xff, 0xd8]), app1, sos]); +} + // ─── Fixture identity ─────────────────────────────────────────────────────── export const KNIE_EPISODE_ID = "e2evaultknie000000000001"; @@ -173,6 +197,21 @@ export const AI_PROBE_DOC_ID = "e2evaultaiprobe000000001"; export const CONTENT_DOC_ID = "e2evaultcontent00000001"; /** The whole word that appears only in `CONTENT_DOC_ID`'s indexed body. */ export const CONTENT_BODY_WORD = "pneumothorax"; + +/** + * v1.28 (Phase 3) — a fixed trio the clinician-share e2e attaches to a link and + * serves through the public `/c//d/` route: + * - a PDF (Class A, inline preview via