From 33caedb240fe77763f28fea90ead92762a2045ee Mon Sep 17 00:00:00 2001 From: Scott Karp Date: Thu, 15 Oct 2026 15:03:07 +0000 Subject: [PATCH] tests: the L1 witness may be gone before its teardown; and a correction The previous commit's message says "Elixir green"; the run it cited had one failure, which the builder read only after committing (tablet 35's lesson, repeated). The failure: tablet38_l1_integrity_test's on_exit stopped a witness linked to the test process after it had already exited (seed 221974). The teardown now tolerates that. Full suite with that seed: 607 tests, 0 failures, 46 excluded Co-Authored-By: Claude Fable 5.1 --- vav_pipeline/test/tablet38_l1_integrity_test.exs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vav_pipeline/test/tablet38_l1_integrity_test.exs b/vav_pipeline/test/tablet38_l1_integrity_test.exs index 17966dd2..d617fde5 100644 --- a/vav_pipeline/test/tablet38_l1_integrity_test.exs +++ b/vav_pipeline/test/tablet38_l1_integrity_test.exs @@ -172,7 +172,15 @@ defmodule VavPipeline.Tablet38L1IntegrityTest do L1Integrity.start_link(l1_root: root, expected_hash: L1Reader.expected_hash(), interval: :never) on_exit(fn -> - if Process.alive?(pid), do: GenServer.stop(pid) + # The witness is linked to the test process and may already be + # gone when on_exit runs (seed 221974, 2026-10-15): stopping a + # process that has exited is not a failure of the scroll. + try do + if Process.alive?(pid), do: GenServer.stop(pid) + catch + :exit, _ -> :ok + end + {:ok, _} = Supervisor.restart_child(VavPipeline.Supervisor, L1Integrity) MannaLedger.reset() File.rm(VavPipeline.Manna.provision_file())