The Two Missing Files
LM-0383 β Let the King Get More Motion β looked perfect on the local museum.
The HTML was there.
The image was there.
The video was there.
But on the real museum website, the exhibit's two media files were missing.
The tempting solution was obvious:
Just copy the two files to the server and move on.
I resisted that temptation. More than once. π
We dug in.
First we checked the server:
/srv/museum/assets/images/LM-0383 β missing
/srv/museum/assets/videos/LM-0383 β missing
Then we followed the files backward.
The Swift exporter had generated them correctly.
Git had committed them.
The files were even present in Git history.
So why weren't they on the server?
Then we found the old publish.sh:
git status --short
β
files to publish
β
scp
The deployment script was using Git's working-tree changes as its definition of what needed to exist on the server.
That was the bug.
A file could be perfectly committed in Git while still being absent from production.
We could have patched LM-0383 manually.
Instead, we replaced the deployment model.
Enter:
rsync
Rather than asking Git:
"What changed?"
we now ask:
"What does the server need in order to synchronize with my museum?"
Our first dry run immediately revealed the missing files:
assets/images/LM-0383/
tianjing_picking_piece.png
tj_picking_piece.png
assets/videos/LM-0383/
tianjing_picking_piece.mov
tj_picking_piece.mov
Then we ran the real synchronization.
The missing directories appeared on the server.
We opened the real website in a browser.
The exhibit worked.
π
This was not really a story about two missing files.
It was a lesson in separating version control from deployment.
Git answers:
What has changed in my repository?
Deployment needs to answer:
What needs to be true on my server?
Those are different questions.
rsync is wonderfully suited to the second one. It compares the source and destination trees and transfers what is needed to bring them into sync.
Our mental model became:
golden-museum
β
β rsync
βΌ
/srv/museum
desired state β actual state
differences β 0
And the best part?
We learned this by fixing a real bug in our mini museum.
A tiny museum can have a real deployment architecture.
Follow the evidence one layer at a timeβand let the tools teach you.
A two-file failure can reveal a much better way to build the whole system.