Resolves node_id to the execution that produced the artifact it currently
uses: its predicted fingerprint selects the cached artifact, and the most
recent succeeded job that produced that artifact at that fingerprint is the
representative execution. The representative can belong to another node
that shares the fingerprint (cache reuse), because the node's artifact is
that execution's output.
Value
The execution's provenance list with its job_id, or NULL when
the node has no fresh artifact or the artifact has no recorded
provenance: executions from before provenance was recorded, and
executions whose capture failed (their job records capture_error).
Run the node, or re-execute it with bg_run(project, rerun = node_id),
to record one.
Details
The returned provenance records the execution's own output
(artifact_ref), its fingerprint, the inputs passed to the executor
(in order), what it consumed (D input ids, the check subject, and
data_files with SHA-256 hashes taken before the executor ran), the
effective settings read back from the result, the environment of the
process that ran it, and the pad snapshot (P/A/D components with SHA-256
digests, or NULL when the node kind has no complete
bg_register_node_kind() pad declaration). For kinds that declare a
pad, file-backed data counts only as a non-empty regular file hashed
before the run at the identical path, and the Stan source and its includes
must exist; when that rule is violated, or the Stan source or a consumed
file changed while the executor ran, pad is NULL and capture_error
says why.