@@ -69,31 +69,31 @@ defmodule Trinity.Memory.PromptTiersTest do
6969 scope = Receipts . session_scope ( row . id )
7070 on_exit ( fn -> Receipts . stop_writer ( scope ) end )
7171
72- { :ok , _ } =
73- AlwaysOn . add (
74- % {
75- persona_id: persona . id ,
76- tier : "always_on " ,
77- scope: AlwaysOn . persona_scope ( persona . id ) ,
78- key: "before" ,
79- body: "known at start"
80- } , by: "test" )
72+ attrs = % {
73+ persona_id: persona . id ,
74+ tier: "always_on" ,
75+ scope: AlwaysOn . persona_scope ( persona . id ) ,
76+ key : "before " ,
77+ body: "known at start"
78+ }
79+
80+ { :ok , _ } = AlwaysOn . add ( attrs , by: "test" )
8181
8282 Fake . scripts ( [ script_deltas ( 1 , "ok " ) , script_deltas ( 1 , "ok " ) , script_deltas ( 1 , "ok " ) ] )
8383 { :ok , pid } = start_drained ( row . id )
8484 { :ok , _ } = Session . send_user_message ( pid , "one" )
8585 _ = collect ( row . id , & match? ( { :state , :idle } , & 1 ) )
8686 assert Fake . last_request ( ) . system =~ "- before: known at start"
8787
88- { :ok , _ } =
89- AlwaysOn . add (
90- % {
91- persona_id: persona . id ,
92- tier : "always_on " ,
93- scope: AlwaysOn . persona_scope ( persona . id ) ,
94- key: "later" ,
95- body: "added mid-session"
96- } , by: "test" )
88+ attrs = % {
89+ persona_id: persona . id ,
90+ tier: "always_on" ,
91+ scope: AlwaysOn . persona_scope ( persona . id ) ,
92+ key : "later " ,
93+ body: "added mid-session"
94+ }
95+
96+ { :ok , _ } = AlwaysOn . add ( attrs , by: "test" )
9797
9898 { :ok , _ } = Session . send_user_message ( pid , "two" )
9999 _ = collect ( row . id , & match? ( { :state , :idle } , & 1 ) )
@@ -128,15 +128,15 @@ defmodule Trinity.Memory.PromptTiersTest do
128128 a = Factory . persona! ( % { soul: "# Alpha\n You are the alpha persona." } )
129129 b = Factory . persona! ( % { soul: "# Beta\n You are the beta persona." } )
130130
131- { :ok , _ } =
132- AlwaysOn . add (
133- % {
134- persona_id: b . id ,
135- tier : "profile " ,
136- scope: AlwaysOn . persona_scope ( b . id ) ,
137- key: "name" ,
138- body: "Bea"
139- } , by: "test" )
131+ attrs = % {
132+ persona_id: b . id ,
133+ tier: "profile" ,
134+ scope: AlwaysOn . persona_scope ( b . id ) ,
135+ key : "name " ,
136+ body: "Bea"
137+ }
138+
139+ { :ok , _ } = AlwaysOn . add ( attrs , by: "test" )
140140
141141 sa = Factory . session! ( % { persona_id: a . id } )
142142 sb = Factory . session! ( % { persona_id: b . id } )
0 commit comments