@@ -97,7 +97,7 @@ def test_native_profile_long_routes_retain_one_complete_settlement_contract() ->
9797
9898
9999@pytest .mark .parametrize ("mode,limit" , [
100- ("full" , 13100 ), ("compact" , 8000 ), ("brief" , 5700 ),
100+ ("full" , 13100 ), ("compact" , 8000 ), ("brief" , 5800 ),
101101 ("thin" , 4500 ), ("visible_goal" , 4000 ),
102102])
103103def test_prompt_body_limit_remains_independent_of_json_envelope (mode : str , limit : int ) -> None :
@@ -356,19 +356,23 @@ def test_brief_diagnostics_keep_only_the_selected_prompt_command() -> None:
356356
357357@pytest .mark .parametrize (
358358 ("mode" , "base_budget" ),
359- [("full" , 13100 ), ("compact" , 8000 ), ("brief" , 5700 ), ("thin" , 4500 )],
359+ [("full" , 13100 ), ("compact" , 8000 ), ("brief" , 5800 ), ("thin" , 4500 )],
360360)
361361@pytest .mark .parametrize ("scope_chars" , [0 , 320 ])
362+ @pytest .mark .parametrize ("runtime_profile" , ["codex_app_heartbeat" , "generic_cli" ])
363+ @pytest .mark .parametrize ("explicit_route" , [False , True ])
362364def test_reward_memory_prompt_headroom_is_fixed_and_feature_scoped (
363- mode : str , base_budget : int , scope_chars : int
365+ mode : str , base_budget : int , scope_chars : int , runtime_profile : str , explicit_route : bool ,
364366) -> None :
365367 profile = {"scope_summary" : "x" * scope_chars } if scope_chars else None
368+ route = {"registry_path" : "/fixture/registry.json" , "runtime_root" : "/fixture/runtime" } if explicit_route else {}
366369 enabled = build_heartbeat_prompt (
367370 goal_id = "reward-memory-budget-fixture" ,
368371 agent_id = "worker-a" ,
369372 registered_agents = ["worker-a" ],
370373 agent_profile = profile ,
371- runtime_profile = "codex_app_heartbeat" ,
374+ runtime_profile = runtime_profile ,
375+ ** route ,
372376 ** {mode : True },
373377 reward_memory_enabled = True ,
374378 )
@@ -377,7 +381,8 @@ def test_reward_memory_prompt_headroom_is_fixed_and_feature_scoped(
377381 agent_id = "worker-a" ,
378382 registered_agents = ["worker-a" ],
379383 agent_profile = profile ,
380- runtime_profile = "codex_app_heartbeat" ,
384+ runtime_profile = runtime_profile ,
385+ ** route ,
381386 ** {mode : True },
382387 reward_memory_enabled = False ,
383388 )
0 commit comments