From 78a574b1fd10038cc1d8e769ba23346c8721a954 Mon Sep 17 00:00:00 2001 From: JohnnyT Date: Sun, 11 Oct 2026 02:02:54 -0600 Subject: [PATCH] Proves the at-rest test's UPDATE assertion The encrypting :blob_type test in position_blob_at_rest_test.exs had one verified sabotage, and it went red at the INSERT first, so its step UPDATE assertion had never been seen to fail on its own. Records a second sabotage that touches only the UPDATE path: in Storage.Ecto.update_execution/2, dropping position_blob from the set: list and setting it through a query update with type(^blob, :binary). Run against this test, the INSERT assertions passed and the refute on the step's UPDATE parameters went red, since the UPDATE bound the raw position carrying the location. Reverted from a copy; the suite is green. Test-only: no changelog fragment (changelog.d/README.md excludes test-only changes). --- .../ecto/position_blob_at_rest_test.exs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/statifier_persistence/ecto/position_blob_at_rest_test.exs b/test/statifier_persistence/ecto/position_blob_at_rest_test.exs index ee061d4..263fdce 100644 --- a/test/statifier_persistence/ecto/position_blob_at_rest_test.exs +++ b/test/statifier_persistence/ecto/position_blob_at_rest_test.exs @@ -167,6 +167,11 @@ defmodule StatifierPersistence.Ecto.PositionBlobAtRestTest do # custom-type clause answered `[name, :binary]` -> red on the first # assertion: the INSERT bound the location in the clear. Verified red, # reverted. + # sabotage (the UPDATE path alone): in Storage.Ecto.update_execution/2, + # dropped `position_blob` from the `set:` list and set it through a + # query `update` with `type(^blob, :binary)` -> the INSERT assertions + # pass and the refute on `updates` goes red: the step's UPDATE bound the + # raw position carrying the location. Verified red, reverted. test "an encrypting :blob_type keeps the location out of the stored column and the bound blob", %{machine: machine, chart_blob: chart_blob, stamps: stamps} do {:ok, store} = Storage.new(Storage.Ecto, persistence: BlobTyped)