compute: preserve compute query semantics when regenerating modified query strings
Created by: coury-clark
Code Insights does some tree manipulation of Sourcegraph queries to ensure that various fields (such as fork and archive) are set appropriately if not defined. This tree is converted back into a human readable query and is queued for processing.
When a compute query is converted the semantics of the content field are not preserved and therefore the query parser does not currently preserve identity for compute queries (Q -> Q). Example:
mystring content:output(x -> $lang)
After the query parser operations the explicit content will get replaced with an implicit content and will fail to parse in compute.
fork:no archived:no (output(x -> $lang) AND mystring)