What the purpose requires
Run-scoped reference lookup should be applied consistently everywhere
references are gathered, including the mission-mock TEST class path,
not only where get_best_reference_image already supports it.
What exists today
get_ready_test_campaign_units
(database/modules/utils/rapid_db.py:5696) does not select
work_units.run_id, so gather_campaign_units keeps the
production-lane reference default rather than the run-scoped lookup
get_best_reference_image now supports. Current risk is low because
mission-mock test campaigns register no references of their own. The
fix would need the query's select list and its five-column positional
unpack extended, then threading into science_facts.
The trigger that reopens this
The first time a mission-mock TEST campaign registers its own
reference and gets the wrong (production-lane) default instead of its
run-scoped one, or when get_best_reference_image's run-scoping is
next extended elsewhere and this gap should be closed to match.
What the purpose requires
Run-scoped reference lookup should be applied consistently everywhere
references are gathered, including the mission-mock TEST class path,
not only where
get_best_reference_imagealready supports it.What exists today
get_ready_test_campaign_units(
database/modules/utils/rapid_db.py:5696) does not selectwork_units.run_id, sogather_campaign_unitskeeps theproduction-lane reference default rather than the run-scoped lookup
get_best_reference_imagenow supports. Current risk is low becausemission-mock test campaigns register no references of their own. The
fix would need the query's select list and its five-column positional
unpack extended, then threading into
science_facts.The trigger that reopens this
The first time a mission-mock TEST campaign registers its own
reference and gets the wrong (production-lane) default instead of its
run-scoped one, or when
get_best_reference_image's run-scoping isnext extended elsewhere and this gap should be closed to match.