reducer path to strengthen too
This commit is contained in:
@@ -249,14 +249,17 @@ Reducers are a capability family, similar to reusable node specs:
|
||||
- dependency-trackable
|
||||
|
||||
State fields reference reducers declaratively. String reducer names are accepted
|
||||
as shorthand for unconfigured reducers; configured reducers use a `name` plus
|
||||
JSON-compatible `config`. Workflow artifacts do not embed arbitrary Python
|
||||
callables.
|
||||
as shorthand for unconfigured reducers; configured reducers use a structural
|
||||
`ref` plus JSON-compatible `config`. Workflow artifacts do not embed arbitrary
|
||||
Python callables.
|
||||
|
||||
```python
|
||||
StateField(
|
||||
type="integer",
|
||||
reducer={"name": "wf.std.modulo_add", "config": {"modulus": 10}},
|
||||
reducer={
|
||||
"ref": {"source": "wf.std", "capability_key": "modulo_add"},
|
||||
"config": {"modulus": 10},
|
||||
},
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
@@ -159,16 +159,16 @@ being split again.
|
||||
Reducer refs are capability refs, not graph paths. `wf.std.add` is shorthand for
|
||||
source `wf.std` and capability key `add`.
|
||||
|
||||
The reducer cleanup should move `ReducerRef` toward structural `CapabilityRef`
|
||||
while keeping string reducer names as parse-only shorthand. Reducer config stays
|
||||
part of the reducer reference payload:
|
||||
Configured reducer refs now use a structural `CapabilityRef` while keeping
|
||||
string reducer names as parse-only shorthand and display keys. Reducer config
|
||||
stays part of the reducer reference payload:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "wf.std.modulo_add",
|
||||
"ref": {"source": "wf.std", "capability_key": "modulo_add"},
|
||||
"config": {"modulus": 10}
|
||||
}
|
||||
```
|
||||
|
||||
That future cleanup must not reuse graph path parsing rules. Reducer names live
|
||||
in the capability/source domain.
|
||||
That shape must not reuse graph path parsing rules. Reducer names live in the
|
||||
capability/source domain.
|
||||
|
||||
Reference in New Issue
Block a user