while hardening the backend of my visual bookmark app for release i found something serious. one panicking thread poisoned a shared lock, and after that every request failed. one panic anywhere and the whole api goes dark because the lock is never released. the fix touches thirty five call sites with a safe lock helper and it gets unit tested, because this is exactly the kind of bug that hides.
the same pass found a worse environmental one. search only worked on my machine because the onnx runtime came from a bind mounted folder on the host. the released image did not carry it at all. now the runtime is inside the image at the exact path it needs, and the model weights are pinned with checksums so both scripts refuse a mismatch. unknown api paths that used to answer two hundred with html now answer four oh four with json.
the release workflow grew a real contract check: it pulls the published image from the registry, boots it, and runs the checks against it. that caught a healthcheck race in my own smoke script, not a defect in the image. the lesson from the whole thing is to wait for healthy on the new image hash instead of trusting the deploy command to finish.