A report needs a review record before publishing. The report-writing Skill cannot approve its own review. Declare an evidence step, wait for the host to submit the actual record, and validate it.
Declare an evidence wait
Place review in the workflow and declare draft-to-review and review-to-publish transitions. kind names the required evidence. The validator identity and version refer to a registered check.
Verify actual evidence
This validator fragment reads a review file and its actual hash. It accepts only a UTF-8 file containing approved. Real applications should also check report identity, review scope, and business conclusions.
Pass evidenceValidators: [reviewValidator] to createRuntime. A trusted host supplies ref here. Applications accepting paths externally must enforce path scope or query receipts by business ID instead. Do not read arbitrary system files supplied by users.
Submit the current wait
Prepare the actual review file and submit it from the host. This fragment uses runtime with the validator registered:
After acceptance, call runUntilBlocked. Runtime checks the current wait, evidence kind, revision, and actual hash. Provide a unique submissionId for each submission; if a request times out or its outcome is uncertain, call inspect to check status and receipt.submissionId instead of resubmitting directly.
Handle invalid or stale evidence
Missing files, hash mismatches, or unmet business conditions preserve the wait; handle the returned error. On revision conflict, read the Run and current wait before submitting again.
When the material for a pending evidence wait fails verification or becomes invalid, call invalidateEvidence to recover along the on: 'invalidated' transition; invalidateEvidence cannot be called on an already accepted (resolved) evidence wait. Define recovery paths beforehand; do not edit Run records to revoke accepted results. See artifact validation for ongoing file checks. Last modified on December 1, 2026