@@ -28,7 +28,8 @@ defmodule OuterBrain.Persistence.StoreTest do
2828 container = PostgresContainer . start! ( "outer_brain_persistence" )
2929
3030 repo_config = PostgresContainer . repo_config ( container . port )
31- { :ok , _pid } = Repo . start_link ( repo_config )
31+ { :ok , pid } = Repo . start_link ( repo_config )
32+ Process . unlink ( pid )
3233
3334 PostgresContainer . run_migrations! ( Repo )
3435 Sandbox . mode ( Repo , :manual )
@@ -47,7 +48,8 @@ defmodule OuterBrain.Persistence.StoreTest do
4748
4849 on_exit ( fn ->
4950 if Process . whereis ( tags . repo ) == nil do
50- { :ok , _pid } = tags . repo . start_link ( tags . repo_config )
51+ { :ok , pid } = tags . repo . start_link ( tags . repo_config )
52+ Process . unlink ( pid )
5153 end
5254
5355 Sandbox . mode ( tags . repo , :manual )
@@ -95,11 +97,15 @@ defmodule OuterBrain.Persistence.StoreTest do
9597 assert fetched . context_artifact_descriptor == prompt . context_artifact . descriptor
9698 assert fetched . prompt_artifact_descriptor == prompt . prompt_artifact . descriptor
9799
98- assert [ indexed ] =
99- Store . search_semantic_contexts ( @ tenant_a , "gemini-2.5-flash alpha" , repo: repo )
100+ indexed =
101+ @ tenant_a
102+ |> Store . search_semantic_contexts ( "google/gemini" , repo: repo )
103+ |> Enum . find ( & ( & 1 . provenance . semantic_ref == prompt . provenance . semantic_ref ) )
104+
105+ assert indexed
100106
101107 assert indexed . provenance . semantic_ref == prompt . provenance . semantic_ref
102- assert [ ] = Store . search_semantic_contexts ( @ tenant_b , "gemini-2.5-flash " , repo: repo )
108+ assert [ ] = Store . search_semantic_contexts ( @ tenant_b , "google/ gemini" , repo: repo )
103109
104110 assert { :ok , resolved } =
105111 Store . resolve_artifact_payload (
@@ -202,7 +208,8 @@ defmodule OuterBrain.Persistence.StoreTest do
202208 Store . publish_reply_continuation ( continuation , tenant_id: @ tenant_a , repo: repo )
203209
204210 stop_repo_safely ( )
205- { :ok , _pid } = Repo . start_link ( repo_config )
211+ { :ok , pid } = Repo . start_link ( repo_config )
212+ Process . unlink ( pid )
206213
207214 assert { :ok , next_context } =
208215 Store . fetch_semantic_context (
0 commit comments