@@ -178,14 +178,6 @@ mod tests {
178178 . run_id
179179 }
180180
181- fn controller_admission_stamped ( run_id : & str ) -> bool {
182- agent_task_lifecycle:: exact_record ( run_id)
183- . expect ( "durable record" )
184- . metadata
185- . get ( "controller_admission" )
186- . is_some ( )
187- }
188-
189181 #[ test]
190182 fn runner_backed_actions_execute_on_the_owning_runner ( ) {
191183 let actions = actions_for_agent_task ( "run-1" , Some ( "lab-a" ) , ActivityState :: Stale ) ;
@@ -199,15 +191,14 @@ mod tests {
199191 #[ test]
200192 fn probe_by_id_resolves_one_record_without_scanning_or_writing ( ) {
201193 // #10308: resolving a single agent-task id must be an indexed read, not
202- // a full-corpus refresh. The scanning path refreshes every record
203- // through `status()`, which stamps `controller_admission` on each one —
204- // so the absence of that stamp is durable evidence that neither the
205- // probed record nor its siblings were scanned or written.
194+ // a full-corpus refresh. Preserve the exact durable records to prove
195+ // that neither the target nor its sibling was scanned or rewritten.
206196 with_isolated_home ( |_| {
207197 let target = seed_record ( "run-probe-target" ) ;
208198 let sibling = seed_record ( "run-probe-sibling" ) ;
209- assert ! ( !controller_admission_stamped( & target) ) ;
210- assert ! ( !controller_admission_stamped( & sibling) ) ;
199+ let target_before = agent_task_lifecycle:: exact_record ( & target) . expect ( "target record" ) ;
200+ let sibling_before =
201+ agent_task_lifecycle:: exact_record ( & sibling) . expect ( "sibling record" ) ;
211202
212203 let item = AgentTaskActivityProvider
213204 . probe_by_id ( & target)
@@ -221,14 +212,14 @@ mod tests {
221212 item. refs. agent_task_run_id. as_deref( ) ,
222213 Some ( target. as_str( ) )
223214 ) ;
224- assert ! ( !controller_admission_stamped ( & target ) ) ;
225- assert ! ( !controller_admission_stamped ( & sibling ) ) ;
226-
227- // Control: the scanning path the probe replaces does refresh — and
228- // therefore write — every record, which is the cost being avoided.
229- agent_task_lifecycle:: list_records ( ) . expect ( "records listed" ) ;
230- assert ! ( controller_admission_stamped ( & target ) ) ;
231- assert ! ( controller_admission_stamped ( & sibling ) ) ;
215+ assert_eq ! (
216+ agent_task_lifecycle :: exact_record ( & target ) . expect ( "target remains readable" ) ,
217+ target_before
218+ ) ;
219+ assert_eq ! (
220+ agent_task_lifecycle:: exact_record ( & sibling ) . expect( "sibling remains readable" ) ,
221+ sibling_before
222+ ) ;
232223 } ) ;
233224 }
234225
@@ -284,13 +275,17 @@ mod tests {
284275 with_isolated_home ( |_| {
285276 register ( ) ;
286277 let run_id = seed_record ( "run-show-probe" ) ;
278+ let before = agent_task_lifecycle:: exact_record ( & run_id) . expect ( "record before show" ) ;
287279
288280 let report = homeboy_core:: activity:: show_activity ( & run_id) . expect ( "show activity" ) ;
289281
290282 assert_eq ! ( report. items. len( ) , 1 ) ;
291283 assert_eq ! ( report. items[ 0 ] . id, run_id) ;
292284 assert_eq ! ( report. items[ 0 ] . source_store, "agent-task.lifecycle" ) ;
293- assert ! ( !controller_admission_stamped( & run_id) ) ;
285+ assert_eq ! (
286+ agent_task_lifecycle:: exact_record( & run_id) . expect( "record after show" ) ,
287+ before
288+ ) ;
294289 } ) ;
295290 }
296291}
0 commit comments