Skip to contents

Check that each configured operation would replace its existing hand-written wrapper without changing formals, helper calls, results, or documentation.

Usage

verify_adoption(root, config = "specmill.yml", callbacks = new.env(parent = emptyenv()), wrappers = NULL)

Arguments

root

Explicit existing client root directory.

config

Project YAML path relative to root.

callbacks

Explicit environment containing named development callbacks.

wrappers

Optional wrapper names to check. By default every configured, generated operation with a hand-written definition outside manifest-owned files is checked.

Value

A list with operations (per wrapper: file, status "verified" or "failed", and reason), contracts (fixed contracts for verified wrappers, in the contracts_file format), and files (SHA-256 hashes of source files whose every definition verified).

Details

Nothing in root is written. Generation runs on a temporary copy with the candidate definitions removed, so the check covers exactly the code generate_client() would write. Both wrappers run with the configured helper replaced by a recording stub: with required inputs only, with every input explicit, with each optional input explicit, FALSE, and 0, and with no arguments. Helper calls, arguments, and results (or error messages) must be identical. Documentation is compared as Rd rendered by roxygen2::roc_proc_text(), ignoring the source-file header.

To adopt verified wrappers, save the contracts to the service contracts_file, delete the listed files, and apply. Adoption hashes do not lift lifecycle protection, so deletion is the adoption step. A file with other code or unverified wrappers fails; separate it first.

See also