Register an algorithm implementation under a stage contract
Source:R/07-registry.R
register_strategy.RdRegister an algorithm implementation under a stage contract
Arguments
- contract
character contract class name (e.g.
"Decomposer")- name
character unique implementation name
- constructor
R closure with signature
function(params_list)returning a contract-class instance. Primitive functions are unsupported because their implementation state cannot satisfy the registry fingerprint contract.- replace
logical; whether to deliberately replace a different constructor already registered under the same key. Re-registering a fingerprint-equivalent constructor, with the same code and behavior-relevant captured state, is an idempotent no-op.
- reason
non-empty character rationale required when
replaceisTRUE; retained in registry provenance.