You need to review a small PR in a service on Go 1.24 (standard library only). The service accepts an HTTP request to upload an order receipt and stores metadata in memory.
Context and requirements:
go test ./....net/http/httptest, without an external server.{"orderId":"...","fileName":"...","size":123}.409 if a receipt has already been saved for the order.201 and JSON {"status":"stored"} on the first successful write.400.Find the behavioral defects in the post-change version.
Go 1.24, standard library. Execution is synchronous within a single HTTP handler; no additional goroutines are used in the task code. The MemoryStore storage is shared between requests in one process and must work correctly under concurrent SaveReceipt calls.
Use line comments to explain the problem, its impact, the fix and how to test it.