producers
producers
¶
Producer signal: which sheet a score declares to write which file.
Movement produces declarations, sheet stdout_to targets and gated
file_exists validation proxies share one producer map. Explicit ownership
takes precedence over stdout capture, then the validation proxy, for the same
path. V108/V109 and the runtime foreign-artifact guard consume this map.
Classes¶
Functions:¶
gated_producer_sheet
¶
The sheet a validation is gated to (sheet_num == N / >= N),
or None for any other condition shape.
Source code in src/marianne/core/producers.py
declared_products
¶
Sheet number -> the path templates its sheet-gated file_exists
validations declare it produces (unexpanded: {workspace}/x.md).
Source code in src/marianne/core/producers.py
has_declared_outputs
¶
Whether any movement declares produces or any sheet captures
stdout_to — the two signals beyond the legacy proxy, in one
predicate shared by the merge and build_sheets so their maps
never disagree on which call shape is in play (#384).
Source code in src/marianne/core/producers.py
declared_products_from_config
¶
Merge output signals in ownership priority order (GH #384).
Movement declarations use concrete sheet numbers, including after fan-out
expansion or checkpoint reload. Bind {sheet_num} to the PRODUCER now,
leaving {workspace} for the runtime validation engine. Stdout targets
are already expanded by SheetConfig, exactly as the musician writes them,
and a target the runtime writer would refuse (it escapes the workspace)
owns nothing. Proxy-only scores retain their original paths, ordering
and duplicates.
Identity: precedence and co-ownership compare resolved path identity, but the map advertises the authored spelling (symlinks unresolved). One spelling is kept per resolved identity so V108's basename lookup, V109, the ordering checks and the foreign-artifact guard all agree on the same name for one file.
Source code in src/marianne/core/producers.py
producer_basenames
¶
Produced file basename -> the sheets declared to produce it.
Source code in src/marianne/core/producers.py
dag_ancestors
¶
Transitive dependency ancestors of sheet — the sheets guaranteed
to have completed before it runs.
Source code in src/marianne/core/producers.py
foreign_artifacts
¶
Path templates declared as produced by sheets that are neither this sheet nor its DAG ancestors — files this sheet has no business writing. A sheet that writes one is fabricating a downstream artifact before the movement that owns it runs (GH #386).