One feature that we could theoretically look at would be to modify the behavior of conda so that instead of it just doing a GET to <CHANNEL_URL>/repodata.json.bz2 it instead does a post to the same url with an payload of the packages already present in the target environment
{
'packages': [
'python 3.7.1', ...
]
}
This would allow us to dynamically be able to generate the constained repodata without needing to resort to fairly gross url path based approaches.