The Space That Wasn't a Space Ate a Customer's Photo
A customer can attach reference photos straight to a cake inquiry on Marin Cake Studio's site. The site signs each photo with a short-lived URL and hands Bakery Buddy that link, which copies the actual bytes into its own storage. For most of this feature's life, that copy step either worked for every photo a customer sent, or nobody had any way to know it hadn't, because nothing recorded how many photos the customer had actually attached in the first place.
A webhook that gets `photos: []` and has no way to ask why
The intake webhook receives an array of photo URLs and stores each one. If that array arrives one entry short of what the customer actually attached, the webhook has no way to notice. It only ever sees what made it into the array, and an array that's one photo short looks exactly the same whether the customer attached one fewer photo on purpose or something upstream silently dropped it. "The customer sent none" and "signing dropped everything" produce the identical payload on the receiving end.
A character you cannot see, in a filename you'd swear was plain text
The actual cause was one Unicode character: U+202F, NARROW NO-BREAK SPACE, which macOS quietly inserts into a screenshot's default filename, sitting exactly where it looks like an ordinary space. "Screenshot 2026-09-08 at 1.42 PM.jpg" reads like nine words and a few spaces. One of those is not a space. It is indistinguishable from a real one in a terminal, an email, or a code review.
That character broke one specific function: `presignUrl`, the Vercel Blob call that signs a photo's pathname for a short download window. `presignUrl` normalizes U+202F down to a plain space when it checks the pathname against the token just issued for that same pathname, but the blob itself is still stored under the real, un-normalized character. The two strings being compared print identically in every log line and every error message. They are not the same string. The check fails, the function throws, and the photo never reaches the inquiry.
Two real orders, found by counting, not by looking
This stayed invisible until Bakery Buddy started asking the sending site how many photos it actually held, instead of trusting the length of the array it received. Order #1712: the customer sent 1 photo, 0 arrived. Order #1686: the customer sent 3, 2 arrived. Both are real Marin Cake Studio inquiries, and both had been sitting open for a while before anyone had a reason to go looking, because an inquiry missing a reference photo doesn't look broken. It just looks like a customer who didn't bother to attach one.
The fix added one column, `inquiry_photos_expected`, written only when the sending site reports a real count, so an older sending site that doesn't send that number simply never triggers the comparison. When the count actually stored comes in lower than the count expected, Bakery Buddy now writes a plain internal note to the order's own activity log, naming both numbers. Never an email. The inquiry notification's reply-to address is the customer, and internal text has reached a stranger's inbox through that exact path before.
Counting attachments isn't the same as checking which ones
Recovering the two stranded photos needed a backfill script, and its first version made the same mistake the original bug was built on: it counted instead of checking identity. The write guard skipped any order that already had any attachment at all, which was the right rule back when the affected population was "orders that got nothing." It became the wrong rule the moment #1686 and #1712 were partially recovered. #1686 already held 2 of its 3 real customer photos. #1712 held exactly one attachment, but it was a file added by hand later, not the customer's screenshot. A count greater than zero said both orders were already fine. Neither one was. Only comparing actual filenames could tell the difference, and the comparison had to be exact: folding that invisible U+202F down to a plain space, the same normalization that broke the signing in the first place, would have reported the still-missing photo as already present.
Even after that fix landed, the recovery still did nothing on its first run. The script has two phases: a report that classifies each order, and an apply step that only acts on what the report hands it. The per-photo comparison had been added to the apply phase and left out of the report phase, so the report still classified both orders as fully recovered using the old per-order count, and the apply step never saw them at all. The fix shipped, every test and every gate stayed green, and it would have recovered exactly nothing. It was caught by someone reading the report's own output and noticing the numbers didn't add up, not by anything automated.
What generalizes past Unicode
Any time two systems independently decide whether two strings "match," and one of them normalizes something the other doesn't, you get a pair of values that are equal in every way a human glancing at them can tell, and unequal in the one way that matters to the code. That's not a risk specific to Unicode. It's what happens whenever a check and the thing it's checking are allowed to quietly disagree about what counts as the same.
And a script with two phases, one that filters and one that acts, needs both phases to agree about what "already done" means, changed in the same commit. Fixing only the phase that writes and leaving the phase that decides what to write unchanged looks like a complete fix. It passes review. It passes every test. It recovers nothing, and the only way anyone found out was reading the output instead of trusting the green checkmark next to it.
Frequently Asked Questions
What actually happened to the photos?
A customer attached reference photos to a cake inquiry on Marin Cake Studio's site, which signs each photo with a short-lived URL for Bakery Buddy to copy. macOS had inserted U+202F, an invisible narrow no-break space, into one screenshot's filename. Vercel Blob's presignUrl function normalizes that character to a plain space when checking a pathname against its own signing token, but the blob itself is stored under the real character, so the check fails and the photo is silently dropped. Two real orders were affected: #1712 (1 photo sent, 0 arrived) and #1686 (3 sent, 2 arrived).
Why didn't anything catch this automatically?
The intake webhook only ever saw the array of photo URLs that made it through signing. It had no independent record of how many photos the customer actually attached, so a short array looked identical whether the customer sent fewer photos on purpose or signing silently dropped one. The fix added a column, inquiry_photos_expected, so the sending site's own count could be compared against what actually got stored.
How were the two stranded photos eventually recovered?
A backfill script was updated to compare filenames exactly, with no Unicode normalization, rather than just counting existing attachments; counting had already proven wrong once two of the affected orders were partially recovered by hand. The script's first version still recovered nothing because the report phase that decides what needs fixing hadn't been updated to match the apply phase that does the fixing. Once both phases agreed, the script copied each stranded photo to a cleaned, ASCII-only pathname that could be signed, without touching or deleting the original.
What's the general lesson?
Whenever two parts of a system each decide independently whether two strings match, and one normalizes something the other doesn't, you get values that look identical to a person and aren't identical to the code. And in any script with a filtering phase and an acting phase, fixing only the phase that acts is not a complete fix. Both have to agree on what already counts as done, or the acting phase never even sees the cases it was supposed to fix.
I build Bakery Buddy for my wife Lindsay's cake studio, Marin Cake Studio, and this is the bug that taught me a filename is not just a string of text.
Ready to put this into practice?
Join the Waitlist