A strategy's capabilities are declared, not asked for
The declaration is the single source. A strategy that behaves statefully but does not declare it is treated as stateless, and the behaviours gated on the capability (checkpoint storage among them) are chosen accordingly.
The rule
- A strategy declares its capabilities as part of its definition.
- Whether a strategy is treated as stateful, and whether it is treated as synchronous, is determined from those declarations alone: stateful means the capability is declared, synchronous means synchronous execution is declared and stateful is not.
- Behaviour that depends on a strategy's nature is gated on the declared capabilities and not on the strategy's identity.
What it means
Whether a strategy is treated as stateful comes only from its own declaration: nothing infers it from behaviour, and nothing infers it from which strategy it is.
"Synchronous", as a capability query, means something narrower than "runs synchronously": it is the declared capability for synchronous execution and the absence of the stateful capability. State graph is synchronous in its mechanics, but it also declares itself stateful, so the synchronous query answers false for it — the two capabilities are read together, not as alternatives.
A strategy with no declaration at all, or a declaration that carries no capabilities, answers every capability query the same way: false. There is no separate "unknown" outcome.
Example
Two strategy declarations, queried for the same two capabilities:
["synchronous_execution", "stateful"]["synchronous_execution"]The first answers true for stateful and false for synchronous; the second answers the other way round.