Shall we just look at the latest v13 and determine if it is a solution
for showing the correct query we can stand behind, if it's not, explain
why not, and in that case, possibly even figure out what preliminary
refactoring is in order that would help us arrive at a solution in a
more direct way?
I'd find this useful from an educational perspective, and possibly
others as well which have taken the time to build a mental model of this
area with this occasion.
The patch is more self-contained and less invasive than previous
proposals, which makes potential reverts easier.
Maybe what's debatable is the temporary storage in
saved_debug_query_string and back. The tests pass without this part
indeed. IIUC the switch back happens "naturally" in PortalStart when the
updated source text gets set.
But okay, just to be on the safe side we can keep the temporary storage
and switch so that the "old" query is in the picture strictly as minimum
as necessary.
Kind regards,
Mircea Cadariu