In my opinion, this sort of context definition that you have of contexts being dynamic scopes depends on the context we're talking about.
To me, at least the request and transaction contexts are definitely lexical, exactly like variables. Take this example:
Uni<Void> m(Request r, Transaction t) {
// here I'm using the request and transaction from the lexical scope
doSomething(r, t);
// here I'm returning a Uni that captures the lexical contexts and does something with them
return Uni.createFrom().item(() -> doSomething(r, t));
}
Now, this works because I know my lambda captured the lexical scope and I can still access the same request and transaction as the method. MP-CP was created, so that the same intuition as to "what the hell is the current context being captured here?" can be taken from the lexical scope of variables:
Uni<Void> m() {
// here I'm using the request and transaction from the lexical "implicit" scope
doSomething(CDI.currentContext(), Transaction.current());
// here I'm returning a Uni that captures the lexical contexts and does something with them
return Uni.createFrom().item(() -> doSomething(CDI.currentContext(), Transaction.current()));
}
Nobody in their right mind would expect that, given context propagation, the request or transaction scopes in use within that last example in the Uni lambda, would be different from the ones active at the time of the m() method call. If you switch those contexts at subscription time, people will get very confused. Now, perhaps you're not suggesting that, and merely that you would capture the contexts in place at the Uni creation, and pass them on to the Uni from the starting point of the subscription, so in practice, both ways of looking at things end up executing equally.
But my intuition, and the design of MP-CP, is so that contexts are captured lexically, at lambda creation time, so that their contexts are the same as the outer scope of the lambda.
Again, this doesn't work for things like tracing, I suppose, because perhaps in this case, the contexts should be dynamic and not lexical.